Skip to content

start / stop / status

Start the Snippbot daemon server.

Terminal window
snippbot start # Start with defaults
snippbot start --port 9000 # Custom port
snippbot start --host 0.0.0.0 # Bind to all interfaces
snippbot start --dev # Dev mode with auto-reload
OptionDefaultDescription
--port18781API port
--host"" (dual-stack)Host to bind
--devoffAuto-reload on code changes

Once running, the daemon serves:

  • API: http://{host}:{port}/api
  • UI: http://{host}:{port}/
  • Health: http://{host}:{port}/health

Stop the running daemon.

Terminal window
snippbot stop # Graceful stop (SIGTERM, 15s timeout)
snippbot stop --force # Force kill (SIGKILL)
snippbot stop --port 9000 # Stop daemon on custom port
snippbot stop --strict # Exit 1 if no daemon was running
OptionDefaultDescription
--port18781Port the daemon is running on
--forceoffForce kill instead of graceful shutdown
--strictoffExit 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”.


Check whether the daemon is running.

Terminal window
snippbot status # Table output
snippbot status --json # JSON output
OptionDefaultDescription
--jsonoffJSON output
--port18781API 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
}

The daemon exposes three health endpoints (no auth required):

EndpointPurpose
GET /healthBasic liveness
GET /health/readyReadiness (databases loaded)
GET /health/liveKubernetes liveness probe
Terminal window
curl http://localhost:18781/health
# {"status": "ok", "version": "0.5.0", "uptime_seconds": 3600}