⚠️ Independent community project — not an official MongoDB product. For local development, demos, and learning only. Do not use in production.

Docker-powered local labs

MongoDB labs up in seconds.

A Node.js CLI to spin up local MongoDB environments with Docker — designed for learning, demos, and development. Standalone, replica set, sharded cluster, Atlas Search, and Queryable Encryption. No Atlas account needed.

...
total downloads
...
GitHub stars
3
labs available
Terminal

Everything you need to learn MongoDB

From a simple single node to a full sharded cluster — spin up any topology with one command, built for learning and local development.

🖥️

Standalone Node

The simplest setup — a single MongoDB instance. Perfect for getting started, quick prototyping, or running Search experiments.

🔁+ Search

Replica Set

Multi-node replica set with automatic primary election. Supports up to N replicas, built-in failover, and oplog for change streams.

🗂️

Sharded Cluster

Full sharded topology with config servers, mongos routers, and multiple shards. Includes quickstart scripts for shard key configuration.

🔍Atlas Search

MongoDB Search

Enable Atlas Search (mongot) on standalone or replica set topologies. Comes with sample data and a quickstart to run full-text queries.

🔐QE Lab

Queryable Encryption

Demo local KMS-based Queryable Encryption on a replica set. Automatically creates data keys, encrypted collections, and runs end-to-end demos.

🎯

Interactive Menu

Don't remember the flags? Just run `mongodb-cli-lab` and navigate a full interactive menu to set up, inspect, and tear down your lab.

Get started in 2 steps

Only prerequisite: Docker running on your machine.

1

Install globally via npm

Install
$ npm install -g @ricardohsmello/mongodb-cli-lab
2

Pick a topology and start

Start
# Option A — interactive
$ mongodb-cli-lab
# Option B — direct command
$ mongodb-cli-lab up --topology replica-set --replicas 3 --mongodb-version 8.2 --port 28000

Pick your topology

Each one is one command away.

Standalone
# Simple single-node MongoDB
$ mongodb-cli-lab up --topology standalone --mongodb-version 8.2 --port 28000
✓ Pulling MongoDB 8.2 image...
✓ Starting standalone node on port 28000
✓ Lab is ready! Connect: mongodb://localhost:28000

Feature labs

Go deeper with dedicated labs for MongoDB's most powerful features.

🔍

MongoDB Search Lab

Atlas Search

Experiment with full-text search locally. The quickstart spins up a replica set with mongot, loads sample data, and runs search queries — ready to explore in minutes.

Search quickstart
$ mongodb-cli-lab quickstart --topology replica-set --replicas 3 --search --mongodb-version 8.2 --port 28000
✓ Replica set started
✓ mongot (Search engine) enabled
✓ Sample data loaded
✓ Search indexes created — ready to query!
🔐

Queryable Encryption Lab

QE Lab

Learn how Queryable Encryption works in practice. The quickstart generates keys, creates an encrypted collection, and demonstrates querying encrypted fields — all locally.

QE quickstart
# Start a replica set first, then:
$ mongodb-cli-lab qe quickstart
✓ Master key generated
✓ Data keys created
✓ Encrypted collection ready
✓ Fields encrypted at rest and still queryable!

Command reference

All the commands at a glance.

CommandDescription
mongodb-cli-labOpen the interactive menu
mongodb-cli-lab upStart a lab with a given topology
mongodb-cli-lab statusShow status of the running lab
mongodb-cli-lab downStop the running lab
mongodb-cli-lab cleanRemove all containers and volumes
mongodb-cli-lab quickstartRun a quickstart script for the topology
mongodb-cli-lab qe quickstartQueryable Encryption quickstart
mongodb-cli-lab qe setupCreate a custom QE demo collection
mongodb-cli-lab qe statusShow Queryable Encryption lab status

Key flags for mongodb-cli-lab up:

--topology standalone | replica-set | sharded
--mongodb-version e.g. 8.2
--port e.g. 28000
--replicas number of replica members
--shards number of shards (sharded only)
--search enable MongoDB Search
--sample-databases all or comma-separated names

💡 Why this tool?

  • 100% local — everything runs on your machine via Docker
  • Learn MongoDB topologies hands-on through real experimentation
  • Explore Search and Queryable Encryption in a safe local sandbox
  • Spin up and tear down labs instantly, with zero side effects
  • Great for workshops, study sessions, and hands-on learning

⚠️ Disclaimer

This is an independent community project — not an official MongoDB product.

It is intended for local development, demos, testing, and learning only. Do not use in production environments.

Ready to spin up a local cluster?

One command. No account. No cloud. Just Docker.

$ npm install -g @ricardohsmello/mongodb-cli-lab