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:
committed by
Steve Yegge
parent
669ea40684
commit
d1722d9204
@@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -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 |
|
||||
|
||||
---
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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`
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user