RED Docs

MongoDB

The document shell - collections, filters, schema profiling, and indexes.

A mongodb:// or mongodb+srv:// connection opens a dedicated document shell: a tabbed workspace like the SQL and Redis ones, with the same window chrome, status bar, collapsible sidebar (⌘BCtrl+B), panes and docked AI panel.

The sidebar is a database → collection tree, listing collections with estimated counts, storage size, and view / time-series badges. Selecting one opens it in a tab. The same collection can open several times, each with its own filter and edits, and tabs are reorderable and pinnable.

Panels

Each collection tab has four panels:

PanelWhat it shows
DocumentsThe document grid and its filter bar
QueryAn aggregation-pipeline editor and its results
SchemaThe inferred schema: each field's type distribution and how often it is present
IndexesKeys and their unique / sparse / TTL / partial properties

Documents

Documents stream into a continuously scrolling grid - a column per top-level field - that fetches a window at a time and never loads a collection whole. Paging is keyset-based over _id, the same discipline the SQL result grid uses.

Three render modes switch how documents display:

  • Table - a sampled-column table, the compact default.
  • List - one expandable card per document, a per-field tree with nested object and array drill-down.
  • JSON - one pretty extended-JSON block per document.

An extended-JSON find filter narrows the view. The inspector shows a document as pretty-printed extended JSON that preserves BSON types (ObjectId, dates, decimals, binary).

Query and Explain

The Query panel runs an aggregation pipeline into a results grid. Explain reports the winning plan, the index used, and documents examined versus returned, so a missing index is visible rather than inferred.

Where a collection declares a JSON-schema validator, it is shown.

Editing

On a writable connection, a document can be edited two ways:

  • Form editor - field by field, with editable names, a searchable type picker, collapsible nested objects and arrays, and _id kept read-only.
  • Raw editor - extended JSON, edited directly.

Insert, delete, clone, and drop are available. Destructive operations sit behind an explicit confirm - the drop-collection confirm is server-gated and always asks - and every write is refused on a read-only connection. See Safety and guards.

Keyboard

KeyAction
/ Move the selection (collection tree, document grid)
/ Collapse / expand a database
/ F2Open the highlighted collection / document
⌘FCtrl+FSearch collections (tree) or filter documents (grid)

Hold Alt for the panel jump keys, F6 / ⇧F6Shift+F6 to cycle focus, and the optional vim motions (hjkl, g / G, Ctrl-d / Ctrl-u) work throughout.

Server panel

The Server panel carries MongoDB's overview metrics and a Sessions view over $currentOp, ordered longest-running first, with a guarded kill. RED never offers to kill its own connection.

AI

The assistant (⌘LCtrl+L) is grounded in the deployment: it inspects it, profiles schemas and type drift, samples and queries documents, discovers references, fetches by _id, runs aggregations, and explains queries to flag missing indexes. At the write tier it proposes document, index, or collection operations to approve behind the same gates as the manual path. See AI assistant.

On this page