Skip to content

Atlas CLI

The MongoDB Atlas Command Line Interface, or Atlas CLI (mongodb-atlas-cli), allows you to create, manage, and automate operations related to your MongoDB Atlas deployment. This includes tasks like provisioning clusters, creating and deleting users, and controlling network access. You can also access related products like Atlas Search. With the Atlas CLI, you can quickly interact with MongoDB services from the command line for easier testing and scripting.


You can install the Atlas CLI via, Homebrew, Apt, Yum, or a binary download. Help us improve the MongoDB Atlas CLI by posting your ideas and suggestions for improvements.

To report bugs, please use our mongodbcli github issues.


21 results found

  1. Official Docker Image for Atlas Search

    It Could be very useful test Atlas search locally using a dedicated Docker Image, so it is portable to a Kubernetes cluster

    8 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  2. Hi, in our environment (managed by OPS Manager) we have a lot of mongodb instances in the same server, would be useful having a function/met

    Hi,
    in our environment (managed by OPS Manager) we have a lot of mongodb instances in the same server, would be useful having a function/method/command to exec the shutdown/startup of all instances running in an specified server.
    At the moment there is only a command to shutdown/startup at scope of cluster (ReplicaSet): https://www.mongodb.com/docs/mongocli/v1.18/command/mongocli-ops-manager-clusters-shutdown/
    Thanks,
    Danilo

    7 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  3. Image execution in LXC

    For our CI we use Github actions with self hosted runners, the server machines have Proxmox with LXC and Ubuntu. For automated tests we start a docker compose which should start the official atlas docker image. During deployment creation it fails with Error 127. Is there anything that is required to execute it on those machines?

    The command which I run and the output look like the following:

    docker run --privileged -p 27017:27017 -v "/var/run/docker.sock:/var/run/docker.sock" mongodb/atlas:v1.14.2 atlas deployments setup core-data \
    --type local \
    --mdbVersion 7.0 \
    --force \
    --bindIpAll \
    --username admin \
    --password notasecret

    with this…

    5 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  4. Possibility to download binaries in advance, or start a deployment in docker images

    The problem is the following:
    When I create a deployment during docker image build, it won't start the deployment during image execution but end in an endless spinner. Therefore I created a deployment which will at least the binary download to speed up the image startup, which worked last year.
    Currently on startup of this image it will then try to create a new deployment and results in an error that python could not be found.

    Creating your cluster core-data
    1/2: Starting your local environment...
    2/2: Creating your deployment core-data...
    Error: exit status 127: Error: runc: runc create failed: unable…

    5 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  5. Encrypt private_api_key in a mongocli configuration file

    I would like to encrypt the value of privateapikey stored in $HOME/.config/mongocli/config.toml (part of mongocli config).

    privateapikey should be not visible in the open text as it gives access to the MongoOPS/Atlas to anyone who can access the file.

    4 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  6. add a command to list and check the invoices

    It would be great if there will be the possibility to get information about invoices with atlas-cli like via API.

    https://www.mongodb.com/docs/atlas/reference/api/invoices/

    3 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Atlas CLI  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    Thank you for taking the time to raise the feedback. 


    We will look into when this can be implemented.

    In meantime, could you share a bit of context on how would you like to use it in the Atlas CLI?


    Thanks,

    Jakub

  7. Add option for generating curl command

    Currently when we are getting a 500 error back it is difficult to debug what is going wrong and we need to replicate the rest api call via curl.
    Would be nice to have an option in order to generate the curl command that replicates the mongocli call in order to easily test the command.

    This is valid for Atlas/OM/CM

    3 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  8. Option To Return Errors As JSON

    Hi,

    When using the --output json I would expect the errors to be returned as JSON just like the success output. However, the output for errors seems to continue to be a flat string.

    It would be helpful from a scripting perspective to have the output as JSON when requested so we can include better logic in our scripts when errors occur. For example:

    {
        "code": "409",
        "message": "The cluster name already exists"
    }
    

    Please let me know if you need more information about the request.

    Thanks,

    2 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Atlas CLI  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    Hi Nic,


    Thank you for taking the time to raise this request. We'll look into it and update this feedback when we decide to roadmap it for the near future.


    Thank you,

    Jakub

  9. add option to return output as a text instead of array

    when you call cli with -o json-path option you always recieve output as an array in brackets. it would be useful to add a key to return output as plain text, so it can used in scripts without further processing (the same way as aws cli does) :

    current state :

    export org_id=$(atlas organizations list -o json-path='$.results[?(@.name =="MyOrg")].id' )
    echo $org_id
    [5ccefa1079358eebfef9456e]

    suggested output

    echo $org_id
    5ccefa1079358eebfef9456e
    
    2 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Atlas CLI  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  10. list all Atlas Search indexes for a cluster

    The list Atlas Search indexes command,
    https://www.mongodb.com/docs/atlas/cli/stable/command/atlas-clusters-search-indexes-list/

    ought to not require the collections and db parameters. It should list indexes for all for the cluster and for a database.

    2 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Atlas CLI  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  11. No sufficient instructions

    Please improve tutorials. This page (https://www.mongodb.com/docs/atlas/cli/stable/atlas-cli-docker/) is no sufficient.

    PS C:\ivo\projects\nest1> docker pull mongodb/atlas
    ...
    PS C:\ivo\projects\nest1> docker run --env-file atlas.env --rm -it mongodb/atlas bash
    [root@9bd3eed47f2d /]#
    [root@9bd3eed47f2d /]# show dbs
    bash: show: command not found
    [root@9bd3eed47f2d /]# mongo
    bash: mongo: command not found
    [root@9bd3eed47f2d /]#

    Please write more perfect and working tutorial for it.

    Second problem is docker's mongo-express (https://hub.docker.com/_/mongo-express). I've windows' Docker Desctop and the mongo-express doesn't simply work. Please improve it if it's yours, and make possible good instructions for it.

    For example i use with docker-compose.yml:

    version: "3.8"

    services:
    mongodb:
    #image: mongo:5.0.6-focal…

    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Atlas CLI  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    Hi Ivo,

    Thank you for bringing up this feedback!

    To better assist you, could you please provide a link to the specific documentation you believe requires improvements for the Atlas CLI Docker image (mongodb/atlas)? This would help us pinpoint the exact areas that need attention.

    Additionally, it appears that you are attempting to execute MongoDB Shell database commands, but it's important to note that this Docker image is designed for MongoDB Atlas, a cloud service for managing MongoDB deployments in the Cloud. To access a list of available commands, you can run "atlas --help" after entering the bash, as demonstrated in your example. Clarifying this distinction in the documentation is crucial, and we appreciate you pointing it out.

    If you have any other suggestions or specific areas you feel need enhancement in the documentation, please feel free to share them. Your input is valuable, and we want to ensure the…

  12. Token retrival as a API / CLI / endpoint call

    When we try to authenticate using Atlas CLI or Administration API, We require to go to shell and need to give approval / confirmation / consent. Would be a great feature to get token as a response of API call / CLI request which will allow seamless integration between the client app and MongoDB Atlas. More use cases will be opened for SaaS, PaaS applications.

    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Atlas CLI  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  13. atlas clusters sampleData reload

    Hi Jakob/Guss/Colm,

    Any chance of adding a new command to sampleData - specifically:
    atlas clusters sampleData reload <cluster>

    The command would literally check if the cluster has the sampleData loaded but it would also check the counts and the hashes so that if there wasn't an exact match so the data in some or all of the collections had been changed, then the existing sample data would be dropped and reloaded?

    Thanks!
    Eoin

    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Atlas CLI  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  14. atlas clusters sampleData loaded command

    Hi Jakob/Guss/Colm,

    Any chance of adding a new command to sampleData - specifically:
    atlas clusters sampleData loaded <cluster>

    The command would literally check if the cluster has the sampleData present?
    I'd find that helpful in some of the lab scripts I'm writing as I'd avoid an unnecessary call to load the sampleData if it was already present. It throws a nasty looking red warning for learners when I do it by default to ensure the data is there.

    Thanks!
    Eoin

    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Atlas CLI  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  15. Add Multi-Factor Authentication settings to be managed via Atlas CLI

    At the moment, there is currently no method to manage or view Multi-Factor Authentication settings via the Atlas CLI.
    The alerts set in this moment to control MFA seem to be quite poor and it is not possible to get specific information about users.

    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Atlas CLI  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  16. alerts list should allow filtering by date and sort inversely by date

    The 'alert list' list all alerts since the beginning of time. We can list open alerts, but we can't practically list alerts that were generated recently without going through all alerts ever produced for a project. I'd like to see what alerts were produced and are open or produce recently but closed.

    Additionally, what is a "tracking" alert?

    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Atlas CLI  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  17. Allow for specifying config file path.

    Currently, the config for Atlas CLI lives in a specific directory defined by the tool: https://www.mongodb.com/docs/atlas/cli/stable/atlas-cli-save-connection-settings/#std-label-config-toml-location

    While the config can be both set by CLI and edited with atlas config edit command, both of those options are specific to the tool. As someone who uses multiple CLI tools, I prefer to have all my configs organized the way it works for me and not have to remember idiosyncratic configuration for one of the tools I'm using.

    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Atlas CLI  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    Thank you for filing another idea! We appreciate your feedback and contribution.

    We’ll investigate internally what would it take to deliver the right experience to users to allow setting the path to the configuration file.

    In meantime, could you please share what would be the best way to configure the path to config file within the Atlas CLI from your perspective?

    Keep the ideas coming!

    Jakub

  18. Ability to download/point to latest tool versions

    This is especially important for a headless environment. And can be applied to more than just the Atlas CLI and the MongoDb Shell

    This documentation tells you to manually construct the string: https://www.mongodb.com/docs/database-tools/installation/installation-linux/#installation

    It would be ideal to programmatically access the latest version, instead of having to manually build a download string and use that to access a static version.

    Other languages and tools have solved this problem. Could MongoDb do this, too?

    It looks like someone tried to do this for Windows: https://community.chocolatey.org/packages/mongodb-shell#versionhistory

    But that doesn't look like an officially supported solution, It would be amazing if this existed,…

    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Atlas CLI  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    Thank you for taking the time to file this request. Your feedback helps us make the Atlas CLI a better place for you and other users. At the same time I’d like to apologise for the late reply.

    Programmatic usage of the Atlas CLI is an area we plan to improve and further simplify. We can see how having an ability to download always the latest version of the Atlas CLI can simplify some of the automated actions.

    As a next step we’ll look into some more details how this could be achieved.

    We’ll update this idea as soon as we have more details.

    In the meantime, could you share more details on what do you use this automation for?

    Keep the ideas coming!

    Jakub

  19. The "mongocli atlas clusters list" command ought to return hosts in an array

    The 'mongocli atlas metrics databases list' command expects a hostname argument. Currently, one has to parse out the hosts from the URI returned from the cluster list command. It would be easier if the cluster list command returned the hosts in a command along with the replica set status, so that one could easier script the descent from the cluster into cluster details and info.

    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Atlas CLI  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  20. Username is case sensitive

    with username "Shamim" authentication failed where as "shamim" works

    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Atlas CLI  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
← Previous 1
  • Don't see your idea?

Feedback and Knowledge Base