@absolutejs/bvm

中文文档
0.1.5发布于 2026/10/21MIT零依赖近 30 天下载 3184

Install, switch and verify Bun versions (official and AbsoluteJS builds) on Linux, macOS and Windows

原始使用文档
文档目录4 节
  1. Nothing runs unverified
  2. Install
  3. Uninstall
  4. Patched build identity

bvm

Install, switch and verify Bun versions, the way nvm does for Node, on Linux, macOS and Windows.

bvm install latest --default     # official Bun
bvm install 1.4.2-absolute.1     # AbsoluteJS's patched build
bvm use 1.4.2                    # this shell
echo 1.4.2-absolute.1 > .bun-version   # this project
bvm ls

bun and bunx are shims: each call runs the version selected by BVM_BUN_VERSION (set by bvm use), the nearest .bun-version, the nearest package.json engines.bun, or the default, in that order. A version a project pins exactly is installed on first use.

Nothing runs unverified

Official Bun is checked against Bun's own signed checksum list (SHASUMS256.txt.asc, PGP key F3DC C08A 8572 C074 9B3E 1888 8EAB 4D40 A7B2 2B59, the key Bun's Docker images pin). AbsoluteJS builds are checked against an Ed25519 signature by the AbsoluteJS release key. Both keys are compiled into bvm, so a mirror or a modified download cannot pass as either.

See PLAN.md for the design.

Install

Linux, macOS and WSL:

curl -fsSL https://raw.githubusercontent.com/absolutejs/bvm/main/install.sh | sh

Windows (PowerShell):

powershell -c "irm https://raw.githubusercontent.com/absolutejs/bvm/main/install.ps1 | iex"

npm (any OS):

npm install --global @absolutejs/bvm && bvm setup

The installers verify the download, put ~/.bvm/bin first on PATH in your shell's startup files (the user PATH and PowerShell profile on Windows), and make bvm work in the terminal you installed from. If Bun is already installed, bvm installs that same version, verified, as your default, so bun keeps meaning what it meant. Output is colored on a terminal; set NO_COLOR to turn it off.

Uninstall

bvm uninstall 1.3.9      # remove one Bun version
bvm self uninstall       # remove bvm itself

bvm self uninstall keeps one Bun, where Bun's own installer puts it (~/.bun/bin), so bun and bun upgrade keep working. On a terminal you pick it with the arrow keys (your default is preselected) and confirm the plan; in scripts, pass --keep <version>, --keep-default or --remove-bun, plus --yes. It removes everything bvm added to your shell startup files (and, on Windows, your user PATH and PowerShell profile) and leaves the rest of those files as they were.

MIT licensed.

Patched build identity

New AbsoluteJS builds use build metadata, for example 1.4.3+absolute.2. BVM accepts these alongside existing 1.4.2-absolute.1 releases, preserving each release's exact tag and installation directory. Both satisfy engine ranges according to their upstream Bun version.

bun -v and Bun.version come from the executable, unchanged by BVM. New patched binaries embed their AbsoluteJS label; older binaries still report only the upstream version. bvm current shows the selected release and why; bvm which shows its binary. Inside an application, process.execPath identifies the executable actually running it. Updating BVM does not relabel or replace an already installed Bun.

版本与发布记录

@absolutejs/bvm 共发布 6 个版本,首次发布于 2026/10/06;过去 12 个月发布了 6 个版本。

版本发布日期距今
0.1.5latest2026/10/2117 天前
0.1.42026/10/071 个月前
0.1.32026/10/071 个月前
0.1.22026/10/071 个月前
0.1.12026/10/061 个月前
0.1.02026/10/061 个月前

关于 @absolutejs/bvm 的常见问题

@absolutejs/bvm 是什么?

Install, switch and verify Bun versions (official and AbsoluteJS builds) on Linux, macOS and Windows

如何安装 @absolutejs/bvm?

在项目目录运行 npm install @absolutejs/bvm,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 bvm,可以用 npx bvm 直接运行。

@absolutejs/bvm 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/absolutejs__bvm 是否存在。

@absolutejs/bvm 可以商用吗?

@absolutejs/bvm 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@absolutejs/bvm 的下载量有多少?

根据 npm 官方下载统计,@absolutejs/bvm 在 2026/10/05 – 2026/11/03 这 30 天内被下载 3,184 次,日均约 106 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@absolutejs/bvm 还在维护吗?

最新版本 0.1.5 发布于 2026/10/21(17 天前);至今共发布 6 个版本,其中过去 12 个月发布了 6 个;首次发布于 2026/10/06。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。