id = "mongocli" name = "MongoDB CLI" homepage = "https://www.mongodb.com/docs/mongocli/current/" description = "The MongoDB CLI is a modern command line interface that enables you to manage your MongoDB services from the terminal." icon = "SimpleIcons:mongodb" # `mongocli` drives Cloud Manager and Ops Manager. The Atlas CLI (`atlas`) is a # different binary with its own directory — see apps/mongodb-atlas-cli.toml, # which describes atlascli/config.toml. The two do not share a file. executables = ["mongocli"] [dotfiles] # https://www.mongodb.com/docs/mongocli/current/configure/configuration-file/ # gives the config directory as %AppData%/mongocli on Windows, # /Users/{username}/Library/Application Support/mongocli on macOS and # $XDG_CONFIG_HOME/mongocli (defaulting to $HOME/.config/mongocli) on Linux — # one location under three names, which is [appData]. The file is config.toml # (internal/config/profile.go: configType = "toml"). paths = ["[appData]/mongocli/config.toml"] exclude = [] # The file is a set of named profiles. org_id, project_id, service, output and # the Ops Manager URL are ordinary settings worth carrying between machines, so # only the credential fields inside it are lifted out. secret = [] side_effect = false # The field names are the ones declared in internal/config/profile.go: the API # key pair, the tokens from `mongocli auth login`, and the AWS key pair the # standby-cluster commands use to talk to S3 directly. The docs page above also # warns that the API keys are stored in plaintext. [[dotfiles.secret_paths]] file = "[appData]/mongocli/config.toml" match = { key_path = [ "*.public_api_key", "*.private_api_key", "*.access_token", "*.refresh_token", "*.standby_clusters_aws_access_key_id", "*.standby_clusters_aws_secret_access_key", ] } # ops_manager_ca_certificate is documented as "path to a PEM-encoded CA # certificate" — a file on this machine's disk, so the path does not travel. # The user put that PEM there themselves, so the path is kept for rebuilding # this machine and never handed to a box that has no such file. [[dotfiles.machine_lines]] file = "[appData]/mongocli/config.toml" match = { key_path = ["*.ops_manager_ca_certificate"] } scope = "backup" [commands] format = 1 label = "mongocli" description = "Manage MongoDB Cloud Manager and Ops Manager. Use the tabs for login and whoami; other services are left out." quality = "ai-draft" base = "fig:mongocli" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/mongocli.ts" license = "MIT" [[commands.subcommand]] path = ["login"] label = "Log in" description = "Authenticate with MongoDB Atlas, or Cloud Manager with the matching switch." parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/mongocli.ts" license = "MIT" [[commands.subcommand.field]] id = "cm" label = "Log in to Cloud Manager" type = "boolean" option = ["--cm"] sources = ["fig"] [[commands.subcommand.field]] id = "gov" label = "Log in to Atlas for Government" type = "boolean" option = ["--gov"] sources = ["fig"] [[commands.subcommand.field]] id = "login_only" label = "Skip profile configuration" type = "boolean" option = ["--loginOnly"] sources = ["fig"] [[commands.subcommand.field]] id = "no_browser" label = "Do not open a browser" type = "boolean" option = ["--noBrowser"] sources = ["fig"] [[commands.subcommand.task]] id = "login" label = "Log in" fields = ["cm", "gov", "no_browser"] required = [] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["cm", "gov", "login_only", "no_browser"] [[commands.subcommand]] path = ["whoami"] label = "Show authentication state" description = "Verify and display the current authentication state." parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/mongocli.ts" license = "MIT"