@bugsee/cli

中文文档
0.9.0发布于 2026/11/05MITCommonJS零依赖构建来源已验证近 30 天下载 5230

Bugsee CLI — cross-platform symbol collection, conversion, and upload.

原始使用文档
文档目录5 节
  1. How the binary gets here
  2. Programmatic use
  3. Exit codes
  4. Other install channels
  5. License

@bugsee/cli

The Bugsee CLI — a cross-platform Rust binary that collects debug information files (dSYM, ELF, Windows PDB, R8/ProGuard mappings, JS source maps), resolves build-environment metadata, and uploads symbols to Bugsee.

# Run once, without adding it to a project:
npx @bugsee/cli --version

# Or add it to a project, then run the `bugsee-cli` binary it provides:
npm install --save-dev @bugsee/cli
npx bugsee-cli --version

npx bugsee-cli only works where @bugsee/cli is installed. Anywhere else npx looks for an unscoped package named bugsee-cli, which does not exist, and fails with E404. Use the scoped npx @bugsee/cli there.

How the binary gets here

The binary is not in this package. It ships in six per-platform packages, declared as optionalDependencies:

Packageos / cpu
@bugsee/cli-darwin-arm64darwin / arm64
@bugsee/cli-darwin-x64darwin / x64
@bugsee/cli-linux-arm64linux / arm64
@bugsee/cli-linux-x64linux / x64
@bugsee/cli-win32-x64win32 / x64
@bugsee/cli-win32-arm64win32 / arm64

npm installs only the one matching your machine and skips the rest. Nothing is downloaded at install time, so this works with --ignore-scripts, with a lockfile-pinned CI install, and offline from a warm cache.

The Linux builds link glibc and are marked "libc": ["glibc"]. On musl (Alpine) the install still succeeds, and bugsee-cli reports that plainly if invoked — use a glibc base image, or build from source.

If the platform package is unavailable — --omit=optional (or the deprecated --no-optional), or a registry mirror that carries only this package — a postinstall fallback downloads the release archive for your host and verifies its SHA-256 before unpacking it into vendor/. On a platform with no published binary there is nothing to download, so it only warns. That fallback never fails the install: if it cannot fetch the binary it warns and exits 0, and the error surfaces only if you actually invoke bugsee-cli.

VariableEffect
BUGSEE_CLI_SKIP_DOWNLOAD=1Skip the fallback download entirely.
BUGSEE_CLI_BASE_URL=<url>Fetch <url>/bugsee-cli-<triple>.<ext> (+ .sha256) instead of the GitHub release — point it at an internal mirror, or at https://download.bugsee.com/cli/v<version>.

Programmatic use

const { spawnSync } = require("node:child_process");
const { binaryPath } = require("@bugsee/cli");

const out = spawnSync(binaryPath(), ["vcs-metadata"], { encoding: "utf8" });
const metadata = JSON.parse(out.stdout);
  • binaryPath() — absolute path to the binary; throws with a diagnostic if there is none for this platform.
  • resolveBinaryPath() — the same lookup, returning null instead of throwing.
  • version — the CLI version this package carries.

Exit codes

bugsee-cli exits with a stable, documented code and the launcher forwards it unchanged (0 success, 1/2 structural — the caller should fall back, 10–39 substantive failures, 40 a deliberate build gate, 50 an internal error after a request may have been sent). A launcher that cannot find a binary at all exits 1, which is the "structural, fall back" case by that same contract.

Other install channels

@bugsee/bugsee-cli was the same CLI published by cargo-dist as a single package that downloads its binary in a postinstall. It is deprecated and no longer published (last version 0.8.2); use @bugsee/cli, which also works under --ignore-scripts. See the Distribution section for the shell installer, Homebrew tap, and the per-build-system bundles.

License

MIT © Bugsee, Inc.

版本与发布记录

@bugsee/cli 共发布 13 个版本,首次发布于 2026/09/16;过去 12 个月发布了 13 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.9.0latest2026/11/054 天前
0.8.22026/10/309 天前
0.8.12026/10/081 个月前
0.8.02026/10/081 个月前
0.7.132026/10/071 个月前
0.7.122026/10/071 个月前

关于 @bugsee/cli 的常见问题

@bugsee/cli 是什么?

Bugsee CLI — cross-platform symbol collection, conversion, and upload.

如何安装 @bugsee/cli?

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

@bugsee/cli 支持 TypeScript 吗?

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

@bugsee/cli 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@bugsee/cli 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=14.18。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@bugsee/cli 可以商用吗?

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

@bugsee/cli 的下载量有多少?

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

@bugsee/cli 还在维护吗?

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