Registry / database / m
library1.10.0jsnpmunverified

m is a bash-based CLI tool for downloading, using, and managing multiple versions of the MongoDB server and command-line tools. Version 1.10.0 is the current stable release, actively maintained primarily via npm (npm install -g m). It supports Linux, macOS, and Windows WSL, and can be installed via npm, git, or wget. Key differentiators: lightweight shell script, no runtime dependencies, supports enterprise editions, pre/post hooks, and direct binary path retrieval. Unlike mongodb-version-manager (mv), m is simpler and focuses on binary management without Docker overhead.

npm install m
INSTALL
IMPORT
SIG · M
M
m
databasejavascriptv1.10.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

m
Install globally via npm: npm install -g m. Then run commands like 'm 7.0.14' from terminal.
Trying to import m as a JavaScript module (e.g., require('m') or import 'm') — it is a CLI tool, not a library.
m is a bash CLI tool, not a Node.js module. Install globally and use via shell commands.

Install m globally via npm, download and activate MongoDB 7.0.14, list installed versions, then start mongod 7.0.14 with custom port and dbpath.

npm install -g m m 7.0.14 m m use 7.0.14 --port 29000 --dbpath ./data/
Debug
Known issues
gotcham requires a 64-bit OS with bash. It does not work on plain Windows (needs WSL). Also, some older MongoDB versions may not have binaries for all distros, triggering a source build prompt.
fix
Ensure you're on a 64-bit Linux/macOS or Windows with WSL. For no-prompt download, pipe yes: 'yes | m 7.0'.
affects: >=0.0.0
deprecatedAs of MongoDB 5.0+, the 'm' tool's default install path is $HOME/.local/bin/; older versions may have used /usr/local/bin.
fix
Check your PATH and adjust if needed: export PATH=$HOME/.local/bin:$PATH
affects: <1.0.0
gotcham downloads binaries from MongoDB's official download center, which may have rate limiting or IP-based blocks.
fix
Retry after some time or use a different network. No official workaround.
affects: >=0.0.0
Errors
Common errors & fixes
bash: m: command not found
m is not installed or not in PATH after global npm install.
fix
Ensure npm global bin directory is in PATH (e.g., export PATH=$(npm bin -g):$PATH) and reinstall: npm install -g m
Error: Failed to download MongoDB binary
Network issue or unsupported platform/version combination.
fix
Check network connectivity. For unsupported versions, try 'm <version>' with full version string (e.g., 7.0.14). Use 'yes | m <version>' to skip source build prompt.
Upgrade
Version history
1.10.0latest on npm
Audit
Dependencies
bashrequiredm is a bash script and requires a bash shell to run.
Agent activity
7 hits · last 30 days
node
6
Resources
packagem
m — npm install m · libregistry