CLI flags
mongoscope startup flags for log paths and ephemeral live connect
Start MongoScope from a terminal. Use flags to skip Welcome, point at a log directory, or open a session-only live connection.
Show help or version
mongoscope --help
mongoscope --versionDuring development:
bun start --helpbun link exposes mongoscope on your PATH (same entry as bun start). bun run build produces a separate standalone binary at dist/mongoscope.
| Flag | Description |
|---|---|
-h, --help | Print help and exit |
-v, --version | Print version and exit. Release binaries use the embedded release version; development builds fall back to package.json. |
Flags
| Flag | Required | Default | Description |
|---|---|---|---|
--log-dir | No | . | Second Welcome log list (alongside /var/log/mongodb) |
--log-path | No | — | Parse this log file on startup and skip the picker. Must be an existing file; invalid paths exit 1. |
--uri | No | — | Ephemeral live connect for this session (not saved to the credential store) |
--host | With discrete flags | — | Host for a built URI |
--port | No | 27017 when building a URI | Port for a built URI |
--username | No | — | Username for a built URI |
--password | No | — | Password for a built URI (requires --username) |
--auth-db | No | — | authSource for a built URI |
Mutual exclusion
Use either --uri or the discrete --host / --port / --username / --password / --auth-db set — not both. --host is required when any of the other discrete flags are set. Password without username fails.
Ephemeral connect
CLI connection flags activate a session-only live connection (cli-ephemeral). Credentials are not written to Bun.secrets or config.json. Save a profile in the app when you need persistence — see Connections.
Startup combinations
| Flags | Behavior |
|---|---|
| No flags | Welcome screen |
--log-path PATH | Parse PATH (static Slow Queries / Logs), open dashboard |
| Connection flags only | Open dashboard; Slow Queries and Logs start in Live mode |
--log-path + connection flags | Parse the log (static sources) and connect in parallel |
Examples
Parse a log file:
mongoscope --log-path /var/log/mongodb/mongod.logOpen with a session-only URI (replace placeholders):
mongoscope --uri 'mongodb://USER:PASSWORD@HOST:27017/?authSource=admin'Build a URI from discrete flags:
mongoscope --host HOST --port 27017 --username USER --password PASSWORD --auth-db adminList logs from a custom directory on Welcome:
mongoscope --log-dir /path/to/logs