Reference / hippo-daemon

CLI Reference

The hippo binary manages host keys, repository allowlists, device pairing, custom quota budgets, and the background WebSocket daemon. Inspect inline flags anytime with hippo --help.

Global Flags

Every subcommand accepts --state-dir <PATH> to override the default ~/.hippo directory. This is useful when running isolated test instances or secondary profiles.

hippo --state-dir /tmp/hippo-test init
hippo --state-dir /tmp/hippo-test doctor

Setup & Diagnostics

hippo init

Initializes or updates ~/.hippo/config.toml and generates the persistent host Ed25519 keypair and host UUID if they do not exist yet. Default bind address is 0.0.0.0:7749 with Cloudflare Quick Tunnel enabled.

hippo init [--relay-url <URL>] [--bind <ADDR>] [--tunnel <BOOL>]

# Examples
hippo init
hippo init --tunnel false --bind 100.64.0.10:7749
hippo init --relay-url wss://relay.yourdomain.net/ws

hippo doctor

Prints the configured host ID, bind address, relay URL, and active tunnel URL, and verifies PATH availability for agy, claude, codex, opencode, cloudflared, tailscale, and git.

hippo doctor

Pairing & Devices

hippo pair

Generates an 18-byte random one-time pairing secret stored in devices.json, renders a QR code directly in your terminal, and prints a hippo://pair?d=... setup URI.

hippo pair [--ttl-secs 300] [--direct-url <URL>] [--relay-url <URL>]

# Examples
hippo pair
hippo pair --ttl-secs 600
hippo pair --direct-url wss://workstation.your-tailnet.ts.net/ws
hippo pair --relay-url wss://relay.yourdomain.net/ws

How verification works: The mobile client proves possession of the short-lived pairing secret by signing an HMAC-SHA256 pairing_proof_b64 over its HandshakeInit transcript. Once verified, the device is registered in devices.json and the secret is cleared.

hippo devices list and hippo devices revoke

Inspect paired devices or revoke a device permanently by its UUID. Revocation immediately blocks future handshakes and drops active access.

hippo devices list
hippo devices revoke 550e8400-e29b-41d4-a716-446655440000

Workspaces

Only allowlisted repositories can be browsed, read, edited, or targeted by prompts from mobile. Adding a path canonicalizes it on disk and assigns an 8-character short workspace ID.

hippo workspace add <PATH> [--name <LABEL>]
hippo workspace list
hippo workspace remove <ID>

# Examples
hippo workspace add ~/projects/backend --name backend-api
hippo workspace list
hippo workspace remove 3f8a91c2

Quota Budgets

Set optional local request caps per provider (claude, codex, opencode, agy) or specific model string when a CLI does not report official percentages.

hippo quota set <PROVIDER> --requests <N> [--window-hours 1]
hippo quota clear <PROVIDER>

# Examples
hippo quota set claude --requests 50 --window-hours 1
hippo quota set "agy:Gemini 4 Hydrogen (High)" --requests 40 --window-hours 5
hippo quota clear claude

Service & Daemon

hippo service install / uninstall

Registers or removes the OS user background service:

  • Linux: Writes and enables ~/.config/systemd/user/hippo.service via systemd --user. Inspect logs with systemctl --user status hippo.
  • macOS: Installs a LaunchAgent plist labeled dev.hippo.daemon in ~/Library/LaunchAgents/.
  • Windows: Registers and starts a Scheduled Task named HippoDaemon triggered at logon.
hippo service install
hippo service uninstall

hippo daemon run

Runs the daemon directly in the foreground: binds the direct WebSocket listener (:7749) and starts the Cloudflare quick tunnel loop and/or outbound relay loop if configured.

hippo daemon run

Local State Directory (~/.hippo/)

All host configuration, device keys, and job history stay on your workstation inside ~/.hippo/ (created mode 0700 on Unix, sensitive files written mode 0600).

Files stored inside ~/.hippo/
File Format Contents
config.toml TOML (0600) Host UUID, name, Ed25519 keypair, bind address, tunnel/relay URLs, custom CLI binary paths, and quota budgets.
workspaces.toml TOML (0600) Registered repository allowlist (short ID, display label, canonical root path).
devices.json JSON (0600) Paired mobile device public keys, pairing timestamps, revocation flags, and active one-time pairing secret with attempt counter.
daemon.json JSON (0600) Runtime lockfile holding daemon PID, WebSocket port, and any active trycloudflare.com WSS URL.
hippo.db SQLite WAL Conversations, turns, jobs, sequenced job_events for reconnect replay, approvals, and local quota usage history.