# CLI Command Reference **For:** AI agents and developers using bd command-line interface **Version:** 0.21.0+ ## Quick Navigation - [Basic Operations](#basic-operations) - [Issue Management](#issue-management) - [Dependencies & Labels](#dependencies--labels) - [Filtering & Search](#filtering--search) - [Advanced Operations](#advanced-operations) - [Molecular Chemistry](#molecular-chemistry) - [Database Management](#database-management) - [Editor Integration](#editor-integration) ## Basic Operations ### Check Status ```bash # Check database path and daemon status bd info --json # Example output: # { # "database_path": "/path/to/.beads/beads.db", # "issue_prefix": "bd", # "daemon_running": true, # "agent_mail_enabled": false # } ``` ### Find Work ```bash # Find ready work (no blockers) bd ready --json # Find stale issues (not updated recently) bd stale --days 30 --json # Default: 30 days bd stale --days 90 --status in_progress --json # Filter by status bd stale --limit 20 --json # Limit results ``` ## Issue Management ### Create Issues ```bash # Basic creation # IMPORTANT: Always quote titles and descriptions with double quotes bd create "Issue title" -t bug|feature|task -p 0-4 -d "Description" --json # Create with explicit ID (for parallel workers) bd create "Issue title" --id worker1-100 -p 1 --json # Create with labels (--labels or --label work) bd create "Issue title" -t bug -p 1 -l bug,critical --json bd create "Issue title" -t bug -p 1 --label bug,critical --json # Examples with special characters (all require quoting): bd create "Fix: auth doesn't validate tokens" -t bug -p 1 --json bd create "Add support for OAuth 2.0" -d "Implement RFC 6749 (OAuth 2.0 spec)" --json # Create multiple issues from markdown file bd create -f feature-plan.md --json # Create with description from file (avoids shell escaping issues) bd create "Issue title" --body-file=description.md --json bd create "Issue title" --body-file description.md -p 1 --json # Read description from stdin echo "Description text" | bd create "Issue title" --body-file=- --json cat description.md | bd create "Issue title" --body-file - -p 1 --json # Create epic with hierarchical child tasks bd create "Auth System" -t epic -p 1 --json # Returns: bd-a3f8e9 bd create "Login UI" -p 1 --parent bd-a3f8e9 --json # Auto-assigned: bd-a3f8e9.1 bd create "Backend validation" -p 1 --parent bd-a3f8e9 --json # Auto-assigned: bd-a3f8e9.2 bd create "Tests" -p 1 --parent bd-a3f8e9 --json # Auto-assigned: bd-a3f8e9.3 # Create and link discovered work (one command) bd create "Found bug" -t bug -p 1 --deps discovered-from: --json ``` ### Update Issues ```bash # Update one or more issues bd update [...] --status in_progress --json bd update [...] --priority 1 --json # Edit issue fields in $EDITOR (HUMANS ONLY - not for agents) # NOTE: This command is intentionally NOT exposed via the MCP server # Agents should use 'bd update' with field-specific parameters instead bd edit # Edit description bd edit --title # Edit title bd edit --design # Edit design notes bd edit --notes # Edit notes bd edit --acceptance # Edit acceptance criteria ``` ### Close/Reopen Issues ```bash # Complete work (supports multiple IDs) bd close [...] --reason "Done" --json # Reopen closed issues (supports multiple IDs) bd reopen [...] --reason "Reopening" --json ``` ### View Issues ```bash # Show dependency tree bd dep tree # Get issue details (supports multiple IDs) bd show [...] --json ``` ## Dependencies & Labels ### Dependencies ```bash # Link discovered work (old way - two commands) bd dep add --type discovered-from # Create and link in one command (new way - preferred) bd create "Issue title" -t bug -p 1 --deps discovered-from: --json ``` ### Labels ```bash # Label management (supports multiple IDs) bd label add [...]