@buoy-design/cli

中文文档
0.8.20发布于 2026/11/09MITTypeScriptES Module构建来源已验证近 30 天下载 1877

Catch design drift before it ships

原始使用文档
文档目录10 节
  1. Quick Start
  2. What It Finds
  3. Commands
  4. Fix Command
  5. Rescue workflow
  6. Confidence Levels
  7. AI Integration
  8. Zero Config
  9. Telemetry
  10. Links

ahoybuoy

Catch design drift before it ships. Buoy scans your codebase to find where AI-generated code diverges from your design system.

Quick Start

npx ahoybuoy show all

This scans your project without requiring configuration.

What It Finds

  • Hardcoded colors like #3b82f6 instead of design tokens
  • Magic numbers like padding: 17px instead of spacing variables
  • AI-generated code that ignores your team's patterns

Commands

CommandPurpose
buoy show allScan for components, tokens, and drift
buoy drift checkPre-commit drift validation
buoy drift fixPreview or apply drift fixes
buoy rescueMeasure, repair, guard, and prove improvement
buoy dockConfigure project (agents, hooks, etc.)
buoy ahoyCloud features (login, GitHub bot, billing)

Fix Command

The buoy drift fix command suggests and applies fixes for design drift:

buoy drift fix                    # Preview fixable issues
buoy drift fix --dry-run          # Show detailed diffs
buoy drift fix --apply            # Apply high-confidence fixes
buoy drift fix --confidence=high  # Require high-confidence matches

Rescue workflow

For an existing codebase, Rescue turns the commands into one reviewable journey:

buoy rescue plan
# Review .buoy/rescue/runs/<run-id>/report.html
buoy rescue apply --run <run-id> --approve
buoy rescue guard --run <run-id> --reason "Reviewed legacy baseline"
buoy rescue report --run <run-id>

Apply requires a clean Git worktree and creates a new buoy/<run-id> branch. Buoy never commits, pushes, merges, or uploads source code. Ambiguous changes stay review-required, and buoy rescue rollback restores local backups.

Confidence Levels

LevelScoreDescription
exact100%Value exactly matches a design token
high95-99%Very close match, safe to auto-apply
medium70-94%Close match, review recommended
low<70%Ambiguous, manual review required

AI Integration

Buoy works great with AI coding tools:

# Set up AI agents with design system context
buoy dock agents

# Generate CLAUDE.md context
buoy dock context

Zero Config

Buoy auto-detects your framework (React, Vue, Svelte, Angular, Astro) and scans standard paths. No configuration required to get started.

Telemetry

Off by default. After your first drift result in an interactive terminal, Buoy asks once whether it may send anonymous usage pings. Say no and it never asks again.

If you opt in, it sends event names (cli_first_run, cli_drift_found, cli_check_clean, cli_hint_shown, cli_login_started) with counts, the CLI version, and your OS. Never file paths, repository names, code, or account details. A random id in ~/.buoy/config.json groups pings from one install and is not tied to you.

buoy ahoy telemetry          # show the setting and the exact payload
buoy ahoy telemetry off      # or on

BUOY_TELEMETRY=0, DO_NOT_TRACK=1, or CI in the environment disables it regardless of the setting. JSON and quiet output never send.

版本与发布记录

@buoy-design/cli 共发布 125 个版本,首次发布于 2025/12/30;过去 12 个月发布了 125 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.8.20latest2026/11/09今天
0.8.192026/11/09今天
0.8.182026/11/09今天
0.8.172026/11/09今天
0.8.162026/11/091 天前
0.8.152026/11/081 天前

关于 @buoy-design/cli 的常见问题

@buoy-design/cli 是什么?

Catch design drift before it ships

如何安装 @buoy-design/cli?

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

@buoy-design/cli 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@buoy-design/cli 支持 ESM 还是 CommonJS?

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

@buoy-design/cli 可以商用吗?

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

@buoy-design/cli 的下载量有多少?

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

@buoy-design/cli 还在维护吗?

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