Capture once. Replay forever.
Debug webhooks on localhost without the tunnel pain.
Website • Documentation • GitHub • Twitter
Every developer has been there:
- A Stripe webhook fails in production
- You need to reproduce the exact payload locally
- You set up ngrok, trigger test webhooks from Stripe's dashboard
- Repeat 47 times until you figure out the bug
- 3 hours later, you're exhausted
HookReplay captures webhooks and lets you replay them to localhost — as many times as you need.
Capture once → Replay forever
No tunnels. No re-triggering. No wasted hours.
npm install -g hookreplaydotnet tool install -g HookReplay.CliSign up at hookreplay.dev and grab your API key from Settings.
hookreplay
> config api-key YOUR_API_KEY> connect
✓ Connected to HookReplay server
Waiting for replay requests...Click "Send to CLI" on any captured webhook, and it will be forwarded to your localhost with your breakpoints ready.
| Command | Description |
|---|---|
help |
Show available commands |
config api-key <key> |
Set your API key |
config server <url> |
Set server URL (default: https://hookreplay.dev) |
connect |
Connect to HookReplay and wait for replays |
disconnect |
Disconnect from server |
status |
Show connection status |
history |
Show received requests |
replay <id> [url] |
Replay a request from history to a different URL |
version |
Show version and system info |
update |
Check for and install updates |
clear |
Clear the screen |
quit |
Exit the CLI |
The CLI can update itself without requiring npm or dotnet commands:
● hookreplay> update
Downloading v1.0.16...
✓ Updated to v1.0.16!
Please restart the CLI to use the new version.
How it works:
- On startup, the CLI checks for new versions from npm registry
- When you run
update, it downloads the new binary directly from GitHub Releases - The update works even while the CLI is running (no need to exit first)
- After updating, restart the CLI to use the new version
You can also update manually:
- npm:
npm install -g hookreplay - dotnet:
dotnet tool update -g HookReplay.Cli
┌─────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Stripe │ ──▶ │ HookReplay │ ──▶ │ Your CLI │
│ Webhook │ │ (captures) │ │ (replays) │
└─────────────┘ └─────────────────┘ └─────────────────┘
│
▼
┌─────────────────┐
│ localhost:3000 │
│ (your server) │
└─────────────────┘
- Create a webhook endpoint at hookreplay.dev
- Point your webhook provider (Stripe, Shopify, GitHub, etc.) to your HookReplay URL
- Webhooks are captured and stored
- Connect the CLI and click "Send to CLI" to replay requests to localhost
- Debug with your IDE's breakpoints
| Problem | HookReplay Solution |
|---|---|
| "I can't reproduce the exact payload" | Capture it once, replay it 100 times |
| "I keep re-triggering webhooks from Stripe" | Replay from history instead |
| "My ngrok tunnel expired again" | No tunnels needed |
| "I need to test edge cases" | Edit the payload before replaying |
| "I just need to see what arrived" | Inspect every header and byte |
Config is stored in ~/.hookreplay/config.json:
{
"apiKey": "hr_abc123...",
"serverUrl": "https://hookreplay.dev"
}The CLI sends anonymous, minimal telemetry on first run to help us understand usage:
- Install ID (random, not linked to you)
- CLI version
- OS and architecture
- .NET version
No personal data, API keys, or webhook content is ever sent. You can see exactly what's collected in the source code.
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
# Clone the repo
git clone https://github.com/ahmedmandur/hookreplay-cli.git
cd hookreplay-cli
# Build
dotnet build
# Run
dotnet run --project src/HookReplay.Cli- Website: hookreplay.dev
- Documentation: hookreplay.dev/docs
- Twitter: @hookreplaydev
- Issues: GitHub Issues
MIT License - see LICENSE for details.
- Fixed repository URLs in README and CONTRIBUTING.md
- Added contributing section to npm README
- Updated project structure documentation
- Fixed response body display: HTML/XML responses with
[and]characters no longer crash the CLI with "malformed markup tag" errors - Fixed Spectre.Console markup escaping: All user-generated content is now properly escaped before rendering
- Auto-reconnect: CLI now automatically reconnects when the connection drops unexpectedly
- Uses exponential backoff: 1s → 2s → 5s → 10s → 30s delays
- Attempts up to 10 reconnections before giving up
- Manual disconnect (
disconnectcommand or Ctrl+C) disables auto-reconnect - Shows clear status messages during reconnection attempts
- Better error messages with escaped content to prevent display issues
- Connection state is properly tracked across reconnection attempts
- Self-update feature: CLI can update itself without npm/dotnet commands
- Version checking against npm registry on startup
- Direct binary download from GitHub Releases
Stop chasing webhooks. Start catching bugs.