CLI Getting Started
Install the Better Webhook CLI and start capturing, replaying, and testing webhooks locally in minutes.
CLI Getting Started
The Better Webhook CLI is a local development tool for capturing, replaying, and testing webhooks without exposing your localhost to the internet.
Installation
Homebrew (Recommended)
brew install --cask endalk200/tap/better-webhookGo install
go install github.com/endalk200/better-webhook/apps/webhook-cli/cmd/better-webhook@latestTo install a pinned release:
go install github.com/endalk200/better-webhook/apps/webhook-cli/cmd/better-webhook@vX.Y.ZManual download
Download the latest binary for your platform from GitHub Releases:
| Platform | Asset Name |
|---|---|
| macOS (ARM) | better-webhook-darwin-arm64.tar.gz |
| macOS (Intel) | better-webhook-darwin-x64.tar.gz |
| Linux (x64) | better-webhook-linux-x64.tar.gz |
| Linux (ARM) | better-webhook-linux-arm64.tar.gz |
| Windows | better-webhook-windows-x64.zip |
# Example: macOS ARM
curl -L https://github.com/endalk200/better-webhook/releases/latest/download/better-webhook-darwin-arm64.tar.gz -o better-webhook.tar.gz
tar -xzf better-webhook.tar.gz
chmod +x better-webhook
sudo mv better-webhook /usr/local/bin/Verify Installation
better-webhook --versionQuick Start
Use a terminal-only workflow to capture and replay real webhook traffic:
Start capture server
better-webhook capture --port 3001The CLI listens on http://localhost:3001 and stores captures in ~/.better-webhook/captures.
Point Webhooks to the Capture Server
Configure your webhook source (GitHub, Stripe, Ragie, Recall.ai, etc.) to send webhooks to:
http://localhost:3001/webhooks/your-providerTip: The capture server accepts any path and stores the request with headers and body.
Use a tunnel service like ngrok or cloudflared to expose the capture server if your webhook source can't reach localhost.
Trigger a Webhook
Perform an action that triggers a webhook (push code, create an issue, etc.). The webhook is saved locally.
Replay to your local server
In a second terminal, list captures and replay one to your app:
better-webhook captures list
better-webhook captures replay <capture-id> \
http://localhost:3000/api/webhooks/githubYou can replay the same webhook as many times as needed while debugging.
Using Templates
Don't have real webhooks to test with? Use pre-built templates:
# List available templates
better-webhook templates list
# Download a template
better-webhook templates download github-push
better-webhook templates download stripe-charge_failed
# Run a template against your endpoint
better-webhook templates run github-push http://localhost:3000/api/webhooks/github
better-webhook templates run stripe-charge_failed http://localhost:3000/api/webhooks/stripeTemplates include proper headers and can generate valid signatures when you provide a secret.
You can install the CLI via Homebrew Cask, manual release archives, or
go install.
Next Steps
- Command Reference — Full documentation for all CLI commands
- Configuration — Config file structure, env overrides, and precedence
- Templates — Learn about available templates and how to use them