# Install mongosh with Homebrew, Nix, scoop

MongoDB Shell to connect, configure, query, and work with your MongoDB database. Version 2.9.2 via Homebrew; verified 2026-07-02.

## Install

```sh
sudo av install brew:mongosh
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install mongosh
```

  Evidence: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#mongosh
```

  Evidence: nixpkgs package indexes: pkgs/by-name/mo/mongosh/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

### Windows

- Scoop (92%):

```sh
scoop install extras/mongosh
```

  Evidence: Scoop official bucket manifest trees: bucket/mongosh.json from https://api.github.com/repos/ScoopInstaller/Extras/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:mongosh
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/mongosh>
- **Version:** 2.9.2
- **Source summary:** MongoDB Shell to connect, configure, query, and work with your MongoDB database
- **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
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- mongosh (cli)
- mongosh (alias)

## Dependencies

- node

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 2.9.2
- Package-manager updated: 2026-07-02
- Local data: ok
- Upstream repository: https://www.mongodb.com/try/download/shell
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

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.

### Project history

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.

### How it is used

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.

### Sources

- <https://formulae.brew.sh/formula/mongosh>
- <https://github.com/mongodb-js/mongosh>
- <https://www.mongodb.com/company/blog/product-release-announcement/introducing-the-new-shell>
- <https://www.mongodb.com/docs/mongodb-shell/>
- <https://www.mongodb.com/docs/mongodb-shell/changelog/>
- <https://www.mongodb.com/try/download/shell>


## Security Notes

broad file, network, media, or database tool signal. generalized runtime or code generation signal.

- **Geiger risk:** yellow / medium
- broad file, network, media, or database tool signal
- generalized runtime or code generation signal

## Source Database Details

- **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:** stable

## Other Package-Manager Records

- Nix - mongosh: normalized package name match | nixpkgs package indexes: pkgs/by-name/mo/mongosh/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Scoop - extras/mongosh: normalized package name match | Scoop official bucket manifest trees: bucket/mongosh.json from https://api.github.com/repos/ScoopInstaller/Extras/git/trees/master?recursive=1


## Related links

- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [node](https://www.automicvault.com/pkg/brew/node/) - Runtime dependency declared by Homebrew.
- [litecli](https://www.automicvault.com/pkg/brew/litecli/) - Shares av.db curated category or tags: cli, database, database-client, developer-tools.
- [dbhash](https://www.automicvault.com/pkg/brew/dbhash/) - Shares av.db curated category or tags: cli, database, developer-tools.
- [neonctl](https://www.automicvault.com/pkg/brew/neonctl/) - Shares av.db curated category or tags: cli, database, developer-tools.
- [sqlcmd](https://www.automicvault.com/pkg/brew/sqlcmd/) - Shares av.db curated category or tags: cli, database, developer-tools.
- [chalk-cli](https://www.automicvault.com/pkg/brew/chalk-cli/) - Shares av.db curated category or tags: cli, developer-tools, javascript.
- [dblab](https://www.automicvault.com/pkg/brew/dblab/) - Shares av.db curated category or tags: cli, database, database-client, developer-tools.
- [fx](https://www.automicvault.com/pkg/brew/fx/) - Shares av.db curated category or tags: cli, developer-tools, javascript.
- [harlequin](https://www.automicvault.com/pkg/brew/harlequin/) - Shares av.db curated category or tags: cli, database, database-client, developer-tools.
- [mongosh](https://www.automicvault.com/pkg/npm/mongosh/) - Same normalized package name appears in another local ecosystem. Shared terms: mongodb, mongosh, repl, shell.
- [mongocli](https://www.automicvault.com/pkg/brew/mongocli/) - Local package facts share a topical domain. Shared terms: cli, developer, developer-tools, mongodb, your.
- [mongosh](https://www.automicvault.com/pkg/npm/mongosh/) - Same normalized package name in another local ecosystem.

## Combined YAML source

View the package source record on GitHub. [combined/mongosh.yml](https://github.com/automic-vault/db/blob/main/combined/mongosh.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
