npm (Recommended)
Install globally via npm:
npm install -g hookreplay
npx (No Installation)
Run directly without installing:
npx hookreplay
The HookReplay CLI connects your local development server to receive replayed webhooks.
Install globally via npm:
npm install -g hookreplay
Run directly without installing:
npx hookreplay
The HookReplay CLI is an interactive application. Start it by running hookreplay and use these commands:
| Command | Description |
|---|---|
connect |
Connect to HookReplay server |
disconnect |
Disconnect from server |
status |
Show connection status |
config |
Manage configuration (api-key, server) |
history |
Show received request history |
replay <number> |
Replay a request from history |
version |
Show version and system info |
update |
Check for and install updates |
clear |
Clear the screen |
help |
Show help message |
quit |
Exit the CLI |
Configure the CLI settings. Your configuration is saved to ~/.hookreplay/config.json.
# View current config config # Set API key config api-key hr_xxxxxxxxxxxx # Set custom server URL (optional) config server https://hookreplay.dev
Connect to the HookReplay server. Requires an API key to be configured first.
● hookreplay> connect ✓ Connected! Waiting for replay requests...
Replay a request from your local history to a target URL.
# View history first history # Replay request #1 to a specific URL replay 1 http://localhost:3000/webhook
Here's a complete workflow using the CLI:
$ hookreplay ██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗██████╗ ███████╗██████╗ ██╗ █████╗ ██╗ ██╗ ██║ ██║██╔═══██╗██╔═══██╗██║ ██╔╝██╔══██╗██╔════╝██╔══██╗██║ ██╔══██╗╚██╗ ██╔╝ ... v1.0.0 Catch, inspect, and replay webhooks locally Type help for available commands, or quit to exit. ● hookreplay> config api-key hr_abc123xyz ✓ API key saved! ● hookreplay> connect Connecting to https://hookreplay.dev... ✓ Connected! Waiting for replay requests... ● hookreplay> >>> Received ReplayRequest from server! ────────────── Incoming Request #1 ────────────── │ Method │ POST │ │ Target │ http://localhost:3000/api/webhook │ │ Headers│ 5 headers │ │ Body │ 1247 chars │ Response: 200 OK (145ms) ────────────────────────────────────────────────── ● hookreplay> history ┌───┬────────┬───────────────────────────────────┬───────────┐ │ # │ Method │ Target │ Body │ ├───┼────────┼───────────────────────────────────┼───────────┤ │ 1 │ POST │ http://localhost:3000/api/webhook │ 1247 chars│ └───┴────────┴───────────────────────────────────┴───────────┘ ● hookreplay> replay 1 http://localhost:4000/webhook Replaying request #1 to http://localhost:4000/webhook... Response: 200 OK (89ms)
If the CLI can't connect:
configstatus to see current connection stateIf webhooks aren't reaching your server:
history to view received requests and their detailsThe CLI automatically bypasses SSL verification for localhost URLs. For other local HTTPS servers with self-signed certificates, use HTTP instead during development.
Configuration is stored in ~/.hookreplay/config.json. If you experience issues, you can:
config command