Atlas CLI Architecture Internals
Parent: Atlas CLI · Published reference · snapshot 2026-10-15
↓ Facts as markdownall context files
Depth-first rabbithole dossier for Atlas CLI Architecture Internals; source-anchored research pack.
These notes link each claim to its source. Some citations identify archived research reports that are no longer hosted on this site. A published reference means the content is available; it does not certify independent review or accuracy.Read the editorial policy and follow the sources before relying on a claim.
Structure and components
- [low] Each Atlas CLI plugin consists of a `manifest.yml` file describing the plugin and an executable binary invoked by the Atlas CLI. Sources: https://www.mongodb.com/docs/atlas/cli/current/atlas-cli-extend-plugins.md [source]
How it works
- [low] When running a command with the `--projectId` option, the command line option takes precedence over both the environment variable and the profile stored in the configuration file. Sources: https://www.mongodb.com/docs/atlas/cli/current/atlas-cli-env-variables.md [source]
- [low] The refresh token is a string that allows Atlas to automatically request a new access token when the current access token expires. Sources: https://www.mongodb.com/docs/atlas/cli/current/atlas-cli-env-variables.md [source]
- [low] When set to `yes`, the Atlas CLI does not prompt to update to new versions. Sources: https://www.mongodb.com/docs/atlas/cli/current/atlas-cli-env-variables.md [source]
- [low] When set to `true`, the Atlas CLI does not warn if secure storage is unavailable. Sources: https://www.mongodb.com/docs/atlas/cli/current/atlas-cli-env-variables.md [source]
- [low] The `NO_PROXY` setting indicates no proxy for a URL because proxy isn't configured for that URL. Sources: https://www.mongodb.com/docs/atlas/cli/current/atlas-cli-env-variables.md [source]
- [low] When a plugin command is run, the Atlas CLI reads the manifest, identifies the binary, and executes it with appropriate arguments, while the binary handles command logic independently. Sources: https://www.mongodb.com/docs/atlas/cli/current/atlas-cli-extend-plugins.md [source]
- [low] The example Atlas CLI plugin uses Cobra to define commands (Go with Cobra is recommended, but any language that compiles to a standalone binary works), and the Atlas CLI passes the command name and arguments to the binary when running the plugin. Sources: https://www.mongodb.com/docs/atlas/cli/current/atlas-cli-extend-plugins.md [source]
Problems, failure modes and limitations
- [low] Atlas CLI supports both MongoDB CLI and Atlas CLI environment variables, but you cannot use both together. Sources: https://www.mongodb.com/docs/atlas/cli/current/atlas-cli-env-variables.md [source]
- [low] Access tokens cannot be refreshed, but a new token can be generated when the current token is close to expiry. Sources: https://www.mongodb.com/docs/atlas/api/api-authentication.md [source]
- [low] Service accounts and API keys cannot be used to log into Atlas through the Atlas UI. Sources: https://www.mongodb.com/docs/atlas/api/api-authentication.md [source]
Facts and statements
- [low] The Atlas CLI command opens a browser window and returns a one-time activation code that expires after 10 minutes. Sources: https://www.mongodb.com/docs/atlas/cli/current/connect-atlas-cli.md [source]
- [medium] The `UserAccount` option requires manual login and verification of an authentication token that is valid for 12 hours. Sources: https://www.mongodb.com/docs/atlas/cli/current/connect-atlas-cli.md, https://www.mongodb.com/docs/atlas/cli/current/atlas-cli-env-variables.md [source]
- [low] Atlas CLI 1.47+ attempts to store credentials securely. (verified as of 2026-10-15) Sources: https://www.mongodb.com/docs/atlas/cli/current/connect-atlas-cli.md [source]
- [low] The Service Account client ID and client secret are set for commands that interact with Atlas. Sources: https://www.mongodb.com/docs/atlas/cli/current/atlas-cli-env-variables.md [source]
- [low] The public and private API keys are set for commands that interact with Atlas. Sources: https://www.mongodb.com/docs/atlas/cli/current/atlas-cli-env-variables.md [source]
- [low] The organization ID is set for commands that require the `--orgId` option, and the project ID is set for commands that require the `--projectId` option. Sources: https://www.mongodb.com/docs/atlas/cli/current/atlas-cli-env-variables.md [source]
- [low] The output fields and format option sets the output; valid values are empty (default, human-readable), `json` (JSON output including all fields), `json-path` (JSON output with the fields you specify) and `go-template` (custom-formatted output from a Go template). Sources: https://www.mongodb.com/docs/atlas/cli/current/atlas-cli-env-variables.md [source]
- [low] The full path on the local system to the MongoDB Shell (`mongosh`) is a configurable parameter. Sources: https://www.mongodb.com/docs/atlas/cli/current/atlas-cli-env-variables.md [source]
- [low] Telemetry can be disabled by setting the flag to `1` or using `MONGODB_ATLAS_TELEMETRY_ENABLED`, but specifying both is not required. Sources: https://www.mongodb.com/docs/atlas/cli/current/atlas-cli-env-variables.md [source]
- [low] The container registry string specifies the namespace and name of the repository containing the image for local deployments. Sources: https://www.mongodb.com/docs/atlas/cli/current/atlas-cli-env-variables.md [source]
- [low] Setting the preview flag to `true` uses the preview MongoDB Atlas Local image, which supports MongoDB Vector Search Automated Embedding and other community features. Sources: https://www.mongodb.com/docs/atlas/cli/current/atlas-cli-env-variables.md [source]
- [low] The preview image uses the `preview` tag of the `mongodb/mongodb-atlas-local` Docker image. Sources: https://www.mongodb.com/docs/atlas/cli/current/atlas-cli-env-variables.md [source]
- [low] A Voyage AI API key is required for MongoDB Vector Search Automated Embedding features in the preview version of MongoDB Atlas Local. Sources: https://www.mongodb.com/docs/atlas/cli/current/atlas-cli-env-variables.md [source]
- [low] The proxy configuration accepts an absolute URL or hostname and port in `hostname[:port]` format. Sources: https://www.mongodb.com/docs/atlas/cli/current/atlas-cli-env-variables.md [source]
- [low] The HTTPS proxy URL takes precedence over `HTTP_PROXY` for all requests if both are set. Sources: https://www.mongodb.com/docs/atlas/cli/current/atlas-cli-env-variables.md [source]
- [low] Atlas CLI supports plugins that extend functionality with custom commands, which can be developed in any programming language that compiles to a standalone binary. Sources: https://www.mongodb.com/docs/atlas/cli/current/atlas-cli-extend-plugins.md [source]
- [low] The plugin binary must accept the command name as the first argument and be a standalone executable with no external runtime dependencies. Sources: https://www.mongodb.com/docs/atlas/cli/current/atlas-cli-extend-plugins.md [source]
- [low] The `binary` field in `manifest.yml` must match the binary filename. Sources: https://www.mongodb.com/docs/atlas/cli/current/atlas-cli-extend-plugins.md [source]
- [low] Atlas CLI commands use the Cobra framework, with each command having an `*Opts` struct, a `Run()` method, and a `*Builder()` function. Sources: https://raw.githubusercontent.com/mongodb/mongodb-atlas-cli/master/AGENTS.md [source]
- [low] The main Atlas CLI entry point is located in `mongodb-atlas-cli-atlascli-v1.50.0/cmd/atlas/atlas.go:40`. (verified as of 2026-10-15) Sources: https://github.com/mongodb/mongodb-atlas-cli/issues/4283 [source]
- [low] The Atlas CLI version is 1.53.0, git version 5cebd9ca62316ba53f079d81da7918b65d4f6bb3, built with Go version go1.24.13. (verified as of 2026-10-15) Sources: https://github.com/mongodb/mongodb-atlas-cli/issues/4472 [source]
- [low] Command names in the plugin manifest must not conflict with existing Atlas CLI commands or commands from other installed plugins. Sources: https://www.mongodb.com/docs/atlas/cli/current/atlas-cli-extend-plugins.md [source]
- The reported Atlas CLI version is 1.53.0 in one source and 1.59.2 in another. Sources: https://github.com/mongodb/mongodb-atlas-cli/issues/4472, https://formulae.brew.sh/formula/mongodb-atlas-cli [source]
- [low] Service account access tokens have a 1 hour (3600 seconds) lifespan and can be reused multiple times during that period. (verified as of 2026-10-15) Sources: https://www.mongodb.com/docs/atlas/api/api-authentication.md [source]
- [low] Atlas hashes the Public Key and Private Key using a unique value called a nonce. Sources: https://www.mongodb.com/docs/atlas/api/api-authentication.md [source]
- [low] The Atlas Administration API does not provide access to the data stored in clusters. Sources: https://www.mongodb.com/docs/atlas/api/api-authentication.md [source]
- [low] Each service account belongs to exactly one organization and can be granted access to any number of projects within that organization. Sources: https://www.mongodb.com/docs/atlas/api/api-authentication.md [source]
- [low] Each pair of API keys belongs to only one organization and can grant access to any number of projects in that organization. Sources: https://www.mongodb.com/docs/atlas/api/api-authentication.md [source]
- [low] New commands are registered in `internal/cli/root/builder.go`. Sources: https://raw.githubusercontent.com/mongodb/mongodb-atlas-cli/master/AGENTS.md [source]
- [low] The MongoDB Atlas SDK logic is located in `go.mongodb.org/[email protected]/mongodbatlas/mongodbatlas.go:585`. (verified as of 2026-10-15) Sources: https://github.com/mongodb/mongodb-atlas-cli/issues/4283 [source]
- [low] The root builder logic is located in `mongodb-atlas-cli-atlascli-v1.50.0/internal/cli/root/builder.go:161`. (verified as of 2026-10-15) Sources: https://github.com/mongodb/mongodb-atlas-cli/issues/4283 [source]
Related concepts
- Atlas — is a part of Atlas CLI Architecture Internals
- CLI — is a part of Atlas CLI Architecture Internals
Children
- No children recorded.