v0.3.0Export to JSON, CSV & Markdown

MongoDB diagnostics,
right in your terminal.

Find slow queries, watch live operations, check replication lag, audit indexes and tail logs — one keyboard-driven TUI. No browser, no agent.

$ curl -fsSL https://raw.githubusercontent.com/prodioslabs/mongoscope/main/install.sh | bash
  • macOS · Linux · Windows
  • Works offline on log files
  • MIT licensed

What you get

Five views. One keystroke apart.

Every card below is a working demo. Click the controls, or hover a card and use the same keys as the app.

1

Slow Queries

Static + LiveDocs

Groups slow log lines into query shapes. Sort by count, avg ms, plan, or regression (`g`, static). Open a row for details — History compares early vs late in the current log tail.

Sort
NAMESPACEOPCOUNTAVG MS ▾PLAN
filter
{ status: "processing" }
examined/ret
4.2M / 12
suggested
{ status: 1, createdAt: -1 }
2

Live Ops

LiveDocs

currentOp, polled every second. Long-running and COLLSCAN ops stand out, and you can kill one without leaving the keyboard.

OPIDNSSECSPLAN
polling every 1s · 3 active · 1 COLLSCAN
3

Replication

LiveDocs

Topology, oplog window and a lag trend for every member. Click a member to see its trend.

lag · rs0-c · ~10mpeak 27.0s
oplog 41h 12m 62% full
4

Indexes

LiveDocs

Sizes, $indexStats ops and in-progress builds, plus the index Slow Queries suggests.

Sort
app.orders1/3
INDEXOPSSIZE
_id_2.1M48MB
createdAt_-112k40MB
customerId_1884k31MB
status_1_createdAt_-118%

suggested { status: 1, createdAt: -1 } from Slow Queries · building 18%

x

Export

New in v0.3.0Docs

Writes every pattern to JSON, CSV or Markdown, in your current sort order (try re-sorting Slow Queries). Credentials and URIs are never included.

[
  {
    "namespace": "app.orders",
    "op": "find",
    "count": 1248,
    "avgMs": 842,
    "plan": "COLLSCAN"
  },
  … 3 more patterns
]
./slow-queries.json · by avg ms
5

Logs

Static + LiveDocs

Tail the analysed log file, or poll getLog live. Toggle components, search, and pause the stream with space.

12:04:11 I NETWORK Connection accepted from 10.0.4.21:52144 (38 open)
12:04:13 W COMMAND Slow query app.orders find 842ms COLLSCAN
12:04:15 I STORAGE WiredTiger checkpoint complete in 1.2s
12:04:17 W REPL rs0-c:27017 is 18s behind the primary
12:04:19 I WRITE Slow update app.sessions 48ms keysExamined: 1 docsExamined: 1
12:04:21 I COMMAND Slow query app.users aggregate 214ms IXSCAN
12:04:23 I STORAGE Index build status_1_createdAt_-1 on app.orders: 1.1M docs scanned
● following · 5/5 components

Up in a minute

Install, point, explore.

No server, no agent, no port. Bring a log file or a connection string.

  1. 1Install

    Terminal
    curl -fsSL https://raw.githubusercontent.com/prodioslabs/mongoscope/main/install.sh | bash
  2. 2Point it at something

    Analyse a log file offline, or connect live.

    Offline — parse a log file

    Terminal
    mongoscope --log-path ./mongod.log

    Live — session-only connection

    Terminal
    mongoscope --uri mongodb://localhost:27017
  3. 3Explore with the keyboard

    Switch tabs with 1–5, open anything with Ctrl K, press ? for help.

    c count · a avg · p plan · g regr · enter details

Building from source? Contributor setup (clone, bun install, bun start).

Keyboard first

Never reach for the mouse.

MongoScope’s global keys work on this page too. Go on, press t, or click a key.

Move around

jump to a tab
next tab

Make it yours

light / dark · …
cycle theme · gruvbox

Everything else

+
command palette
help
quit
mongoscope · Slow Queries · gruvbox
1 Slow2 Live3 Repl4 Indexes5 Logs

Waiting for a key… try t, m or 1–5

? help · ctrl+k palette · q quit
Inside tabs:Slow QueriescapxLive OpsxeIndexesso[]Logsspace/fAll shortcuts →

Stop guessing why Mongo is slow.

Free and open source. Install in one line.

Get started