From d1722d9204c809e33a75f3592c9c0ca74e505c28 Mon Sep 17 00:00:00 2001 From: beads/crew/fang Date: Wed, 14 Jan 2026 21:46:29 -0800 Subject: [PATCH] docs: update daemon CLI syntax from flags to subcommands MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update all documentation to use the new subcommand syntax: - `bd daemon --start` → `bd daemon start` - `bd daemon --stop` → `bd daemon stop` - `bd daemon --status` → `bd daemon status` - `bd daemon --health` → `bd daemon status --all` - `--global=false` → `--local` The old flag syntax is deprecated but still works with warnings. Closes: bd-734vd Co-Authored-By: Claude Opus 4.5 --- .claude/settings.json | 48 ------------------- claude-plugin/commands/daemon.md | 4 +- .../skills/beads/resources/TROUBLESHOOTING.md | 22 ++++----- cmd/bd/daemon_autostart.go | 6 +-- docs/EXCLUSIVE_LOCK.md | 2 +- examples/monitor-webui/README.md | 2 +- examples/monitor-webui/main.go | 2 +- .../server_routing_validation_diagnostics.go | 2 +- 8 files changed, 20 insertions(+), 68 deletions(-) delete mode 100644 .claude/settings.json diff --git a/.claude/settings.json b/.claude/settings.json deleted file mode 100644 index 8a32066f..00000000 --- a/.claude/settings.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "hooks": { - "SessionStart": [ - { - "matcher": "", - "hooks": [ - { - "type": "command", - "command": "export PATH=\"$HOME/go/bin:$HOME/bin:$PATH\" && gt prime --hook && gt nudge deacon session-started" - } - ] - } - ], - "PreCompact": [ - { - "matcher": "", - "hooks": [ - { - "type": "command", - "command": "export PATH=\"$HOME/go/bin:$HOME/bin:$PATH\" && gt prime" - } - ] - } - ], - "UserPromptSubmit": [ - { - "matcher": "", - "hooks": [ - { - "type": "command", - "command": "export PATH=\"$HOME/go/bin:$HOME/bin:$PATH\" && gt mail check --inject" - } - ] - } - ], - "Stop": [ - { - "matcher": "", - "hooks": [ - { - "type": "command", - "command": "export PATH=\"$HOME/go/bin:$HOME/bin:$PATH\" && gt costs record" - } - ] - } - ] - } -} diff --git a/claude-plugin/commands/daemon.md b/claude-plugin/commands/daemon.md index 1d67fa56..59de65e0 100644 --- a/claude-plugin/commands/daemon.md +++ b/claude-plugin/commands/daemon.md @@ -1,6 +1,6 @@ --- description: Manage background sync daemon -argument-hint: [start] [stop] [status] [--health] +argument-hint: [start] [stop] [status] --- Manage the per-project background daemon that handles database connections and syncs with git. @@ -42,7 +42,7 @@ Each project runs its own daemon at `.beads/bd.sock` for complete database isola - **Start**: `bd daemon start` (or auto-starts on first `bd` command) - **Stop**: `bd daemon stop` - **Status**: `bd daemon status` -- **Health**: `bd daemon --health` - shows uptime, cache stats, performance metrics +- **Health**: `bd daemon status --all` - shows uptime, cache stats, performance metrics - **Metrics**: `bd daemon --metrics` - detailed operational telemetry ## Sync Options diff --git a/claude-plugin/skills/beads/resources/TROUBLESHOOTING.md b/claude-plugin/skills/beads/resources/TROUBLESHOOTING.md index c0647de1..03af6dc0 100644 --- a/claude-plugin/skills/beads/resources/TROUBLESHOOTING.md +++ b/claude-plugin/skills/beads/resources/TROUBLESHOOTING.md @@ -64,7 +64,7 @@ go install github.com/steveyegge/beads/cmd/bd@latest **3. Restart daemon after upgrade:** ```bash pkill -f "bd daemon" # Kill old daemon -bd daemon # Start new daemon with fix +bd daemon start # Start new daemon with fix ``` **4. Test dependency creation:** @@ -172,7 +172,7 @@ bd show issue-1 ### Symptom ```bash -bd daemon +bd daemon start # Error: not in a git repository # Hint: run 'git init' to initialize a repository ``` @@ -189,19 +189,19 @@ bd daemon requires a **git repository** because it uses git for: ```bash # In your project directory git init -bd daemon +bd daemon start # ✓ Daemon should start now ``` -**Prevent git remote operations:** +**Run in local-only mode (no git required):** ```bash -# If you don't want daemon to pull from remote -bd daemon --global=false +# If you don't want daemon to use git at all +bd daemon start --local ``` **Flags:** -- `--global=false`: Don't sync with git remote -- `--interval=10m`: Custom sync interval (default: 5m) +- `--local`: Run in local-only mode (no git required, no sync) +- `--interval=10m`: Custom sync interval (default: 5s) - `--auto-commit=true`: Auto-commit JSONL changes --- @@ -295,7 +295,7 @@ ls .beads/ **Start daemon once to initialize JSONL:** ```bash -bd daemon --global=false & +bd daemon start --local & # Wait for initialization sleep 2 @@ -320,7 +320,7 @@ cat .beads/issues.jsonl # Batch import script bd init myproject -bd daemon --global=false & # Start daemon +bd daemon start --local & # Start daemon sleep 3 # Wait for initialization # Now safe to use --no-daemon for performance @@ -476,7 +476,7 @@ If the **bd-issue-tracking skill** provides incorrect guidance: | Status updates lag | Use daemon mode (not `--no-daemon`) | | Daemon won't start | Run `git init` first | | Database errors on Google Drive | Move to local filesystem | -| JSONL file missing | Start daemon once: `bd daemon &` | +| JSONL file missing | Start daemon once: `bd daemon start &` | | Dependencies backwards (MCP) | Update to v0.15.0+, use `issue_id/depends_on_id` correctly | --- diff --git a/cmd/bd/daemon_autostart.go b/cmd/bd/daemon_autostart.go index da9c0d7c..213b1618 100644 --- a/cmd/bd/daemon_autostart.go +++ b/cmd/bd/daemon_autostart.go @@ -125,7 +125,7 @@ func restartDaemonForVersionMismatch() bool { return false } - args := []string{"daemon", "--start"} + args := []string{"daemon", "start"} cmd := execCommandFn(exe, args...) cmd.Env = append(os.Environ(), "BD_DAEMON_FOREGROUND=1") @@ -343,7 +343,7 @@ func startDaemonProcess(socketPath string) bool { binPath = os.Args[0] } - args := []string{"daemon", "--start"} + args := []string{"daemon", "start"} cmd := execCommandFn(binPath, args...) setupDaemonIO(cmd) @@ -497,7 +497,7 @@ func emitVerboseWarning() { case FallbackConnectFailed: fmt.Fprintf(os.Stderr, "Warning: Daemon unreachable at %s. Running in direct mode. Hint: bd daemon status\n", daemonStatus.SocketPath) case FallbackHealthFailed: - fmt.Fprintf(os.Stderr, "Warning: Daemon unhealthy. Falling back to direct mode. Hint: bd daemon --health\n") + fmt.Fprintf(os.Stderr, "Warning: Daemon unhealthy. Falling back to direct mode. Hint: bd daemon status --all\n") case FallbackAutoStartDisabled: fmt.Fprintf(os.Stderr, "Warning: Auto-start disabled (BEADS_AUTO_START_DAEMON=false). Running in direct mode. Hint: bd daemon\n") case FallbackAutoStartFailed: diff --git a/docs/EXCLUSIVE_LOCK.md b/docs/EXCLUSIVE_LOCK.md index fd390079..363b6f58 100644 --- a/docs/EXCLUSIVE_LOCK.md +++ b/docs/EXCLUSIVE_LOCK.md @@ -180,7 +180,7 @@ Check daemon logs (default: `.beads/daemon.log`) to troubleshoot lock issues. ## Testing Your Integration -1. **Start the daemon**: `bd daemon --interval 1m` +1. **Start the daemon**: `bd daemon start --interval 1m` 2. **Create a lock**: Use your tool to create `.beads/.exclusive-lock` 3. **Verify daemon skips**: Check daemon logs for "Skipping database" message 4. **Release lock**: Remove `.beads/.exclusive-lock` diff --git a/examples/monitor-webui/README.md b/examples/monitor-webui/README.md index bdceca76..d552c0ee 100644 --- a/examples/monitor-webui/README.md +++ b/examples/monitor-webui/README.md @@ -231,7 +231,7 @@ Make sure you've initialized a beads database with `bd init` or specify the data The monitor requires the daemon to avoid SQLite locking conflicts. Start the daemon first: ```bash -bd daemon +bd daemon start ``` ### WebSocket disconnects frequently diff --git a/examples/monitor-webui/main.go b/examples/monitor-webui/main.go index a7d703ae..e1e77c2a 100644 --- a/examples/monitor-webui/main.go +++ b/examples/monitor-webui/main.go @@ -158,7 +158,7 @@ func connectToDaemon(socketPath, dbPath string) error { if health.Error != "" { errMsg += fmt.Sprintf("\nError: %s", health.Error) } - return fmt.Errorf("%s\n\nTry restarting the daemon:\n bd daemon stop\n bd daemon", errMsg) + return fmt.Errorf("%s\n\nTry restarting the daemon:\n bd daemon stop\n bd daemon start", errMsg) } // Set database path diff --git a/internal/rpc/server_routing_validation_diagnostics.go b/internal/rpc/server_routing_validation_diagnostics.go index f800a974..af135a74 100644 --- a/internal/rpc/server_routing_validation_diagnostics.go +++ b/internal/rpc/server_routing_validation_diagnostics.go @@ -48,7 +48,7 @@ func (s *Server) checkVersionCompatibility(clientVersion string) error { cmp := semver.Compare(serverVer, clientVer) if cmp < 0 { // Daemon is older - needs upgrade - return fmt.Errorf("incompatible major versions: client %s, daemon %s. Daemon is older; upgrade and restart daemon: 'bd daemon stop && bd daemon'", + return fmt.Errorf("incompatible major versions: client %s, daemon %s. Daemon is older; upgrade and restart daemon: 'bd daemon stop && bd daemon start'", clientVersion, ServerVersion) } // Daemon is newer - client needs upgrade