This repository provides shell scripts to replace node, npm, and npx with bun and bunx for faster JavaScript workflows. The scripts mimic version outputs for compatibility with tools/scripts that check Node/npm versions.
- Mimics Node.js v25.0.0 and npm v11.6.2 for
--version,-v,--help, etc. - Forwards all other commands to
bun/bunx. - Handles common flags like
-efor inline eval in Node. - Scripts named
node,npm,npx(no.shfor seamless replacement).
- Node.js: v25.0.0
- npm/npx: 11.6.2
- Bun: 1.3.1
- Install Bun:
curl -fsSL https://bun.sh/install | bash - Save scripts as
node,npm,npxin~/bin(create if needed). - Make executable:
chmod +x ~/bin/node ~/bin/npm ~/bin/npx - Add to PATH in
~/.bashrcor~/.zshrc:export PATH="$HOME/bin:$PATH" - Reload shell:
source ~/.bashrc - Test:
node --version(should outputv25.0.0)
node: Replacesnodewithbun.npm: Replacesnpmwithbun(for package management).npx: Replacesnpxwithbunx.
- Bun is highly compatible, but test complex Node APIs.
- Update version strings in scripts for future releases.