Merge GH#518 setup docs

This commit is contained in:
Steve Yegge
2025-12-16 01:18:51 -08:00
4 changed files with 19124 additions and 18 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -81,6 +81,29 @@ They should be:
Users who want custom Skills can create their own, but beads doesn't ship with or require them. Users who want custom Skills can create their own, but beads doesn't ship with or require them.
## Installation
```bash
# Install Claude Code hooks globally
bd setup claude
# Install for this project only
bd setup claude --project
# Use stealth mode (flush only, no git operations)
bd setup claude --stealth
# Check installation status
bd setup claude --check
# Remove hooks
bd setup claude --remove
```
**What it installs:**
- SessionStart hook: Runs `bd prime` when Claude Code starts a session
- PreCompact hook: Runs `bd prime` before context compaction to preserve workflow instructions
## Related Files ## Related Files
- `cmd/bd/prime.go` - Context generation - `cmd/bd/prime.go` - Context generation

View File

@@ -11,7 +11,7 @@
- [Filtering & Search](#filtering--search) - [Filtering & Search](#filtering--search)
- [Advanced Operations](#advanced-operations) - [Advanced Operations](#advanced-operations)
- [Database Management](#database-management) - [Database Management](#database-management)
- [Setup & Integration](#setup--integration) - [Editor Integration](#editor-integration)
## Basic Operations ## Basic Operations
@@ -551,23 +551,43 @@ bd sync # Force immediate sync, bypass debounce
**ALWAYS run `bd sync` at end of agent sessions** to ensure changes are committed/pushed immediately. **ALWAYS run `bd sync` at end of agent sessions** to ensure changes are committed/pushed immediately.
## Setup & Integration ## Editor Integration
Configure beads integration with AI coding tools: ### Setup Commands
```bash ```bash
# Setup integration # Setup editor integration (choose based on your editor)
bd setup claude # Claude Code hooks (SessionStart/PreCompact) bd setup claude # Claude Code - installs SessionStart/PreCompact hooks
bd setup cursor # Cursor IDE rules file bd setup cursor # Cursor IDE - creates .cursor/rules/beads.mdc
bd setup aider # Aider configuration bd setup aider # Aider - creates .aider.conf.yml
# Check/remove integration # Check if integration is installed
bd setup claude --check # Verify installation bd setup claude --check
bd setup claude --remove # Remove hooks bd setup cursor --check
bd setup claude --project # Project-only (not global) bd setup aider --check
# Remove integration
bd setup claude --remove
bd setup cursor --remove
bd setup aider --remove
``` ```
See [SETUP.md](SETUP.md) for detailed documentation on each integration. **Claude Code options:**
```bash
bd setup claude # Install globally (~/.claude/settings.json)
bd setup claude --project # Install for this project only
bd setup claude --stealth # Use stealth mode (flush only, no git operations)
```
**What each setup does:**
- **Claude Code** (`bd setup claude`): Adds hooks to Claude Code's settings.json that run `bd prime` on SessionStart and PreCompact events
- **Cursor** (`bd setup cursor`): Creates `.cursor/rules/beads.mdc` with workflow instructions
- **Aider** (`bd setup aider`): Creates `.aider.conf.yml` with bd workflow instructions
See also:
- [INSTALLING.md](INSTALLING.md#ide-and-editor-integrations) - Installation guide
- [AIDER_INTEGRATION.md](AIDER_INTEGRATION.md) - Detailed Aider guide
- [CLAUDE_INTEGRATION.md](CLAUDE_INTEGRATION.md) - Claude integration design
## See Also ## See Also
@@ -575,5 +595,4 @@ See [SETUP.md](SETUP.md) for detailed documentation on each integration.
- [DAEMON.md](DAEMON.md) - Daemon management and event-driven mode - [DAEMON.md](DAEMON.md) - Daemon management and event-driven mode
- [GIT_INTEGRATION.md](GIT_INTEGRATION.md) - Git workflows and merge strategies - [GIT_INTEGRATION.md](GIT_INTEGRATION.md) - Git workflows and merge strategies
- [LABELS.md](../LABELS.md) - Label system guide - [LABELS.md](../LABELS.md) - Label system guide
- [SETUP.md](SETUP.md) - AI tool integration setup
- [README.md](../README.md) - User documentation - [README.md](../README.md) - User documentation

View File

@@ -133,15 +133,17 @@ brew install bd
cd your-project cd your-project
bd init --quiet bd init --quiet
# 3. Install hooks for automatic context injection # 3. Setup editor integration (choose one)
bd hooks install bd setup claude # Claude Code - installs SessionStart/PreCompact hooks
bd setup cursor # Cursor IDE - creates .cursor/rules/beads.mdc
bd setup aider # Aider - creates .aider.conf.yml
``` ```
**How it works:** **How it works:**
- SessionStart hook runs `bd prime` automatically - Editor hooks/rules inject `bd prime` automatically on session start
- `bd prime` injects ~1-2k tokens of workflow context - `bd prime` provides ~1-2k tokens of workflow context
- You use `bd` CLI commands directly - You use `bd` CLI commands directly
- Git hooks auto-sync the database - Git hooks (installed by `bd init`) auto-sync the database
**Why this is recommended:** **Why this is recommended:**
- **Context efficient** - ~1-2k tokens vs 10-50k for MCP tool schemas - **Context efficient** - ~1-2k tokens vs 10-50k for MCP tool schemas
@@ -149,6 +151,13 @@ bd hooks install
- **Universal** - Works with any editor that has shell access - **Universal** - Works with any editor that has shell access
- **More sustainable** - Less compute per request - **More sustainable** - Less compute per request
**Verify installation:**
```bash
bd setup claude --check # Check Claude Code integration
bd setup cursor --check # Check Cursor integration
bd setup aider --check # Check Aider integration
```
### Claude Code Plugin (Optional) ### Claude Code Plugin (Optional)
For enhanced UX with slash commands: For enhanced UX with slash commands: