refactor: simplify cli commands
This commit is contained in:
@@ -167,7 +167,7 @@ If set, CLAWDBOT derives defaults (only when you haven’t set them explicitly):
|
||||
|
||||
### `wizard`
|
||||
|
||||
Metadata written by CLI wizards (`onboard`, `configure`, `doctor`, `update`).
|
||||
Metadata written by CLI wizards (`onboard`, `configure`, `doctor`).
|
||||
|
||||
```json5
|
||||
{
|
||||
|
||||
@@ -172,15 +172,13 @@ Notes:
|
||||
- `daemon status` probes the Gateway RPC by default (same URL/token defaults as `gateway status`).
|
||||
- `daemon status --deep` adds system-level scans (LaunchDaemons/system units).
|
||||
- `daemon status` now reports runtime state (PID/exit status) and port collisions when the gateway isn’t reachable.
|
||||
- `gateway install|uninstall|start|stop|restart` remain supported as aliases; `daemon` is the dedicated manager.
|
||||
- `gateway daemon status` is an alias for `clawdbot daemon status`.
|
||||
- If other gateway-like services are detected, the CLI warns. We recommend **one gateway per machine**; one gateway can host multiple agents.
|
||||
- Cleanup: `clawdbot daemon uninstall` (current service) and `clawdbot doctor` (legacy migrations).
|
||||
|
||||
Bundled mac app:
|
||||
- Clawdbot.app can bundle a bun-compiled gateway binary and install a per-user LaunchAgent labeled `com.clawdbot.gateway`.
|
||||
- To stop it cleanly, use `clawdbot gateway stop` (or `launchctl bootout gui/$UID/com.clawdbot.gateway`).
|
||||
- To restart, use `clawdbot gateway restart` (or `launchctl kickstart -k gui/$UID/com.clawdbot.gateway`).
|
||||
- To stop it cleanly, use `clawdbot daemon stop` (or `launchctl bootout gui/$UID/com.clawdbot.gateway`).
|
||||
- To restart, use `clawdbot daemon restart` (or `launchctl kickstart -k gui/$UID/com.clawdbot.gateway`).
|
||||
|
||||
## Supervision (systemd user unit)
|
||||
Create `~/.config/systemd/user/clawdbot-gateway.service`:
|
||||
@@ -236,10 +234,10 @@ Windows installs should use **WSL2** and follow the Linux systemd section above.
|
||||
|
||||
## CLI helpers
|
||||
- `clawdbot gateway health|status` — request health/status over the Gateway WS.
|
||||
- `clawdbot gateway send --to <num> --message "hi" [--media-url ...]` — send via Gateway (idempotent).
|
||||
- `clawdbot gateway agent --message "hi" [--to ...]` — run an agent turn (waits for final by default).
|
||||
- `clawdbot send --to <num> --message "hi" [--media ...]` — send via Gateway (idempotent for WhatsApp).
|
||||
- `clawdbot agent --message "hi" --to <num>` — run an agent turn (waits for final by default).
|
||||
- `clawdbot gateway call <method> --params '{"k":"v"}'` — raw method invoker for debugging.
|
||||
- `clawdbot gateway stop|restart` — stop/restart the supervised gateway service (launchd/systemd).
|
||||
- `clawdbot daemon stop|restart` — stop/restart the supervised gateway service (launchd/systemd).
|
||||
- Gateway helper subcommands assume a running gateway on `--url`; they no longer auto-spawn one.
|
||||
|
||||
## Migration guidance
|
||||
|
||||
@@ -202,7 +202,7 @@ kill -9 <PID>
|
||||
If the gateway is supervised by launchd, killing the PID will just respawn it.
|
||||
Stop the supervisor instead:
|
||||
```bash
|
||||
clawdbot gateway stop
|
||||
clawdbot daemon stop
|
||||
# Or: launchctl bootout gui/$UID/com.clawdbot.gateway
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user