Decompass quick start
Install the read-only MongoDB GUI, connect to a cluster, and run your first query. All you need is Python 3.10+ and a browser.
1. Install
Decompass is a small Flask app with three dependencies: flask, pymongo, and waitress. From the Decompass project folder, a virtualenv is recommended:
macOS / Linux
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python app.py
Windows
python -m venv .venv
.venv\Scripts\pip install -r requirements.txt
.venv\Scripts\python app.py
Then open http://127.0.0.1:5057. To use a different port, set DECOMPASS_PORT. The server binds to localhost only and is threaded, so a slow query in one tab never blocks another.
2. Connect
- In the sidebar, click + New.
- Enter a name, a MongoDB URI (
mongodb://…ormongodb+srv://…), and an optional default database. - Watch the status dot: green means reachable, red means unreachable, yellow means checking, and a hollow ring means idle (closed after ~5 minutes to save resources; it wakes on use).
Prefer files? Copy connections.example.json to connections.json next to app.py:
{
"connections": [
{ "name": "local", "uri": "mongodb://localhost:27017/", "default_db": null }
]
}
Connection strings are stored in plain text, so keep connections.json private. For production, use a database user that has only the read role. See defense in depth.
3. Run your first query
Click a collection to open it in a tab, type a filter, and press Find (or Ctrl+Enter). The filter box accepts MongoDB shell syntax:
{ status: { $in: ['active', 'trial'] }, plan: 'pro' }
{ _id: ObjectId("507f1f77bcf86cd799439011") }
{ created: { $gte: ISODate("2024-01-01T00:00:00Z") } }
{ name: /^foo/i }
Options ▸ holds projection, sort, skip, limit, and timeout. Then explore the other tabs:
- Schema: field types and presence, inferred from a bounded sample (never a full scan).
- Indexes: keys, flags, and
$indexStatsusage counts. - Explain: plan only by default (instant), with execution stats on request.
- Aggregation pipeline: shift-click a collection, add stages, preview any stage, and export code for mongosh, Python, Node.js, or Java.
4. Need to write? Use mongosh
Right-click a database to launch mongosh connected to it. Decompass looks for $DECOMPASS_MONGOSH first, then mongosh on your PATH. On Windows it opens a new console. On macOS and Linux the launch is best-effort, so you can also connect yourself:
mongosh "mongodb://localhost:27017/shop"
db.users.insertOne({ name: "ada", plan: "pro" })
Optional extras (Windows)
Single-file .exe
pip install pyinstaller
pyinstaller Decompass.spec # → dist\Decompass.exe (~30 MB)
Double-click it to start the server and open your browser. connections.json is written next to the .exe. Builds are per-OS, and some antivirus tools flag one-file PyInstaller executables.
Always-on background task
powershell -NoProfile -ExecutionPolicy Bypass -File service\install-task.ps1
powershell -NoProfile -ExecutionPolicy Bypass -File service\status.ps1
powershell -NoProfile -ExecutionPolicy Bypass -File service\uninstall-task.ps1
It starts at logon without a console window, served by Waitress, and restarts within about a minute if it dies. GET /healthz is a liveness check.
Next: how Decompass stays read-only · FAQ