Docs Home → MongoDB Command Line Interface
mongocli config
This version of the documentation is archived and no longer supported. View the current documentation to learn how to upgrade your version of MongoCLI.
Configure a profile to store access settings for your MongoDB deployment.
Configure settings in a user profile. 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/.
Syntax
mongocli config [options]
Options
Name | Type | Required | Description |
---|---|---|---|
-h, --help | false | help for config | |
--service | string | false | Type of MongoDB service.
Valid values: cloud|cloudgov|cloud-manager|ops-manager (default "cloud") |
Inherited Options
Name | Type | Required | Description |
---|---|---|---|
-P, --profile | string | false | Profile to use from your configuration file. |
Examples
To configure the tool to work with Atlas $ mongocli config To configure the tool to work with Atlas for Government $ mongocli config --service cloudgov To configure the tool to work with Cloud Manager $ mongocli config --service cloud-manager To configure the tool to work with Ops Manager $ mongocli config --service ops-manager
Related Commands
mongocli config delete - Delete a profile.
mongocli config describe - Return a specific profile.
mongocli config list - List available profiles.
mongocli config rename - Rename a profile.
mongocli config set - Configure specific properties of a profile.