website/docs/integrations/claude-code.md
How to use beads with Claude Code.
bd setup claude
This installs:
bd prime on session startbd dolt push before context compactionAdd to your Claude Code hooks configuration:
{
"hooks": {
"SessionStart": ["bd prime"],
"PreCompact": ["bd dolt push"]
}
}
bd setup claude --check
bd prime injects ~1-2k tokens of contextbd CLI commands directlybd dolt push saves work to Dolt remote# Always include description for context
bd create "Fix authentication bug" \
--description="Login fails with special characters in password" \
-t bug -p 1 --json
# Link discovered issues
bd create "Found SQL injection" \
--description="User input not sanitized in query builder" \
--deps discovered-from:bd-42 --json
# Find ready work
bd ready --json
# Start work
bd update bd-42 --claim --json
# Complete work
bd close bd-42 --reason "Fixed in commit abc123" --json
# List open issues
bd list --status open --json
# Show issue details
bd show bd-42 --json
# Check blocked issues
bd blocked --json
# ALWAYS run at session end
bd dolt push
--jsonbd list --json # Parse programmatically
bd create "Task" --json # Get issue ID from output
bd show bd-42 --json # Structured data
# Good
bd create "Fix auth bug" \
--description="Login fails when password contains quotes" \
-t bug -p 1 --json
# Bad - no context for future work
bd create "Fix auth bug" -t bug -p 1 --json
# When you discover issues during work
bd create "Found related bug" \
--deps discovered-from:bd-current --json
# ALWAYS run before ending
bd dolt push
For enhanced UX with slash commands:
# In Claude Code
/plugin marketplace add gastownhall/beads
/plugin install beads
# Restart Claude Code
Adds slash commands:
/beads:ready - Show ready work/beads:create - Create issue/beads:show - Show issue/beads:update - Update issue/beads:close - Close issue# Check hook setup
bd setup claude --check
# Manually prime
bd prime
# Force push
bd dolt push
# Check system health
bd doctor
# Initialize beads
bd init --quiet