MongoDB CLI

The MongoDB Command Line Interface (mongocli) allows you to create and manage MongoDB Cloud deployments with MongoDB Atlas. You can also use the MongoDB CLI to manage your on-premises MongoDB environments with MongoDB Cloud Manager and MongoDB Ops Manager. With the MongoDB CLI, you can quickly interact with MongoDB services from the command line for easier testing and scripting.


You can install the MongoDB CLI via homebrew, binary download or clone the repo. Help us improve the MongoDB Command Line Interface by posting your ideas and suggestions for improvements.



To report bugs, please use our mongodbcli github issues.


  1. Add command for upgrade a cluster

    Currently there is no easy way to upgrade a cluster but we need to modify the file describing the cluster and push the full description.
    Would be nice to have a command like:

    mongocli om upgrade --version "4.2.10" --fcv "4.2" MyReplicaset

    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

    0 comments  ·  mongodbcli with Ops Manager  ·  Flag idea as inappropriate…  ·  Admin →
  2. modify mongoDB DB user in ATLAS, OPS Manager , or Cloud Manager

    It would be really nice if mongocli could be used to modify user accounts. Add new roles, or change the password. Currently mongocli can add, list , delete project DB user accounts. It would be nice for modify, since there is a need for password rotation, and mongocli see so fit that bill quite nicely.

    This is for OPS Manager, but could be for OPS , Cloud or Atlas..

    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

    1 comment  ·  mongodbcli with Ops Manager  ·  Flag idea as inappropriate…  ·  Admin →
  3. Support TLS configuration

    Add options to the config file for deploy clusters with TLS enabled.

    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

    1 comment  ·  mongodbcli with Ops Manager  ·  Flag idea as inappropriate…  ·  Admin →
  4. 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  ·  mongodbcli with Atlas  ·  Flag idea as inappropriate…  ·  Admin →
  5. enable x509 security command

    mongocli ops-manager security enable [MONGODB-CR|SCRAM-SHA-256]

    add an option for x509

    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  ·  mongodbcli with Ops Manager  ·  Flag idea as inappropriate…  ·  Admin →
  6. Allow to create custom roles

    Allow to create custom roles for Atlas/CM/OM

    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  ·  mongodbcli with Ops Manager  ·  Flag idea as inappropriate…  ·  Admin →
  7. Store the type of cloud in profile to shorten the CLI command

    MongoCLI current requires the user to type on the command-line if it's an Ops Manager, Cloud Manager, or Atlas. We could store this information in the profile (the file containing the URL and API keys) so the users have less to type.

    PS: This applies to all 3 categories - MongoDBCLI with Ops Manager, MongoDBCLI with Cloud Manager, and MongoDBCLI with Atlas - on feedback.mongodb.com and the UI forces me to select only one of them

    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  ·  mongodbcli with Ops Manager  ·  Flag idea as inappropriate…  ·  Admin →
  8. 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  ·  mongodbcli with Atlas  ·  Flag idea as inappropriate…  ·  Admin →
  9. Import existing MongoDB deployments

    There should be a way to import existing MongoDB deployments with mongocli. This would allow the automated provisioning of Ops Manager instances in cases where MongoDB deployments already exist. In addition we would be able to import the application database of Ops Manager automatically whenever a new Ops Manager instance is installed.

    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  ·  mongodbcli with Ops Manager  ·  Flag idea as inappropriate…  ·  Admin →
  10. 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  ·  mongodbcli with Atlas  ·  Flag idea as inappropriate…  ·  Admin →
  11. 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  ·  mongodbcli with Atlas  ·  Flag idea as inappropriate…  ·  Admin →
  12. Support ClusterAuthMode X509

    Customer is trying to deploy a RS with X509 internal auth. The missing RS parameter clusterAuthMode: X509 can be set via GUI but not via CLI.

    Customer would appreciate full support for this mode using the CLI.

    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  ·  mongodbcli with Ops Manager  ·  Flag idea as inappropriate…  ·  Admin →
  13. MongoCLI Wizard Flag

    Currently a user needs to manually insert at least all the required flags to use a mongocli command. We can implement the flag --wizard which guides the user through flags with interactive prompts.
    This flag should be added to all the commands to allow the user to get interactive prompts when required flags are not provided.

    The wizard flag will have the following functionalities:

    • Asking to the user the required flags with interactive prompts
    • Showing a list of optional flags and asking to insert their values if selected
    • In case of describe commands, showing the list of resources available (mongocli…
    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  ·  mongodbcli with Ops Manager  ·  Flag idea as inappropriate…  ·  Admin →
  • Don't see your idea?

Feedback and Knowledge Base