{"library":"run-rs","title":"Local MongoDB Replica Set Runner","description":"run-rs is a zero-configuration command-line utility designed for spinning up a local MongoDB replica set quickly for development and testing purposes. It eliminates the need for manual MongoDB installations by downloading and managing the MongoDB binaries itself, functioning as a completely self-contained solution. The current stable version is 0.7.7. While there isn't a specified release cadence, the project appears actively maintained with support for various MongoDB versions. A key differentiator is its 'batteries-included' approach, providing a functional replica set with a single command, automatically clearing database data by default for fresh test runs. It supports Linux, macOS, and Windows 10 (via Git Bash/PowerShell).","language":"javascript","status":"active","last_verified":"Thu Apr 23","install":{"commands":["npm install run-rs"],"cli":{"name":"run-rs","version":null}},"imports":["run-rs [options]","npx run-rs [options]","// The 'run-rs' package does not expose a programmatic JavaScript API for direct import/require."],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"npm install -g run-rs\n\n# Start a MongoDB 4.0.0 replica set and connect a shell\nrun-rs -v 4.0.0 --shell\n\n# Once the shell starts, you can interact with MongoDB\nrs:PRIMARY> db.version()\nrs:PRIMARY> db.myCollection.insertOne({ name: 'test' })\nrs:PRIMARY> db.myCollection.find()\n\n# To stop, exit the shell (Ctrl+C or .exit)","lang":"bash","description":"This quickstart demonstrates installing `run-rs` globally, starting a MongoDB 4.0.0 replica set, and immediately connecting a MongoDB shell to interact with it.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}