A MongoDB plugin for Tabularis, the lightweight database management tool.
This plugin enables Tabularis to connect to any MongoDB instance and provides collection browsing, document-level CRUD, index management, and aggregation pipeline execution through a JSON-RPC 2.0 over stdio interface.
Discord - Join our discord server and chat with the maintainers.
- Features
- Supported MongoDB Data Types
- Installation
- How It Works
- Query Syntax
- Supported Operations
- Building from Source
- Development
- Changelog
- License
- Connection — Connect to any MongoDB instance via host/port or full URI, with optional authentication.
- Collection Browsing — List databases, collections, and infer schema by sampling documents.
- Schema Inference — Automatically detects field names and BSON types by sampling up to 100 documents per collection.
- Index Inspection — List collection indexes with name, columns, uniqueness, and primary flag.
- Query Execution — Run
find,findOne,aggregate, andcountqueries using MongoDB shell syntax. - Inline Editing — Insert, update, and delete documents directly from the Tabularis data grid.
- ObjectId Handling — Automatically converts string primary key values to
ObjectIdwhen filtering by_id. - DDL-equivalent Generation — Generates MongoDB shell commands for
createCollection,createIndex,$rename, and more. - Cross-platform — Pre-built binaries for Linux (x86_64, aarch64), macOS (x86_64, aarch64), and Windows (x86_64).
| Category | Types |
|---|---|
| Numeric | Int32, Int64, Double, Decimal128 |
| String | String |
| Date/Time | Date |
| Binary | Binary |
| Other | Boolean, ObjectId, Array, Object |
If your version of Tabularis supports plugin management, the MongoDB plugin can be installed directly from the application.
- Download the latest release for your platform from the Releases page.
- Extract the archive.
- Copy
tabularis-mongodb-plugin(ortabularis-mongodb-plugin.exeon Windows) andmanifest.jsoninto the Tabularis plugins directory:
| OS | Plugins Directory |
|---|---|
| Linux | ~/.local/share/tabularis/plugins/mongodb/ |
| macOS | ~/Library/Application Support/com.debba.tabularis/plugins/mongodb/ |
| Windows | %APPDATA%\com.debba.tabularis\plugins\mongodb\ |
- Restart Tabularis.
The plugin is a standalone Rust binary that communicates with Tabularis through JSON-RPC 2.0 over stdio:
- Tabularis spawns the plugin as a child process.
- Requests are sent as newline-delimited JSON-RPC messages to the plugin's
stdin. - The plugin connects to MongoDB using the official Rust driver and writes responses to
stdout.
Connection state is pooled per URI — the same Client instance is reused for all operations within a session.
The execute_query method accepts two formats:
// Find documents
db.users.find({"age": {"$gt": 18}})
// Find with projection
db.users.find({"active": true}, {"name": 1, "email": 1})
// Find first match
db.orders.findOne({"status": "pending"})
// Aggregation pipeline
db.orders.aggregate([
{"$match": {"status": "shipped"}},
{"$group": {"_id": "$customer_id", "total": {"$sum": "$amount"}}}
])
// Count documents
db.users.countDocuments({"role": "admin"})When Tabularis browses a collection it sends SELECT * FROM collection_name.
The plugin automatically converts this to find({}) on the named collection.
| Method | Description |
|---|---|
test_connection |
Ping the MongoDB server |
get_databases |
List all databases |
get_schemas |
Returns [] (MongoDB has no schemas) |
get_tables |
List collections in the current database |
get_columns |
Infer fields and types by sampling documents |
get_foreign_keys |
Returns [] (no FK constraints in MongoDB) |
get_indexes |
List indexes for a collection |
execute_query |
Run shell-syntax queries with pagination |
insert_record |
Insert a new document |
update_record |
Update a single field by _id (or other PK) |
delete_record |
Delete a document by _id (or other PK) |
get_schema_snapshot |
Full schema dump (all collections + inferred columns) |
get_all_columns_batch |
Inferred columns for all collections |
get_all_foreign_keys_batch |
Returns {} |
get_create_table_sql |
Generates db.createCollection(...) |
get_add_column_sql |
Returns a schemaless note |
get_alter_column_sql |
Generates $rename update command |
get_create_index_sql |
Generates db.collection.createIndex(...) |
get_create_foreign_key_sql |
Returns a not-supported note |
drop_index |
Drops a collection index |
- Rust (edition 2021)
- A running MongoDB instance (for integration tests)
cargo build --releaseThe binary will be located at target/release/tabularis-mongodb-plugin.
A convenience script is provided to build and copy the plugin to the Tabularis plugins directory:
./sync.shTwo development binaries are included:
Connectivity test (requires a local MongoDB on port 27017):
cargo run --bin test
# or with a custom URI:
MONGODB_URI="mongodb://user:pass@host:27017/mydb" cargo run --bin testSimulated Tabularis integration test (spawns the plugin and sends JSON-RPC requests via stdio):
cargo run --bin test_pluginecho '{"jsonrpc":"2.0","method":"test_connection","params":{"params":{"host":"localhost","port":27017,"database":"test"}},"id":1}' \
| ./target/release/tabularis-mongodb-plugin- Language: Rust (edition 2021)
- Database driver: mongodb v3 (official async Rust driver)
- Serialization: serde + serde_json + bson
- Async runtime: tokio
- Protocol: JSON-RPC 2.0 over stdio
Apache License 2.0
