start / stop / status
snippbot start
Section titled “snippbot start”Start the Snippbot daemon server.
snippbot start # Start with defaultssnippbot start --port 9000 # Custom portsnippbot start --host 0.0.0.0 # Bind to all interfacessnippbot start --dev # Dev mode with auto-reload| Option | Default | Description |
|---|---|---|
--port | 18781 | API port |
--host | "" (dual-stack) | Host to bind |
--dev | off | Auto-reload on code changes |
Once running, the daemon serves:
- API:
http://{host}:{port}/api - UI:
http://{host}:{port}/ - Health:
http://{host}:{port}/health
snippbot stop
Section titled “snippbot stop”Stop the running daemon.
snippbot stop # Graceful stop (SIGTERM, 15s timeout)snippbot stop --force # Force kill (SIGKILL)snippbot stop --port 9000 # Stop daemon on custom portsnippbot stop --strict # Exit 1 if no daemon was running| Option | Default | Description |
|---|---|---|
--port | 18781 | Port the daemon is running on |
--force | off | Force kill instead of graceful shutdown |
--strict | off | Exit non-zero if no daemon was running (script-friendly) |
The graceful stop sends SIGTERM and waits up to 15 seconds for in-flight requests to complete. Use --force if the daemon is unresponsive.
By default snippbot stop exits 0 even when there was nothing to stop (so repeated invocations are idempotent). Pass --strict in scripts that need to distinguish “stopped one” from “none to stop”.
snippbot status
Section titled “snippbot status”Check whether the daemon is running.
snippbot status # Table outputsnippbot status --json # JSON output| Option | Default | Description |
|---|---|---|
--json | off | JSON output |
--port | 18781 | API port to check |
--host | "" (dual-stack) | Host to check |
Example output:
┌──────────┬──────────────────────────────┐│ Property │ Value │├──────────┼──────────────────────────────┤│ Status │ running ││ Uptime │ 2h 15m ││ Host │ 127.0.0.1 ││ Port │ 18781 ││ API │ http://127.0.0.1:18781/api ││ UI │ http://127.0.0.1:18781 │└──────────┴──────────────────────────────┘JSON output:
{ "running": true, "status": "ok", "host": "127.0.0.1", "port": 18781, "uptime_seconds": 8100}Health endpoints
Section titled “Health endpoints”The daemon exposes three health endpoints (no auth required):
| Endpoint | Purpose |
|---|---|
GET /health | Basic liveness |
GET /health/ready | Readiness (databases loaded) |
GET /health/live | Kubernetes liveness probe |
curl http://localhost:18781/health# {"status": "ok", "version": "0.5.0", "uptime_seconds": 3600}