A modern terminal user interface for MongoDB administration — like Compass, but for your terminal.
Built with Python, Textual, and PyMongo. Fast, secure, no web UI needed.
Database Management
- Browse databases, collections, and documents
- Create and drop databases
- View collection stats (document count, size)
- Query documents with JSON filters
- Run aggregation pipelines
User & Role Administration
- Create and delete users
- Reset passwords
- Grant and revoke roles (built-in role picker)
- Browse all users and their permissions
Index Management
- View indexes with size and key info
- Create and drop indexes
- Create search indexes (text & vector search)
- Vector search support with similarity options
Monitoring
- Live performance graphs (connections, ops/s, memory)
- Server stats (version, uptime, storage engine)
- Replica set status and member health
UI
- Compass-like sidebar with database/collection tree
- Tabbed content area
- Formatted document detail view
- Keyboard-driven with mouse support
pip install mongotui# Interactive — shows connection screen
mongotui
# Direct connection
mongotui --uri "mongodb://admin:admin@localhost:27017/?authSource=admin"
# Short form
mongotui -u "mongodb://admin:admin@localhost:27017/?authSource=admin"# Start a local MongoDB instance
docker compose up -d
# Connect
mongotui -u "mongodb://admin:admin@localhost:27017/?authSource=admin"| Key | Action |
|---|---|
q |
Quit |
r |
Refresh |
Ctrl+C |
Force quit |
Escape |
Close modal / go back |
Enter |
Select / expand tree node |
Tab |
Switch between panels |
- Python 3.11+
- Textual — TUI framework
- PyMongo — MongoDB driver
- textual-plotext — Terminal graphs
- Python 3.11+
- MongoDB 4.4+ (standalone, replica set, or Atlas)
- Self-hosted MongoDB deployments
- Internal infrastructure teams
- DevOps and platform engineers
- Development and staging environments
- Secure administration over SSH
- Environments where Compass can't be installed
git clone https://github.com/DevOpsPack/mongotui.git
cd mongotui
pip install -e .
mongotui