docs: update daemon CLI syntax from flags to subcommands

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 <noreply@anthropic.com>
This commit is contained in:
beads/crew/fang
2026-01-14 21:46:29 -08:00
committed by Steve Yegge
parent 669ea40684
commit d1722d9204
8 changed files with 20 additions and 68 deletions

View File

@@ -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"
}
]
}
]
}
}

View File

@@ -1,6 +1,6 @@
--- ---
description: Manage background sync daemon 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. 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) - **Start**: `bd daemon start` (or auto-starts on first `bd` command)
- **Stop**: `bd daemon stop` - **Stop**: `bd daemon stop`
- **Status**: `bd daemon status` - **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 - **Metrics**: `bd daemon --metrics` - detailed operational telemetry
## Sync Options ## Sync Options

View File

@@ -64,7 +64,7 @@ go install github.com/steveyegge/beads/cmd/bd@latest
**3. Restart daemon after upgrade:** **3. Restart daemon after upgrade:**
```bash ```bash
pkill -f "bd daemon" # Kill old daemon 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:** **4. Test dependency creation:**
@@ -172,7 +172,7 @@ bd show issue-1
### Symptom ### Symptom
```bash ```bash
bd daemon bd daemon start
# Error: not in a git repository # Error: not in a git repository
# Hint: run 'git init' to initialize a 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 ```bash
# In your project directory # In your project directory
git init git init
bd daemon bd daemon start
# ✓ Daemon should start now # ✓ Daemon should start now
``` ```
**Prevent git remote operations:** **Run in local-only mode (no git required):**
```bash ```bash
# If you don't want daemon to pull from remote # If you don't want daemon to use git at all
bd daemon --global=false bd daemon start --local
``` ```
**Flags:** **Flags:**
- `--global=false`: Don't sync with git remote - `--local`: Run in local-only mode (no git required, no sync)
- `--interval=10m`: Custom sync interval (default: 5m) - `--interval=10m`: Custom sync interval (default: 5s)
- `--auto-commit=true`: Auto-commit JSONL changes - `--auto-commit=true`: Auto-commit JSONL changes
--- ---
@@ -295,7 +295,7 @@ ls .beads/
**Start daemon once to initialize JSONL:** **Start daemon once to initialize JSONL:**
```bash ```bash
bd daemon --global=false & bd daemon start --local &
# Wait for initialization # Wait for initialization
sleep 2 sleep 2
@@ -320,7 +320,7 @@ cat .beads/issues.jsonl
# Batch import script # Batch import script
bd init myproject bd init myproject
bd daemon --global=false & # Start daemon bd daemon start --local & # Start daemon
sleep 3 # Wait for initialization sleep 3 # Wait for initialization
# Now safe to use --no-daemon for performance # 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`) | | Status updates lag | Use daemon mode (not `--no-daemon`) |
| Daemon won't start | Run `git init` first | | Daemon won't start | Run `git init` first |
| Database errors on Google Drive | Move to local filesystem | | 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 | | Dependencies backwards (MCP) | Update to v0.15.0+, use `issue_id/depends_on_id` correctly |
--- ---

View File

@@ -125,7 +125,7 @@ func restartDaemonForVersionMismatch() bool {
return false return false
} }
args := []string{"daemon", "--start"} args := []string{"daemon", "start"}
cmd := execCommandFn(exe, args...) cmd := execCommandFn(exe, args...)
cmd.Env = append(os.Environ(), "BD_DAEMON_FOREGROUND=1") cmd.Env = append(os.Environ(), "BD_DAEMON_FOREGROUND=1")
@@ -343,7 +343,7 @@ func startDaemonProcess(socketPath string) bool {
binPath = os.Args[0] binPath = os.Args[0]
} }
args := []string{"daemon", "--start"} args := []string{"daemon", "start"}
cmd := execCommandFn(binPath, args...) cmd := execCommandFn(binPath, args...)
setupDaemonIO(cmd) setupDaemonIO(cmd)
@@ -497,7 +497,7 @@ func emitVerboseWarning() {
case FallbackConnectFailed: case FallbackConnectFailed:
fmt.Fprintf(os.Stderr, "Warning: Daemon unreachable at %s. Running in direct mode. Hint: bd daemon status\n", daemonStatus.SocketPath) fmt.Fprintf(os.Stderr, "Warning: Daemon unreachable at %s. Running in direct mode. Hint: bd daemon status\n", daemonStatus.SocketPath)
case FallbackHealthFailed: 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: case FallbackAutoStartDisabled:
fmt.Fprintf(os.Stderr, "Warning: Auto-start disabled (BEADS_AUTO_START_DAEMON=false). Running in direct mode. Hint: bd daemon\n") fmt.Fprintf(os.Stderr, "Warning: Auto-start disabled (BEADS_AUTO_START_DAEMON=false). Running in direct mode. Hint: bd daemon\n")
case FallbackAutoStartFailed: case FallbackAutoStartFailed:

View File

@@ -180,7 +180,7 @@ Check daemon logs (default: `.beads/daemon.log`) to troubleshoot lock issues.
## Testing Your Integration ## 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` 2. **Create a lock**: Use your tool to create `.beads/.exclusive-lock`
3. **Verify daemon skips**: Check daemon logs for "Skipping database" message 3. **Verify daemon skips**: Check daemon logs for "Skipping database" message
4. **Release lock**: Remove `.beads/.exclusive-lock` 4. **Release lock**: Remove `.beads/.exclusive-lock`

View File

@@ -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: The monitor requires the daemon to avoid SQLite locking conflicts. Start the daemon first:
```bash ```bash
bd daemon bd daemon start
``` ```
### WebSocket disconnects frequently ### WebSocket disconnects frequently

View File

@@ -158,7 +158,7 @@ func connectToDaemon(socketPath, dbPath string) error {
if health.Error != "" { if health.Error != "" {
errMsg += fmt.Sprintf("\nError: %s", 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 // Set database path

View File

@@ -48,7 +48,7 @@ func (s *Server) checkVersionCompatibility(clientVersion string) error {
cmp := semver.Compare(serverVer, clientVer) cmp := semver.Compare(serverVer, clientVer)
if cmp < 0 { if cmp < 0 {
// Daemon is older - needs upgrade // 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) clientVersion, ServerVersion)
} }
// Daemon is newer - client needs upgrade // Daemon is newer - client needs upgrade