CLI for Agents
Await Requests
await blocks until a request matching your filters arrives on a capture log, then prints it — the scriptable primitive for CI and agents: trigger the event, await its arrival, assert on the payload. By default it keeps streaming matches; your session keeps running either way, since await only watches the log and never stops the tunnel behind it.
bash
# Stream every incoming request (Ctrl+C to stop)
npx otterkit await agent-a1b2c3d4
# CI: exit 0 the moment the webhook lands, exit 2 if it doesn't within 2 minutes
npx otterkit await agent-a1b2c3d4 --count 1 --timeout 120s --json
# Filters combine, matching inspect's
npx otterkit await agent-a1b2c3d4 --method POST --path /stripe --status 2xxWith --json each match prints as one JSON line, so an agent can pipe the payload straight into the next step. Exit codes are deterministic: 0 once --count is satisfied (or on Ctrl+C), 2 when --timeout expires unmet.
Typical CI shape:
otterkit webhook --daemon --json, point the provider's test event at the URL, then otterkit await <subdomain> --count 1 --timeout 120s as the assertion step.