Docs Menu
Docs Home
/ /
MongoDB CLI
/

mongocli config

On this page

  • Syntax
  • Options
  • Inherited Options
  • Examples
  • Related Commands

Configure and manage your user profiles.

You can define the settings that the MongoDB CLI uses to interact with MongoDB services. All settings are optional. You can specify settings individually by running: $ mongocli config set --help You can also use environment variables (MCLI_*) when running the tool. To find out more, see the documentation: https://docs.mongodb.com/mongocli/stable/configure/environment-variables/.

Command Syntax
mongocli config [options]
Name
Type
Required
Description
-h, --help
false
help for config
--service
string
false
Type of MongoDB service. Valid values are cloud-manager or ops-manager. This value defaults to "cloud-manager".
Name
Type
Required
Description
-P, --profile
string
false
#
# Configure a profile to interact with Atlas:
mongocli config
# Configure a profile to interact with Atlas for Government:
mongocli config --service cloudgov
# Configure a profile to interact with Cloud Manager:
mongocli config --service cloud-manager
# Configure a profile to interact with Ops Manager:
mongocli config --service ops-manager
  • mongocli config delete - Delete a profile.

  • mongocli config describe - Return the profile you specify.

  • mongocli config edit - Opens the config file with the default text editor.

  • mongocli config list - Return a list of available profiles by name.

  • mongocli config rename - Rename a profile.

  • mongocli config set - Configure specific properties of a profile.

Back

zsh