BVM — Bun Version Manager
The Native, Zero-Dependency Version Manager for Bun
Official Website & Documentation »
🇨🇳 中文文档 · Report Bug · Request Feature
⚡ Quick Install
BVM uses a smart installation script that automatically detects your OS and network environment (selecting the fastest registry for China/Global users).
macOS / Linux
curl -fsSL https://bvm-core.pages.dev/install | bashWindows (PowerShell)
irm https://bvm-core.pages.dev/install | iexKey Features
- 🚀 Zero Latency: Shim-based design ensures ~0ms shell startup overhead.
- 🛡️ Atomic Isolation: Each Bun version has its own global package directory. No more conflicts.
- 🌏 Smart Mirroring: Automatically detects your region and picks the fastest registry (npmmirror/npmjs).
- 📦 Zero Dependency: BVM bootstraps itself using a private, minimal Bun runtime. No Node.js or Python required.
Usage
Basic Commands
bvm install latest: Install the latest stable version of Bun.bvm install 1.1.0: Install a specific version.bvm use 1.1.0: Switch the active Bun version immediately.bvm default 1.1.0: Set a global default version for new shell sessions.bvm ls: List all locally installed versions.bvm ls-remote: List all available versions from the registry.bvm uninstall 1.1.0: Remove a specific version.bvm upgrade: Upgrade BVM itself to the latest version.
Running Commands
You can run a command with a specific Bun version without switching your global environment:
bvm run 1.0.30 index.tsAliases
Create custom names for specific versions:
bvm alias prod 1.1.0
bvm use prodConfiguration (.bvmrc)
BVM supports automatic version switching via .bvmrc files. Create a file named .bvmrc in your project root:
echo "1.1.0" > .bvmrcDesign Philosophy
ArchSense (Self-Bootstrapping)
BVM does not ship with heavy pre-compiled binaries. Instead, it uses Bun to manage Bun. The installer downloads a minimal Bun runtime to serve as BVM's execution engine, ensuring the manager itself is always running on the most optimized environment.
Atomic Isolation
Unlike managers that only switch the PATH, BVM performs Filesystem-level Locking. It dynamically injects a unique BUN_INSTALL path for every version, ensuring that global packages installed in one version never conflict with another.
License
MIT © EricLLLLLL