AptLynx

Command-line tool

mongosh

brew/mongosh

Checked 26 Oct 2026, 08:31 UTC · Still published on npm

MongoDB Shell to connect, configure, query, and work with your MongoDB database mongosh mongodb mongo shell

At a glance

Type
Command-line tool
Install on
Windows, macOS, Linux
Last checked
26 Oct 2026, 08:31 UTC

Install it

Windows

npm install -g @mongosh/cli-repl
npm install -g mongosh
scoop bucket add extras; scoop install extras/mongosh

macOS

brew install mongosh
npm install -g @mongosh/cli-repl
npm install -g mongosh

Linux

brew install mongosh
npm install -g @mongosh/cli-repl
npm install -g mongosh

Connect to a local database on the default port (`mongodb://localhost:27017`)

mongosh

Connect to a database

mongosh --host host --port port db_name

Authenticate using the specified username on the specified database (you will be prompted for a password)

mongosh --host host --port port --username username --authenticationDatabase authdb_name db_name

Browse

Related command-line tools

Listing text is written by the maker; AptLynx lists tools and does not vouch for them. Find another tool · Browse by topic · For agents