关于 beads
beads 是面向 Agent 任务管理的 Git 驱动问题跟踪技能。其命令行工具可管理状态、优先级、类型、依赖和史诗任务,并支持 JSON 输出及 Git 同步。
主要功能
- 01基于 Git 的问题跟踪
- 02管理问题状态与优先级
- 03表示依赖关系与史诗任务
- 04筛选和查看问题
- 05JSON 输出与 Git 同步
适用场景
- 01为 Agent 查找无阻塞任务
- 02将工作组织为史诗和子任务
- 03跟踪进度及问题依赖
- 04将项目问题同步到 Git 远程端
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ johnlindquist/ claude --skill beads安装后在 Claude Code 中输入/beads确认已加载。
详细介绍
Beads 问题跟踪器
支持依赖感知、由 Git 支撑的问题跟踪。非常适合 Agent 任务管理。
前置条件
安装 beads:
# Install via cargo or download binary
cargo install beads
# Or download from releases
在项目中初始化:
bd init
命令行参考
查看就绪的工作
# Get issues with no blockers
bd ready --json
# Filter by assignee
bd ready --assignee username --json
# Filter by label
bd ready --label "urgent" --json
# Limit results
bd ready --limit 5 --json
创建问题
# Basic task
bd create "Task title" --json
# With details
bd create "Task title" -d "Description" -t task -p 2 --json
# As subtask of epic
bd create "Subtask" --parent epic-123 --force --json
# With dependencies
bd create "Task" --deps "other-issue-id" --json
# Quick mode (less output)
bd create "Task" -q --json
问题类型
bug- Bug 报告feature- 新功能task- 一般任务epic- 父级容器chore- 维护工作
优先级
0- 紧急1- 高2- 普通(默认)3- 低4- 待办
更新问题
# Change status
bd update issue-id -s in_progress --json
# Add notes
bd update issue-id --notes "Progress update" --json
# Change priority
bd update issue-id -p 1 --json
# Add labels
bd update issue-id --add-label "urgent" --json
关闭问题
# Close with reason
bd close issue-id -r "Completed successfully" --json
列出问题
# All open issues
bd list --status open --json
# Filter by type
bd list --type bug --json
# Filter by assignee
bd list --assignee "username" --json
# Filter by label
bd list --label "backend" --json
# Filter by priority
bd list --priority 1 --json
显示问题详情
bd show issue-id --json
依赖关系
# Add dependency (issue-a depends on issue-b)
bd dep add issue-a issue-b
# Dependency types: blocks, related, parent-child, discovered-from
bd dep add issue-a issue-b -t blocks
与 Git 同步
# Sync issues to git remote
bd sync
清理命令
# Find duplicate issues
bd duplicates --dry-run
# Auto-merge duplicates
bd duplicates --auto-merge
# Find stale issues (no activity)
bd stale --days 14 --json
# Cleanup old closed issues
bd cleanup --dry-run
bd cleanup -f
安装 Git 钩子
# Auto-sync on commit
bd hooks install
系统信息
# Check version
bd --version
# Project info
bd info --json
工作流模式
会话开始
# See what's ready to work on
bd ready --json
处理任务
# Start working
bd update task-id -s in_progress --json
# Add progress notes
bd update task-id --notes "Halfway done" --json
# Complete
bd close task-id -r "Implemented and tested" --json
Epic 规划
# Create epic
bd create "User Authentication" -t epic --json
# Add subtasks
bd create "Design auth flow" --parent auth-epic --force --json
bd create "Implement login" --parent auth-epic --force --json
bd create "Add tests" --parent auth-epic --force --json
# Add dependencies between subtasks
bd dep add implement-id design-id -t blocks
bd dep add tests-id implement-id -t blocks
会话结束
# Sync to git
bd sync
Worktree 模式
使用 git worktree 时,请禁用守护进程:
export BEADS_NO_DAEMON=1
# Or per-command
bd --no-daemon ready --json
最佳实践
- 始终使用
--json以获得可解析的输出 - 在会话开始时使用
bd ready查看未被阻塞的工作 - 添加依赖关系 以表达任务之间的联系
- 使用 epic 对相关任务进行分组
- 在结束会话前运行
bd sync - 安装钩子 以自动同步:
bd hooks install
评论
支持 Markdown