Document bd daemons commands (bd-150)

Amp-Thread-ID: https://ampcode.com/threads/T-f1cff202-188b-4850-a909-c2750d24ad22
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Steve Yegge
2025-10-26 19:03:03 -07:00
parent 7980b9c9e9
commit 4e38626361
3 changed files with 285 additions and 1 deletions

View File

@@ -396,6 +396,37 @@ bd sync
**Note:** Auto-sync is enabled by default. Manual export/import is rarely needed.
### Managing Daemons
bd runs a background daemon per workspace for auto-sync and RPC operations. Use `bd daemons` to manage multiple daemons:
```bash
# List all running daemons
bd daemons list
# Check health (version mismatches, stale sockets)
bd daemons health
# Stop a specific daemon
bd daemons stop /path/to/workspace
bd daemons stop 12345 # By PID
# View daemon logs
bd daemons logs /path/to/workspace -n 100
bd daemons logs 12345 -f # Follow mode
# Stop all daemons
bd daemons killall
bd daemons killall --force # Force kill if graceful fails
```
**Common use cases:**
- **After upgrading bd**: Run `bd daemons health` to check for version mismatches, then `bd daemons killall` to restart all daemons with the new version
- **Debugging**: Use `bd daemons logs <workspace>` to view daemon logs
- **Cleanup**: `bd daemons list` auto-removes stale sockets
See [commands/daemons.md](commands/daemons.md) for complete documentation.
## Examples
Check out the **[examples/](examples/)** directory for: