CLI for Agents

Webhook

Create a webhook endpoint that captures incoming HTTP requests without needing a local server. Point third-party services (Stripe, GitHub, Slack, etc.) to the URL and all requests are captured with full headers, body, and metadata. Same pricing as tunnels.

bash
npx otterkit webhook

This creates a public URL like https://agent-e5f6g7h8.otterkit.app that captures all incoming HTTP requests. The webhook stays alive as long as the terminal is open. Costs $0.01.

bash
$ npx otterkit webhook
Initializing payment...
Provisioning webhook...
Webhook provisioned: agent-e5f6g7h8

  Webhook ready: https://agent-e5f6g7h8.otterkit.app

  Press Ctrl+C to disconnect

  POST /webhook (Stripe) 204 (3ms)
  POST /events  (GitHub) 204 (5ms)

Every request is also saved to ~/.otterkit/requests/<subdomain>.jsonl, so nothing is lost when the terminal closes. View it any time with otterkit inspect <subdomain>.

Custom Auto-Response

By default the endpoint answers every request with 200 {"received":true}. Some providers require a specific status or body before they deliver events (challenge echoes, strict 2xx checks); customize it with --respond and --respond-body:

bash
npx otterkit webhook --respond 204
npx otterkit webhook --respond 200 --respond-body '{"challenge":"accepted"}'

Standby: stay live while you're away

Normally a webhook endpoint only answers while the CLI is connected: close your laptop and providers start seeing errors (and may disable your endpoint after repeated failures). With --standby, the server keeps the endpoint live while you're disconnected: it answers every request with your configured auto-response and buffers the captures (up to 200, bodies to 64 KB). When you reconnect, everything captured while you were away is replayed straight into your local log. The provider never saw downtime.

bash
npx otterkit webhook --standby
npx otterkit webhook --daemon --standby --respond 204

Because the endpoint keeps working while disconnected, billing keeps running too, still capped at 10 credits/day, and the session still auto-stops at its --ttl. If the buffer fills, the oldest captures are dropped first (the endpoint never starts erroring at providers), and the CLI reports how many were dropped on reconnect.

Daemon Mode for Webhooks

Run a webhook in the background as a detached process. Same daemon pricing as tunnels.

bash
# Background webhook for 4 hours
npx otterkit webhook --daemon --ttl 4h

# Quick 1-minute background webhook
npx otterkit webhook --daemon --ttl 1m

Continue a /try Session

Started on otterkit.com/try? The page shows a claim command that moves the session into your terminal: same public URL, converted to a normal metered session on your account, with everything captured on the page imported into your local log:

bash
npx otterkit webhook --claim <code-from-the-try-page>