@debugbundle/cli

中文文档
1.24.0发布于 2026/11/12Apache-2.0ES Module构建来源已验证近 30 天下载 3174

Command-line interface for DebugBundle

原始使用文档
文档目录12 节
  1. Local artifact safety in 1.19.4
  2. Cloud cache safety in 1.19.3
  3. Installation guidance in 1.19.2
  4. Local correlation safety in 1.19.1
  5. Installation
  6. Quick start
  7. Agent-aware setup
  8. Configuration
  9. Public status pages
  10. AnalyticsBundle
  11. Documentation
  12. License

@debugbundle/cli

Local artifact safety in 1.19.4

Retained bundle and reproduction paths must stay in their canonical local artifact directories. Unsafe metadata returns invalid_local_artifact_path without reading, rewriting or deleting unrelated files. Symlinked files/directories fail closed. Normal local stores and their existing size allowance are preserved; local state and processing writes use guarded atomic replacement. This supersedes earlier clients.

Cloud cache safety in 1.19.3

Upgrade to 1.19.3 for incident-ID validation before cloud requests and cache writes. Unsafe IDs return invalid_incident_id; UUIDs and existing opaque IDs remain supported. Cloud cache reads, writes and retention reject symbolic links; writes use guarded atomic replacement. This corrects a path traversal present in earlier clients.

Installation guidance in 1.19.2

Prefer one project per system across service repositories, reuse existing connections, and keep separate projects for different access or privacy policies. Inspect existing projects before first-time connect; name matching does not infer system membership.

Local correlation safety in 1.19.1

Trace correlation crosses services only within the same project and environment. If an older cache contains mixed retained source events, reads and incremental processing fail with local_incident_scope_mismatch. Preserve the local store, then explicitly rebuild from its retained event files using debugbundle process --preset <minimal|balanced|investigative> with the desired capture preset. This rebuild regenerates local incident/artifact state; it does not change cloud records or the retained event files.

Connected doctor diagnostics check API health and saved access-token authentication with a one-incident probe restricted to cloud_project_id. Missing or blank connected project scope fails before any request. Incident contents are discarded and are not included in the report. Local-only diagnostics make no cloud request.

In a connected workspace, debugbundle incidents and --source cloud default their cloud requests to the connection's cloud_project_id. --project-id <id> overrides that default. All cloud pages retain the selected project; local evidence keeps its existing selection. An unusable connected project returns invalid_local_connection_config before a list request: pass the intended --project-id or repair the connection. Account-wide reads remain supported outside a connected workspace.

Command-line interface for DebugBundle.

Notification preferences support account and project scopes, personal email or shared destinations, per-channel pause/resume, and daily email with local time and timezone. Use debugbundle --help and the notification CLI guide.

Installation

npm install -g @debugbundle/cli

Supported Node.js versions: 22.x through 26.x.

An unreadable response, connection loss, or server error during an incident/improvement lifecycle write reports mutation_outcome_unconfirmed. JSON output includes outcome: "unknown" and retry_safe: false; exit code 1 means confirmation is unavailable, not that the write failed. Check the current state with a read before retrying. The CLI does not automatically repeat writes. A confirmed cloud result remains successful if only the local cache update fails; the incident carries cache_warning: "cloud_cache_update_unavailable". doctor exits 1 when its report contains errors; warning-only reports still exit 0. doctor --auth-file <path> can check an explicit saved login.

Check the installed CLI version with debugbundle --version or debugbundle -v.

Or install it as a project development dependency:

npm install --save-dev @debugbundle/cli

Quick start

debugbundle setup --non-interactive
debugbundle doctor --privacy
debugbundle verify local
debugbundle verify cloud --project-id <id> --trigger-5xx
debugbundle verify cloud --project-id <id> --trigger-4xx 403
debugbundle process
debugbundle incidents
debugbundle explain <incident-id> --source cloud

Agent-aware setup

debugbundle setup --agent codex --agent claude-code --agent gemini-cli --agent muse-code --non-interactive
debugbundle doctor --json
debugbundle validate --fix --json

Interactive setup offers detected agents as defaults. Repeat --agent to select integrations explicitly; JSON/non-interactive runs never prompt or infer new agents. Saved selections are reused. Codex, Gemini CLI, and Muse Code discover .agents/skills/debugbundle/ directly. Claude Code receives a relative link under .claude/skills/debugbundle/, with an owned copy fallback when links are unavailable. Only selected native instruction files are managed; existing references/imports are preserved.

Keep .debugbundle/agent-setup.json with the canonical skill. It stores ownership hashes and selection, without credentials. Doctor and validate report canonical health separately from native discovery. Repair refreshes unchanged generated artifacts and preserves user edits for manual review. Repeated setup preserves the reviewed profile and cloud connection. Unknown legacy files are retained; exact known 1.10.0 templates can upgrade safely.

debugbundle setup --agent none --non-interactive removes only unchanged owned native integrations while retaining the canonical skill and configuration. Edited conflicts remain and require review. A stale .debugbundle/agent-setup.lock may be removed only after confirming no setup/repair is running.

Muse Code uses --agent muse-code (the agent executable is muse). It respects Muse's existing instruction precedence, creates AGENTS.md only when no supported instruction file exists, and shares owned blocks safely with other agents. Detection uses .muse project evidence; AGENTS.md alone does not select Muse. Trust the repository in Muse before expecting project skills to load, then check with muse skills list --source project --json.

Portable plugin skills complement the project's profile and workflows. Setup does not install plugins, configure MCP, or change authentication. Project plugin settings are hints; doctor does not prove a running agent loaded the skill. Restart/reload the agent after setup. See the full contract and rollback guidance.

Configuration

The CLI reads local project configuration from .debugbundle/ and can use access-token authentication for connected cloud operations. Use debugbundle connect to configure cloud access, or pass --auth-file to commands that support explicit auth state.

Public status pages

Owners can publish selected health checks from their own projects through a stable public link:

debugbundle health status get --project-id <id> --json
debugbundle health status options --project-id <id> --json
debugbundle health status save --project-id <id> --settings-json '<settings>' --json
debugbundle health status preview --project-id <id> --json

Settings contain title, enabled and explicit projects entries with project_id and check_ids. Save with enabled: false to unpublish while retaining the URL. Only selected names and aggregate availability are public; endpoint URLs and diagnostics stay private. New checks remain private. Use access-token authentication and publish only on the owner's instruction. See the status-page guide.

AnalyticsBundle

Public project flows support customer-defined acquisition and activation steps across sites, auth pages and apps. Read definitions and aggregate reports with:

debugbundle analytics flows list --project <project-id> --json
debugbundle analytics flows report --project <project-id> --key onboarding --window 30d --json

Owners/admins can use analytics flows save --project <project-id> --definition-json '<JSON>' and analytics flows archive --project <project-id> --key onboarding. See the flow contract for definitions, capture, full UTC day report windows, and partial coverage.

Analytics commands require connected access-token authentication and a project with AnalyticsBundle enabled. They query aggregate rollups or request an asynchronous analysis artifact; they do not read raw analytics events.

debugbundle analytics filter-options --project <project-id> --last 7d --json
debugbundle analytics summary --project <project-id> --last 7d
debugbundle analytics devices --project <project-id> --last 7d
debugbundle analytics journeys --project <project-id> --last 7d
debugbundle analytics opportunities --project <project-id>
debugbundle analytics opportunities --all-projects
debugbundle analytics bundle create --project <project-id> --kind journey_friction --last 7d
debugbundle analytics bundle list --project <project-id>
debugbundle analytics bundle list --all-projects
debugbundle analytics saved-funnels list --project <project-id>
debugbundle analytics saved-funnels create --project <project-id> --key signup --name "Signup" --steps-json '[{"step_key":"landing","display_name":"Landing"},{"step_key":"complete","display_name":"Complete"}]'

analytics filter-options lists observed route/dimension choices for the selected time, granularity and service/environment. Each set has bounded values and a truncated marker; current approved custom keys are included. Empty sets have no usable choices. Unsafe literals are omitted instead of changed. This read does not generate a bundle or consume generation quota.

Use debugbundle analytics settings get --project <project-id> to inspect availability and capture/retention settings. Owners and admins can enable it with debugbundle analytics settings set --project <project-id> --enabled true; Team projects can additionally manage approved custom dimensions. Saved funnels are reusable project definitions, not per-visit bundles; members can list them and owners/admins can create, update, or archive them within the independent tier cap. Project tokens remain SDK-ingestion-only and cannot read analytics.

Documentation

Full CLI documentation: https://debugbundle.com/docs/cli

License

Apache-2.0

版本与发布记录

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

版本发布日期距今
1.24.0latest2026/11/12今天
1.23.02026/11/111 天前
1.22.02026/11/111 天前
1.21.02026/11/092 天前
1.20.02026/11/056 天前
1.19.42026/11/057 天前

其他发布通道:next → 0.1.0-next.1。

关于 @debugbundle/cli 的常见问题

@debugbundle/cli 是什么?

Command-line interface for DebugBundle

如何安装 @debugbundle/cli?

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

@debugbundle/cli 支持 TypeScript 吗?

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

@debugbundle/cli 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

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

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

@debugbundle/cli 可以商用吗?

@debugbundle/cli 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

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

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

@debugbundle/cli 还在维护吗?

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