@sylphx/webhookbin-cli
v0.0.10
Published
CLI tool to forward webhooks from WebhookBin to your local server
Readme
WebhookBin CLI
Forward webhooks from WebhookBin to your local development server. Similar to ngrok, but specifically designed for webhook testing.
Installation
npm install -g webhookbin-cliOr use directly with npx:
npx webhookbin-cli --slug my-bin --api-key xxx --forward http://localhost:3000Usage
webhookbin --slug <bin-slug> --api-key <api-key> --forward <local-url>Options
| Option | Short | Description | Required |
| ----------------- | ----- | --------------------------------------- | -------- |
| --slug | -s | Your bin's slug | Yes |
| --api-key | -k | API key for authentication | Yes |
| --forward | -f | Local URL to forward webhooks to | Yes |
| --host | -h | WebhookBin host (default: webhookbin.app) | No |
| --verbose | -v | Enable verbose logging | No |
| --help | | Show help message | No |
Example
# Forward webhooks to your local Express server
webhookbin --slug my-webhook-bin --api-key abc123 --forward http://localhost:3000/webhook
# With verbose logging
webhookbin -s my-bin -k abc123 -f http://localhost:8080/api/webhook -vEnvironment Variables
You can also configure the CLI using environment variables:
| Variable | Description |
| --------------------- | --------------------- |
| WEBHOOKBIN_HOST | Override default host |
| WEBHOOKBIN_API_KEY | Default API key |
| WEBHOOKBIN_FORWARD_URL | Default forward URL |
How It Works
- Connect: The CLI establishes a Server-Sent Events (SSE) connection to WebhookBin
- Wait: When a webhook arrives at your bin, WebhookBin pushes it to the CLI
- Forward: The CLI forwards the request to your local server
- Respond: Your local server processes the webhook normally
Webhook Provider → WebhookBin → CLI → Your Local ServerBenefits
- No SSRF risk: Requests are made from your machine, not WebhookBin's servers
- Full request data: Headers, body, query params are all forwarded
- Real-time: Instant forwarding via SSE
- Automatic reconnection: CLI reconnects if connection drops
Getting Your API Key
- Go to your bin's settings page on WebhookBin
- Enable "Forwarding" in the settings
- Copy the API key shown in the settings
Output
The CLI shows real-time webhook activity:
[14:23:45] Connecting to webhookbin.app...
[14:23:46] Connected! Waiting for webhooks...
[14:23:46] Forwarding to: http://localhost:3000/webhook
[14:24:01] POST /webhook 200 (45ms)
[14:24:15] POST /webhook/event 201 (32ms)
[14:24:30] GET /health 200 (5ms)License
MIT
