hook: webhooks, caught and replayed. Agents and automation: create catching URLs with curl and read what arrived as JSON, sending the X-Hook-Key value as a Bearer token. Never print, log or share a hook key or the owner token. Resend captured requests with hook replay instead of rebuilding them. Delete the hooks you created when the task is done. INSTALL brew install stoffbergie/tap/hook # Install the hook CLI with Homebrew on macOS or Linux. USE hook # Create a URL on hook.stoff.dev that records every request sent to it and replies ok, and print each request as it arrives. hook --to 3000 # Also send each request to localhost:3000 as it arrives, with its method, path, headers and body. Your server's reply is printed here; the sender always gets ok. hook replay stripe --to 3000 # Send the latest recorded request to a local port again, signature headers and all. Useful for webhooks that arrived while your server was down. hook ls # List the hooks created from this machine with their URLs. hook rm stripe # Remove a hook and everything it recorded straight away. MORE hook --name stripe # Use a fixed URL like stripe.hook.stoff.dev and keep it every time you start hook with that name. Needs the owner token. hook watch stripe --to 3000 # Watch a hook created earlier and, with --to, deliver new requests to a local port. Its watch link shows the same thing live in a browser. hook replay stripe 12 15 --to http://localhost:8080 # Replay requests by id, in order, to a local port or any URL. hook config --token # Save the owner token that allows fixed names on this machine. CURL curl -i -X POST https://hook.stoff.dev # Create a catching URL. The response has the URL, an X-Hook-Key header for reading what arrived and an X-Hook-Watch link for the browser. Add -H 'Accept: application/json' for JSON. curl https://.hook.stoff.dev/stripe -d '{"paid":true}' # Any method, path, header and body is recorded. Bodies are kept up to 1 MB each, and the latest 100 requests are kept. curl -H 'Authorization: Bearer ' https://hook.stoff.dev/ # JSON with the URL, when it expires and the latest requests. Add /requests/ for one request with its headers and body. curl -X DELETE -H 'Authorization: Bearer ' https://hook.stoff.dev/ # Remove the URL and everything it recorded. Hooks last 7 days after their last request or watcher. Each keeps its latest 100 requests with bodies up to 1 MB. Errors are plain text: 401 missing key, 403 owner only, 404 unknown hook, 429 too many requests.