All apps/MongoDB Shell

MongoDB Shell

mongosh

The MongoDB Shell is a fully functional JavaScript and Node.js REPL environment for interacting with MongoDB deployments.

Runs as mongosh|macOS, Linux, Windows|www.mongodb.com

Command form

ai-draft · 2 tasks · 10 fields

Open mongosh against a MongoDB deployment. Passwords are left out; mongosh prompts for one when needed.

Opens the form; the finished command lands at your prompt, unrun
otty gui mongosh
Connect with the shellExample values, fixed in this page — nothing here reaches a terminal
Basic
Connection string*
string
Username
string
Authentication database
string
TasksEach one presets the form for one job
Connect
uriusernameauth_db
Local shell
portquiet
ParametersOnly these flags are editable in the form
Connection string
string · positional 0
mongodb://localhost:27017
Port
integer
--port
Username
string
--username-u
Authentication database
string
--authenticationDatabase
Evaluate JavaScript and exit
string
--eval
Stay in the shell after --eval or a script
boolean
--shell
Use TLS
boolean
--tls
Skip startup messages
boolean
--quiet
Do not connect to a database
boolean
--nodb
Skip ~/.mongoshrc.js
boolean
--norc
SourcesEvery flag above is checked against these
fig
completion

github.com

Before it fills your prompt, Otty checks the installed mongosh against its version. A form that does not match your version is not offered.