Preview / Release Candidate — This plugin is not yet production-ready. Expect breaking changes. Feedback welcome.
Atlas CLI plugin that launches mongosh connected to an Atlas cluster — no manual connection string needed.
atlas plugin install mongodb-labs/atlas-cli-plugin-sh@v1.0.0-rc4
Usage
atlas sh --cluster <cluster-name> [--project-id <project-id>] [--profile <profile>]Example
❯ atlas sh --cluster MyCluster
Current Mongosh Log ID: 683a1fc72d4e890b12cd4a77
Connecting to: mongodb+srv://<credentials>@mycluster.rx4kpqz.mongodb.net/?authSource=admin&appName=mongosh+2.7.0
Using MongoDB: 8.0.23
Using Mongosh: 2.7.0
Atlas mycluster-shard-0 [primary] test>
Usage
atlas sh --cluster <cluster-name> --eval "<mongosh expression>"Example
❯ atlas sh --cluster MyCluster --eval "show dbs"
admin 0 B
local 0 B
Any flags not recognized by atlas sh are forwarded verbatim to mongosh.
atlas sh --cluster MyCluster --quiet --norcThe plugin fetches connection credentials from Atlas via the Atlas CLI, stores them securely in the system keychain, then invokes mongosh with the appropriate connection string. On exit, credentials are removed from the keychain.