CLI for Agents

Intercept & Inspect

Capture and forward HTTP requests in one command. Every request is logged to a local JSONL file while being forwarded to your local server. Combines the best of tunnels (forwarding) and webhooks (capture). Same pricing as tunnels.

bash
# Capture + forward to local port ($0.01)
npx otterkit intercept 3000

# Capture only, no local server ($0.01)
npx otterkit intercept

# Background intercept for 4 hours ($0.03)
npx otterkit intercept 3000 --daemon --ttl 4h

Requests are logged to ~/.otterkit/requests/<subdomain>.jsonl, one JSON object per line. Each entry includes timestamp, method, path, headers, body (base64), response status, and duration.

Inspect Captured Requests

View captured requests from intercept mode with the inspect command:

bash
# Pretty-print last 20 requests
npx otterkit inspect agent-a1b2c3d4

# Raw JSONL output (pipe-friendly for jq, etc.)
npx otterkit inspect agent-a1b2c3d4 --json

# Show last 50 requests
npx otterkit inspect agent-a1b2c3d4 --last 50

The JSONL format works with standard tools like jq, tail -f, andgrep. Log files are cleaned up automatically when the daemon is stopped.