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.


16 results found

  1. Add `atlas backups restores watch` command

    I like the ability to monitor snapshot progress with atlas snapshot watch. It lets me wait for the snapshot to finish up before progressing on to some future step of an automated workflow.

    Could we add the same watch command to atlas backup restore? The API I'm envisioning is just this:

    atlas backups restores watch <restoreId> [options]
    

    Where [options] are all the usual suspects like --projectId --profile and so forth. Like the snapshots watch command, this will help me wait for a database to finish restoring some snapshot before going and doing some other step of an automated workflow.

    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

    planned  ·  6 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)
  2. Add a command to open the CLI config on my system editor

    A new command like mongocli config edit that opens the config file on my system editor

    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

    planned  ·  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)
  3. 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)
  4. 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/

    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)
  5. 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

    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)
  6. 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,

    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 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

  7. Atlas CLI to return the roles/actions/privileges assigned to a particular database user

    I have done some testing and research and have been unable to get the Atlas CLI to return the roles/actions/privileges assigned to a particular database user. I am requesting that this functionality be added to the Atlas CLI, as it seems like a common requirement, and I believe the Atlas CLI should support.

    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)
  8. 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
    
    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)
  9. Add `edit` to `atlas config` help listing.

    When listing help for atlas config the edit option is not currently visible:
    ```
    ~ 🍤 atlas config --help 23:14:37 UTC
    Configure settings in a user profile.
    All settings are optional. You can specify settings individually by running:
    $ atlas config set --help

    You can also use environment variables (MONGODBATLAS*) when running the tool.
    To find out more, see the documentation: https://dochub.mongodb.org/core/atlas-cli-env-variables.

    Usage:
    atlas config [command]

    Available Commands:
    init Configure a profile to store access settings for your MongoDB deployment.
    set Configure specific properties of a profile.
    list Return a list of available profiles by name.
    describe…

    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.

    We’ve filed a similar idea some time ago to gauge customers’ interest in exploding this functionality: https://feedback.mongodb.com/forums/930808-mongodb-cli.

    We’re happy to hear you’d be interested in having it publicly available.

    We’re added it to our roadmap and plan to expose it to our users in one of the future releases.

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

    Keep the ideas coming!

    Jakub

  10. 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

  11. 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

  12. Add description of JSON file used to create cluster.

    According to doco https://www.mongodb.com/docs/atlas/cli/upcoming/command/atlas-clusters-create/

    "For full control of your deployment, or to create multi-cloud clusters, provide a JSON configuration file with the --file flag."

    it would be nice to get detailed description what should be in this file, what can be changed and what is the expected format of parameters in this file.

    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. Add --currentIp to atlas accessList

    Would be nice to have the --currentIp option when using "atlas accessList".
    The current workaround in linux/macOS is

    mongocli atlas accessList create curl ifconfig.me

    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. 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)
  15. 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

    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. Add user by email address

    I'd like to be able to specify a user's e-mail address when adding them to a group from the mongocli. mongocli iam teams create allows one to pass in e-mail addresses. But mongocli iam teams users add requires the UUID of the user.
    For reference: https://github.com/mongodb/mongocli/issues/606

    https://github.com/mongodb/mongocli/issues/606

    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)
  • Don't see your idea?

Atlas CLI

Categories

Feedback and Knowledge Base