npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ricardohsmello/mongodb-cli-lab

v2.1.1

Published

CLI to create a local MongoDB sharded cluster using Docker

Readme

mongodb-cli-lab

npm version npm downloads License: MIT

A Node.js CLI to spin up local MongoDB labs with Docker — standalone, replica set, sharded cluster, MongoDB Search, and Queryable Encryption labs.

Website: mongodb-cli-lab.vercel.app

⚠️ Disclaimer

This is an independent project and is not an official MongoDB product. It is intended for local development, demos, testing, and learning purposes only.

⚠️ Do not use this tool in production environments.

Table of Contents


Features

  • Interactive menu to create and manage labs
  • Standalone MongoDB node
  • Replica set
  • Sharded cluster
  • MongoDB Search on standalone and replica-set
  • Queryable Encryption lab on replica-set
  • Quickstart scripts for sharding, Search, and Queryable Encryption flows
  • Sample database loading (--sample-databases)

Prerequisites


Installation

Install globally via npm:

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

Or run directly from source:

node src/cli.js

Usage

Interactive Menu

Launch the interactive menu to set up and manage your lab:

mongodb-cli-lab

From the menu you can:

  • Set up a cluster (standalone, replica set, or sharded)
  • Open the Search lab
  • Open the Queryable Encryption lab
  • Work with data and sharding
  • Manage the cluster lifecycle

Commands

| Command | Description | |---------------------------|--------------------------------------------------| | mongodb-cli-lab | Open the interactive menu | | mongodb-cli-lab up | Start a lab with the given topology and options | | mongodb-cli-lab status | Show the status of the running lab | | mongodb-cli-lab down | Stop the running lab | | mongodb-cli-lab clean | Remove all lab containers and volumes | | mongodb-cli-lab quickstart | Run a quickstart script for the given topology | | mongodb-cli-lab qe quickstart | Run the Queryable Encryption quickstart on the current cluster | | mongodb-cli-lab qe setup | Create a custom Queryable Encryption demo collection | | mongodb-cli-lab qe status | Show Queryable Encryption lab status |

Options

| Flag | Values | Description | |-------------------------------|---------------------------------------------|----------------------------------------------------------| | --topology | standalone, replica-set, sharded | MongoDB topology to create | | --mongodb-version | e.g. 8.2 | MongoDB Docker image version | | --port | e.g. 28000 | Host port to expose | | --replicas | integer | Members in replica-set; members per shard in sharded | | --shards | integer | Number of shards (only for sharded) | | --search | — | Enable MongoDB Search (only for standalone/replica-set) | | --sample-databases | comma-separated names or all | Load sample databases after setup |


Examples

Standalone

Without Search:

mongodb-cli-lab up --topology standalone --mongodb-version 8.2 --port 28000

With Search:

mongodb-cli-lab up --topology standalone --search --mongodb-version 8.2 --port 28000

Replica Set

Without Search:

mongodb-cli-lab up --topology replica-set --replicas 3 --mongodb-version 8.2 --port 28000

With Search:

mongodb-cli-lab up --topology replica-set --replicas 3 --search --mongodb-version 8.2 --port 28000

Search quickstart:

mongodb-cli-lab quickstart --topology replica-set --replicas 3 --search --mongodb-version 8.2 --port 28000

Queryable Encryption quickstart on the current cluster:

mongodb-cli-lab qe quickstart

Sharded Cluster

Basic:

mongodb-cli-lab up --topology sharded --shards 2 --replicas 3 --mongodb-version 8.2 --port 28000

With sample databases:

mongodb-cli-lab up --topology sharded --shards 2 --replicas 3 --mongodb-version 8.2 --port 28000 --sample-databases all

Sharding quickstart:

mongodb-cli-lab quickstart --topology sharded --shards 2 --replicas 3 --mongodb-version 8.2 --port 28000

Note: MongoDB Search is only supported on standalone and replica-set topologies.

Note: Queryable Encryption lab is currently supported on replica-set topologies and uses a local KMS demo setup.


Help

mongodb-cli-lab --help
mongodb-cli-lab up --help
mongodb-cli-lab quickstart --help
mongodb-cli-lab search --help
mongodb-cli-lab search up --help
mongodb-cli-lab search quickstart --help
mongodb-cli-lab qe --help