{"schemaVersion":"opencli.cli.v1","slug":"mongosh","name":"MongoDB Shell","shortName":"mongosh","binaryName":"mongosh","maker":{"slug":"mongodb","name":"MongoDB","type":"org","url":"https://mongodb.com","officialPlatformMaker":true,"featuredBuilder":false},"category":"Database","description":"The official CLI from MongoDB. MongoDB, database inspection, and queries from the terminal.","tagline":"MongoDB, database inspection, and queries from the terminal.","install":{"packageManager":"brew","command":"brew install mongosh","packageName":null,"npmPackage":null,"brewFormula":null,"brewCask":null,"crateName":null,"pypiPackage":null,"goPackage":null,"dockerImage":null},"verify":{"command":"mongosh --version","signal":"mongosh responds locally and is ready for the first real command."},"quickStart":"mongosh --version","exampleWorkflow":["mongosh --version"],"agent":{"readiness":{"label":"Usable with guardrails","score":50,"reasons":["Supports non-interactive/scripted use.","Works well in CI or repeatable automation."],"guardrails":["Prefer small commands and ask the agent to summarize plain text output.","Require confirmation before apply, delete, deploy, transfer, merge, or write actions."]},"packUrl":"https://opencli.co/cli/mongosh/agent.md","packMarkdown":"# OpenCLI Agent Pack: MongoDB Shell\n\nUse this when an AI agent needs to work with `mongosh`.\n\n## What this CLI is for\nThe official CLI from MongoDB. MongoDB, database inspection, and queries from the terminal.\n\nBest for: mongodb, database inspection, and queries from the terminal.\n\n## Agent readiness\nUsable with guardrails (50/100)\n- Supports non-interactive/scripted use.\n- Works well in CI or repeatable automation.\n\n## Install\n```sh\nbrew install mongosh\n```\n\n## Verify before real work\n```sh\nmongosh --version\n```\nExpected signal: mongosh responds locally and is ready for the first real command.\n\n## Safe starting commands\n```sh\nmongosh --version\n```\n\n## Guardrails for agents\n- Prefer small commands and ask the agent to summarize plain text output.\n- Require confirmation before apply, delete, deploy, transfer, merge, or write actions.\n\n## Suggested agent instruction\nYou may use MongoDB Shell (`mongosh`) for mongodb, database inspection, and queries from the terminal.. First install it if missing, then run the verify command. Start with read-only or inspection commands. Summarize what you found before changing anything. Ask for confirmation before commands that mutate remote state, spend money, deploy, delete data, merge code, or expose secrets.\n\nSource: OpenCLI\n"},"fit":{"bestFor":"mongodb, database inspection, and queries from the terminal.","useThisIf":"You're on MongoDB and want the official terminal experience.","skipIf":"You don't work with databases.","whatHappensNext":"Run `mongosh --version` and see what comes back."},"capabilities":{"agentFriendly":true,"supportsJsonOutput":false,"supportsNonInteractive":true,"supportsDryRun":false,"requiresAuth":false,"requiresNetwork":false,"ciFriendly":true,"localFirst":false,"destructivePotential":"high"},"taxonomy":{"useCases":["MongoDB","Database inspection","Queries"],"aliases":[],"keywords":["mongodb","database","nosql"],"tags":[]},"links":{"website":"https://www.mongodb.com/docs/mongodb-shell/","github":"https://github.com/mongodb-js/mongosh","docs":"https://www.mongodb.com/docs/mongodb-shell/","opencli":"https://opencli.co/cli/mongosh","markdown":"https://opencli.co/cli/mongosh/agent.md","json":"https://opencli.co/cli/mongosh.json"},"metrics":{"githubStars":388,"latestRelease":"2026-06-08T02:26:24Z","license":"Apache-2.0","metricLabel":"Homebrew installs (30d)","metricValue":9365,"metricSource":"homebrew","metricAsOf":"2026-06-08T11:01:11.748Z"}}