macOS
brew install mongoshlocal Homebrew formula metadata
brew
MongoDB Shell to connect, configure, query, and work with your MongoDB database. Version 2.9.2 via Homebrew; verified 2026-07-02.
install
brew install mongoshlocal Homebrew formula metadata
nix profile install nixpkgs#mongoshnixpkgs package indexes · pkgs/by-name/mo/mongosh/package.nix · source: api.github.com
scoop install extras/mongoshScoop official bucket manifest trees · bucket/mongosh.json · source: api.github.com
overview
MongoDB Shell to connect, configure, query, and work with your MongoDB database
history
mongosh is the MongoDB Shell, MongoDB's modern JavaScript and Node.js REPL for interacting with MongoDB deployments in Atlas, local installations, or remote hosts. MongoDB introduced the first preview on 2020-06-08 after deciding that extending the legacy mongo shell was not the right path for a growing MongoDB platform.
The redesign focused on a shell that could be extensible, embeddable in other products, and easier to use in terminals. The public changelog records mongosh v1.0 on 2021-07-09, after a preview series that added features such as transactions support, AWS IAM authentication, script loading, --eval, .mongoshrc.js customization, MongoDB 5.0 support, Stable API-aware autocomplete, and snippets. The GitHub repository is a monorepo for shell components across REPL, browser, Compass, and related environments.
Users run mongosh to test queries, inspect and change data, configure settings, and script database operations with shell helpers on top of the MongoDB driver. MongoDB distributes it as an Apache-2.0 standalone product separate from the MongoDB Server, and package managers such as Homebrew, Nix, and Scoop make it available independently from server releases.
security posture
broad file, network, media, or database tool signal. generalized runtime or code generation signal.
yellow risk · medium confidence · runtime
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
executables
| Command | Kind | Exposure | Note |
|---|---|---|---|
mongosh | cli | global executable |
freshness
These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.
https://www.mongodb.com/try/download/shell
install metadata
| Package key | brew:mongosh |
|---|---|
| Version | 2.9.2 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/mongosh |
| Homepage | https://www.mongodb.com/try/download/shell |
| Repository | https://github.com/mongodb-js/mongosh |
| Upstream docs | https://www.mongodb.com/docs/mongodb-shell |
| License | Apache-2.0 |
| Source archive | https://registry.npmjs.org/@mongosh/cli-repl/-/cli-repl-2.9.2.tgz |
| Last updated | 2026-07-02T16:39:47Z |
| Pulse | updated |
| Dependencies | node |
| Bottle | available (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | not defined |
| Service | none declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | mongosh |
| Version Scheme | 0 |
| Revision | 0 |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
mongosh
nix profile install nixpkgs#mongoshextras/mongosh
scoop install extras/mongoshsource trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.