| name | bd |
| description | Git-native issue tracking with first-class dependency support. Issues stored alongside code in .beads/ directory, dual-persisted in SQLite (queries) and JSONL (git-friendly history). Hash-based IDs, DAG dependencies, daemon mode with RPC, and LSP-inspired multi-workspace support. |
| version | 0.28.0 |
| triggers | ["task tracking","issue management","project planning","bug triage","dependency modeling","git-integrated workflows","sprint planning","epic decomposition","work prioritization","ai agent task execution"] |
| capabilities | ["create_issues","update_issues","dependency_management","git_sync","daemon_rpc","visualization","multi_repo","label_management","comment_system","search_filter"] |
| related_tools | ["git (version control)","bv (issue graph visualization)","sqlite3 (database queries)","jq (json processing)","graphviz (dependency graphs)"] |
bd - Git-Native Issue Tracking
Core Principle
Use bd for all task and issue operations—it's git-native and agent-friendly.
Issues live where your code lives: in git. No external API, no network dependency, no vendor lock-in. Just files, tracked by git, queryable via SQLite, and optimized for AI agent workflows.
When to Use bd
Primary Use Cases
- Task Tracking: Create, update, close issues for any work item
- Issue Management: Organize bugs, features, chores with labels and priorities
- Project Planning: Break down epics into subtasks with dependencies
- Dependency Modeling: Express work relationships as a DAG
- Sprint Planning: Assign work, set priorities, track progress
- Bug Triage: Classify, assign, and track defects
- AI Agent Workflows: Autonomous task execution with dependency awareness
When NOT to Use bd
- Public issue tracking (use GitHub Issues for public visibility)
- Customer-facing support tickets (use dedicated support systems)
- Marketing/sales workflows (use CRM tools)
- Document management (use proper DMS)
Quick Start
Installation Check
which bd
bd --version
Initialize in Repository
bd init
bd config set prefix myapp
bd status
Basic Operations
bd create "Add user authentication"
bd create "Fix login bug" \
--type bug \
--priority 1 \
--assignee alice \
--labels backend,security
bd list
bd list --status open --assignee alice
bd list --label urgent --priority-min 0 --priority-max 1
bd update bd-1 --status in_progress
bd update bd-1 --priority 0
bd update bd-1 --assignee bob
bd comment bd-1 "Started investigating root cause"
bd close bd-1
bd show bd-1
bd show bd-1 --json
Core Concepts
Issue Structure
Every issue has:
- ID: Hash-based (e.g.,
bd-a3f8e9) or sequential (legacy)
- Title: Brief summary (required)
- Description: Detailed explanation (markdown)
- Type: bug | feature | task | epic | chore
- Status: open | in_progress | blocked | closed
- Priority: 0-4 (0=highest, 4=lowest)
- Assignee: Username or actor
- Labels: Tags for organization
- Dependencies: Relationships to other issues
- Timestamps: created_at, updated_at, closed_at
Dual Persistence
bd uses TWO storage formats:
-
SQLite (.beads/*.db)
- Fast queries and filtering
- Full-text search
- Indexed relationships
- Ephemeral: rebuilds from JSONL
-
JSONL (.beads/beads.jsonl)
- Git-friendly line-by-line format
- Complete audit history
- Source of truth for sync
- Human-readable events
Key insight: SQLite is for speed, JSONL is for git. Changes are written to both automatically.
Dependency DAG
Issues form a Directed Acyclic Graph (no cycles allowed):
bd-1 (Design) → bd-2 (Backend) → bd-3 (Frontend) → bd-4 (Tests)
Dependency types:
blocks / blocked_by: Hard dependencies
discovered-from: Context tracking
parent / child: Hierarchical relationships
Why DAG?
- Prevents deadlocks (no circular dependencies)
- Enables critical path analysis
- Clear work ordering
- Parallel work identification
Issue Lifecycle
┌─────────────────────────────────────────┐
│ │
│ open ──> in_progress ──> closed │
│ │ │ │
│ └────> blocked │
│ │ │
│ └──> in_progress │
│ │
│ closed ──> reopen ──> open │
│ │
└─────────────────────────────────────────┘
Common Workflows
Daily Developer Workflow
git pull
bd ready
bd list --assignee $USER
bd update bd-5 --status in_progress
bd comment bd-5 "Implementing JWT"
bd create "Fix null pointer in auth" \
--type bug \
--priority 1 \
--deps discovered-from:bd-5
git add .beads/
git commit -m "Progress on bd-5"
git push
Epic Decomposition
bd create "Redesign authentication" \
--type epic \
--priority 0
EPIC_ID="bd-1"
bd create "Design auth schema" --parent $EPIC_ID --priority 0
bd create "Implement backend" --parent $EPIC_ID --deps bd-2
bd create "Update frontend" --parent $EPIC_ID --deps bd-3
bd create "Write tests" --parent $EPIC_ID --deps bd-3,bd-4
bd dep tree $EPIC_ID --long
Sprint Planning
bd list --status open --no-assignee --sort priority
bd update bd-10,bd-11,bd-12 --assignee alice
bd label add sprint-5 bd-10,bd-11,bd-12
bd update bd-10,bd-11 --priority 0
bd list --label sprint-5 --long
Bug Triage
bd create "Login fails with special chars" \
--type bug \
--priority 2 \
--description "Steps: 1) Use p@ss\$word! 2) Try login 3) Fails" \
--labels backend,security
bd update bd-20 --assignee backend-team --status in_progress
bd update bd-20 --notes "Root cause: encoding issue in auth/password.go"
bd close bd-20
Dependency Management
Adding Dependencies
bd dep add bd-1 blocks bd-2
bd create "New feature" --deps bd-1,bd-2,bd-3
bd create "Bug fix" --deps discovered-from:bd-5,blocks:bd-10
bd create "Subtask" --parent bd-1
Viewing Dependencies
bd dep tree bd-1
bd blocked
bd ready
bd list --format dot | dot -Tpng -o issues.png
bd list --format digraph > issues.txt
Removing Dependencies
bd dep remove bd-1 blocks bd-2
Cycle Detection
bd dep cycles
Advanced Features
Daemon Mode
Long-running RPC server for hot database and multi-workspace:
bd daemon start
bd daemon status
bd daemon stop
bd --no-daemon list
Benefits:
- <10ms create/update operations (vs ~100ms direct)
- Hot SQLite cache
- Multi-workspace support
- Background sync
- JSON-RPC protocol
Templates
bd template create bug-report \
--type bug \
--priority 2 \
--description "## Steps to Reproduce\n\n## Expected\n\n## Actual"
bd create "New bug" --from-template bug-report
Labels
bd label add urgent bd-5
bd label add backend,security bd-5
bd label remove urgent bd-5
bd list --label backend
bd list --label-any urgent,high
Search & Filtering
bd search "authentication"
bd list \
--status open,in_progress \
--priority-min 0 --priority-max 1 \
--assignee alice \
--label backend \
--created-after 2024-01-01 \
--sort priority \
--reverse
bd list --empty-description
bd list --no-assignee --status open
Comments
bd comment bd-5 "Started implementation"
bd comment bd-5 --body "Multi-line comment"
bd comments list bd-5
bd update bd-5 --notes "Design notes here"
Export/Import
bd export > backup.jsonl
bd export --status closed --created-after 2024-01-01 > archive.jsonl
bd import backup.jsonl
bd migrate-issues --from ~/old-repo --to ~/new-repo
Multi-Repository
bd repo add backend ~/repos/backend --prefix api
bd repo add frontend ~/repos/frontend --prefix ui
bd create "Add endpoint" --repo backend
cd ~/repos/backend
bd create "Add endpoint"
Git Integration
Automatic Sync
bd create "New issue"
git add .beads/
git commit -m "Add issue"
git push
Git Hooks
bd hooks install
Manual Sync
git pull
git add .beads/
git commit -m "Update issues"
git push
bd sync pull
bd sync push
Merge Conflicts
bd includes custom merge driver:
.beads/beads.jsonl merge=beads
Visualization
bv (Interactive Graph)
bv .beads/beads.jsonl
Graphviz
bd list --format dot > issues.dot
dot -Tpng -o issues.png issues.dot
dot -Tsvg -o issues.svg issues.dot
neato -Tpng -o issues-neato.png issues.dot
circo -Tpng -o issues-circo.png issues.dot
Text-Based Tree
bd dep tree bd-1
bd dep tree bd-1 --long
Health & Maintenance
Validation
bd validate
Doctor
bd doctor
Repair
bd repair-deps
bd repair-deps --dry-run
bd detect-pollution
bd detect-pollution --clean
bd duplicates
bd duplicates --auto-merge
Cleanup
bd compact --older-than 90d
bd cleanup --older-than 30d
bd delete bd-1 --purge
AI Agent Workflows
Autonomous Task Loop
#!/bin/bash
while true; do
READY=$(bd ready --json --assignee agent)
if [ "$READY" = "[]" ]; then
sleep 60
continue
fi
ISSUE_ID=$(echo $READY | jq -r '.[0].id')
bd update $ISSUE_ID --status in_progress
agent-execute $ISSUE_ID
bd close $ISSUE_ID
git add .beads/
git commit -m "Completed $ISSUE_ID"
git push
done
Context-Aware Creation
#!/bin/bash
rg "TODO:" --json | jq -c '.[] | select(.type == "match")' | \
while read line; do
FILE=$(echo $line | jq -r '.data.path.text')
TEXT=$(echo $line | jq -r '.data.lines.text' | sed 's/.*TODO: //')
bd create "$TEXT" \
--type task \
--priority 2 \
--description "Found in $FILE" \
--labels auto-generated
done
Dependency-Aware Planning
#!/bin/bash
GRAPH=$(bd list --format digraph)
echo "$GRAPH" | golang.org/x/tools/cmd/digraph allpaths | \
while read path; do
echo "Execution order: $path"
done
JSON Output & Parsing
Structured Output
bd list --json
bd show bd-1 --json
bd ready --json
bd blocked --json
Example Parsing
bd list --status open --json | \
jq '.[] | select(.priority <= 1) | {id, title, priority}'
bd list --json | \
jq '.[] | select(.assignee == null or .assignee == "") | .id'
bd list --json | \
jq 'group_by(.status) | map({status: .[0].status, count: length})'
bd list --json | \
jq '.[] | {id, blocks: [.dependencies[] | select(.type=="blocks") | .target_id]}'
JSONL Direct Access
Reading JSONL
For direct file access (e.g., in agent scripts):
cat .beads/beads.jsonl | jq -c '.'
cat .beads/beads.jsonl | jq -c 'select(.type == "create")'
cat .beads/beads.jsonl | \
jq -c 'select(.type == "create" or .type == "update")' | \
jq -s 'group_by(.issue.id) | map(sort_by(.issue.updated_at) | last | .issue)'
JSONL Event Types
{"type":"create","issue":{...}}
{"type":"update","issue":{...}}
{"type":"close","id":"bd-1","closed_at":"...","actor":"..."}
{"type":"reopen","id":"bd-1","actor":"..."}
{"type":"delete","id":"bd-1","deleted_at":"...","actor":"..."}
{"type":"comment","comment":{...}}
{"type":"dep_add","dependency":{...}}
{"type":"dep_remove","dependency":{...}}
Configuration
Config Commands
bd config list
bd config set prefix myapp
bd config set default_priority 2
bd config set default_type task
bd config set git.auto_sync true
bd config set git.remote origin
bd config set git.sync_branch main
bd config set daemon.enabled true
bd config set daemon.sync_interval 300
Config File
Location: .beads/config.json (per-repo) or ~/.config/bd/config.json (global)
{
"prefix": "myapp",
"default_priority": 2,
"default_type": "task",
"daemon": {
"enabled": true,
"port": 9876,
"sync_interval": 300
},
"git": {
"auto_sync": true,
"sync_branch": "main",
"remote": "origin"
},
"repos": {
"backend": {
"path": "/Users/user/repos/backend",
"prefix": "api",
"auto_route": true
},
"frontend": {
"path": "/Users/user/repos/frontend",
"prefix": "ui",
"auto_route": true
}
}
}
Statistics & Reporting
bd stats
bd count
bd count --status open
bd count --label urgent
bd stale --older-than 30d
bd list --json | \
jq '{
total: length,
by_status: group_by(.status) | map({(.[0].status): length}) | add,
by_type: group_by(.type) | map({(.[0].type): length}) | add,
by_priority: group_by(.priority) | map({("\(.priority)"): length}) | add
}'
Global Flags
--json
--db <path>
--no-daemon
--no-db
--no-auto-flush
--no-auto-import
--sandbox
--quiet
--verbose
--actor <name>
--allow-stale
Best Practices
1. Commit Issues with Code
git checkout -b feature/new-auth
bd create "Implement new auth" --type feature
bd update bd-1 --status in_progress
git add .
git commit -m "Implement new auth (bd-1)"
bd close bd-1
git add .beads/
git commit -m "Close bd-1"
git push
2. Use Dependencies Liberally
Model real work dependencies—it unlocks:
- Critical path analysis
- Parallel work identification
- Automatic ready/blocked tracking
3. Label Consistently
Establish taxonomy early:
backend, frontend, infra
urgent, high, medium, low
sprint-N for sprint tracking
tech-debt, security, performance
4. Comment Frequently
Context decays over time. Comments preserve:
- Why decisions were made
- What was tried and failed
- Links to resources
- Status updates
5. Sync Daily
git pull
git add .beads/
git commit -m "Daily issue updates"
git push
6. Clean Up Regularly
bd stale --older-than 30d
bd compact --older-than 90d
bd cleanup --older-than 90d
7. Validate Health
bd validate
bd repair-deps
bd dep cycles
Troubleshooting
Issues Not Appearing
ls -la .beads/
cat .beads/beads.jsonl | jq '.' > /dev/null
bd migrate
Daemon Not Starting
bd daemon status
bd daemon logs
bd daemon stop
bd daemon start
Merge Conflicts
git status
rm .beads/*.db
bd migrate
bd validate
Performance Issues
bd daemon status
bd compact --older-than 90d
du -sh .beads/
bd --profile list
Related Tools
- git: Version control (bd integrates natively)
- bv: Interactive graph visualization for bd issues
- sqlite3: Direct database queries if needed
- jq: JSON processing for structured output
- graphviz: Render dependency graphs (dot, neato, circo)
- rg (ripgrep): Fast text search in issues
- fd: Fast file search for bd files
References
For complete details, see:
- Type Definitions:
@bd-codebase/types/core.ts
- Git-Native Principles:
@bd-codebase/principles/git-native.md
- DAG Dependencies:
@bd-codebase/principles/dag-dependencies.md
- Task Workflows:
@bd-codebase/templates/task-workflow.md
- Codebase README:
@bd-codebase/README.md
Quick Reference
See assets/cheatsheet.md for one-page reference.
Remember: bd is designed to work like git because it is git. Think of issues as files, operations as commits, and sync as push/pull. It's that simple.