Docs Menu

Docs HomeAtlas Command Line Interface

Migrate to the Atlas CLI

On this page

  • Install the Atlas CLI.
  • Update any automation scripts.
  • Choose an authentication method and connect to Atlas.
  • Use the new Atlas CLI commands.

If you have already configured MongoDB CLI, you can migrate your settings to the Atlas CLI easily. Migrating to the Atlas CLI preserves existing MongoDB CLI profiles and saved API keys. If you haven't already configured MongoDB CLI, you can proceed to Install or Update the Atlas CLI.

Complete the following steps to migrate from the MongoDB CLI to the Atlas CLI:


Install or Update the Atlas CLI. If you have an existing mongocli.toml configuration file from the MongoDB CLI, Atlas CLI automatically creates a new configuration file, config.toml. The Atlas CLI populates config.toml with the profile content and API keys from mongocli.toml.


If you use any automation scripts that rely on mongocli.toml or use MongoDB CLI Atlas commands, update the scripts to point to the new configuration file and use Atlas CLI commands instead.


Atlas CLI supports both MongoDB CLI environment variables and Atlas CLI environment variables, so changing existing environment variables is optional. However, you can use either MongoDB CLI environment variables or Atlas CLI environment variables, but not both together. If you plan to use Atlas CLI environment variables in the future, change your existing MongoDB CLI environment variables.


You can authenticate using either atlas auth login or atlas config init. To learn more, see Connect from the Atlas CLI.


Use Atlas CLI commands (starting with atlas) wherever you previously used MongoDB CLI Atlas commands (starting with mongocli atlas). You can use profiles that Atlas CLI migrates from the MongoCLI by using the --profile flag.

←  Atlas CLI Environment VariablesSet Up Atlas with atlas quickstart →

Specify your version