Every JavaScript developer knows the feeling: you clone a project, run npm install, and wait while your fans start sounding like a jet engine.
Then Bun arrived with its lightning-fast native package manager, and running bun install felt like magic (seconds instead of minutes).
The catch?
Muscle memory is hard to rewrite. Your team still types npm install, npx, yarn add, or pnpm. Your legacy CI/CD scripts still have npm test. And if you try to simply alias npm=bun, things break the moment you hit npm-specific flags, lifecycle scripts, or Yarn PnP workspaces.
That's why I built bunpm — a zero-runtime-dependency CLI wrapper that transparently routes npm, npx, yarn, and pnpm commands through Bun, while falling back safely to the original manager whenever a command cannot be mapped 100% safely.
⚡ What It Does
When you type:
-
npm install➔ translates directly tobun install -
npm install express➔ translates tobun add express -
npx rimraf dist➔ runs viabun x rimraf dist -
yarn add react/pnpm add react➔ runs viabun add react
And what if something isn't supported?
If you run something Bun cannot map safely (like npm audit, npm version, complex workspace filtering, or npm-specific flags like --save=false), bunpm never guesses. It instantly and silently falls back to your native npm / yarn / pnpm.
Zero breaking changes. Zero workflow disruptions.
🛠️ Key Engineering Principles
Zero Runtime Dependencies (
"dependencies": {}):
No bloatednode_modulesjust to run a CLI wrapper. It uses pure Node.js (CommonJS, Node 16.9+) standard library with zero third-party packages at runtime.Smart Stream Formatting:
Piped and non-interactive output is cosmetically reformatted line-by-line to look familiar, bounded to a 64 KiB memory ceiling so it never buffers infinitely.POSIX Signal Forwarding & Child Process Safety:
SIGINT(Ctrl+C) andSIGTERMsignals are cleanly forwarded to the running child process, properly restoring terminal handlers upon exit.-
100% Tested & Cross-Platform:
- 99 automated test suites running across Ubuntu, macOS, and Windows on every push.
- 100% statement and line test coverage enforced via
c8. - Native shell launchers for bash, zsh, and Windows PowerShell.
🚀 Getting Started
You can install it offline from the repository:
git clone https://github.com/yv3000/bunpm.git
cd bunpm
On Linux & macOS:
bash bunpm/platforms/linux/scripts/install.sh
On Windows (PowerShell):
powershell -ExecutionPolicy Bypass -File .\bunpm\platforms\windows\scripts\install.ps1
Once installed, verify the setup with:
bunpm doctor
Now, just type npm install or yarn add like you always do — and enjoy the speed boost!
bunpm is completely open source under the MIT license. Check it out on GitHub, submit issues, or give it a star if you find it helpful!
👉 GitHub: github.com/yv3000/bunpm
Would love to hear your thoughts in the comments! How are you handling the transition to Bun in your team's workflow?
Top comments (0)