A Node.js utility for connecting to and sending commands to a MongoDB shell. Version 1.0.1 is the latest stable release. It provides a simple wrapper around the MongoDB shell process, allowing programmatic command execution and result parsing. Differentiators include lightweight design, Promise-based API, and TypeScript support. Active development with sporadic releases.
npm install mongodb-shellNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Create a MongoShell instance, execute a command, and clean up resources.
Ensure 'in' contains a valid MongoDB shell command as a string.
Parse or cast the result if expecting non-string types.
Always call mongoShell.destroy() after use, ideally in a finally block.
Use import { MongoShell } from 'mongodb-shell' instead of import MongoShell from 'mongodb-shell'Use const { MongoShell } = require('mongodb-shell')No dependency data recorded yet.