Docs Home → Atlas Command Line Interface
Migrate to the Atlas CLI
On this page
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 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
the profile content and API keys from
Update any automation scripts.
If you use any automation scripts that rely on
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.
Choose an authentication method and connect to Atlas.
You can authenticate using either
atlas auth login or
config init. To learn more, see Connect from the Atlas CLI.
Use the new Atlas CLI commands.
Use Atlas CLI commands (starting
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.