Click an ObjectId, jump to the document it points to.
A local, read-only MongoDB GUI and database browser built around the one thing every other
Mongo viewer is missing: following a reference. They all show you documents. None of them
let you click customerId and land on the customer.
echo 'MONGO_URI=mongodb://localhost:27017/my-database' > .env
npx mongo-weaverThat is the whole install. The published package ships the server and the UI both prebuilt, so nothing compiles on your machine and there is no build step to fail. One process serves the API and the UI on one port; open the URL it prints.
See it working on a public sample database → — a one-minute tour on
MongoDB's sample_mflix, from a raw ObjectId column to clicking through to the movie.
Navigation
- Click a relation in any cell to open the document it points to
- Breadcrumb stack, so you can walk back out the way you came in
- Tabs, deduplicated by target; Cmd-click a relation to open one
- "Referenced by" rail on every document, listing what points at it
- Paste an
_idanywhere to jump straight to that document ⌘Kpalette over tabs, favourites, collections and settings- Shareable URLs — every view is a real route
Table
- Server-side paging, sorting and filtering
- Columns discovered by sampling the collection's real field shapes
- Drag to reorder, resize, pin to either edge, hide — all persisted
- A hidden column is not read from the database, so hiding a heavy field makes pages faster
- Formatters for currency, dates, numbers and booleans
- String arrays render as coloured tag chips
- Click a value to filter by it
Filtering
- Free text, booleans, enums, and async multi-select for large value sets
- Dates: single day, range, or a relative window — timezone-aware throughout
- Number ranges and comparisons
- "Is set" / "is not set"
- Save any filter as a named view, per collection
- Baseline filters that always apply, with a peek-and-restore toggle
Configuration, from the UI
- Rename collections and columns
- Choose which field labels a document in links and breadcrumbs
- Set default filters and sorts per collection
- Hide a field from the table, the detail view, or both
- Confirm or reject discovered relations in bulk
- It is read-only. No query it issues can modify a document. The only files it ever writes are its own metadata.
- Relations are declared, never inferred. Discovery proposes; you confirm. A heuristic
that silently accepted
customerId → customerswould eventually navigate to the wrong document, which looks like data corruption rather than a bug in a viewer. - Your connection string never reaches an argument. It is read from
MONGO_URI, and there is deliberately no--uriflag: an argument is written to your shell history and shown inpsto every user on the machine. Nothing is stored, so there is no credential store to secure or leak either. - What it learns about your database is shareable; what it learns about you is not. Relations, labels and titles go in a file you commit. Your column widths and favourites stay on your machine.
There is nothing to write before you start. Point it at a database and it reads the collections, samples their field shapes and proposes the references it can find. Set titles, labels, relations, formatters, filters and sorts as you browse; they save as you go.
Two files hold what you set, split by who each part is for:
| File | Holds | Commit it? |
|---|---|---|
mongo-weaver.json |
What the tool learned about the database: relations, labels, titles, filters, sorts | Yes. It hands the rest of your team a head start |
.mongo-weaver.local.json |
Your favourites, column widths, rail order, saved filters, schema cache | No — it is per-machine, and gitignored |
The two never hold the same key, so there is no precedence rule to learn.
An optional mongo-weaver.config.js covers the one thing JSON cannot express: a relation
whose target has to be computed, or a label that has to be built. Anything else declared
there is refused at startup, by name, pointing at the control that sets it. Most people never
need one — copy mongo-weaver.config.example.js if you do.
mongo-weaver [--env <path>] [--port <n>] [--config <path>] [--overlay <path>]
| Flag | Default |
|---|---|
--port |
PORT, else 1396 and up |
--config |
mongo-weaver.config.js in the cwd |
--overlay |
.mongo-weaver.local.json beside the config |
--env |
.env in the cwd |
--version and --help do what you expect. The connection string is not a flag; it comes
from MONGO_URI, which --env points at.
The port picks itself. Name one and you get that port or an error — a named port is a promise to a bookmark or a proxy. Name nothing and it starts at 1396, taking the next free port if that one is busy, because running several instances is the ordinary case here.
Several databases at once. Every input is a flag, so a second instance is the same command with a different three, and it finds its own port:
mongo-weaver --env .env.orders --config orders.config.js --overlay .orders/.mongo-weaver.local.json
mongo-weaver --env .env.billing --config billing.config.js --overlay .billing/.mongo-weaver.local.jsonThe startup banner prints the port, env file, config and overlay each instance resolved, so
you can tell at a glance which window is which. --overlay moves both files together —
mongo-weaver.json always sits beside the one you name.
The env flag is
--env, not--env-file. Node reserves that name and validates it wherever it appears, so--env-filewould be intercepted before this program ever started.
Release notes are on the Releases page, generated from the commit log.
The workspace layout, how to run it from source, and the release process are in CONTRIBUTING.md.
MIT — see LICENSE.