npm.io
0.0.10 • Published 2d agoCLI

@sylphx/webhookbin-cli

Licence
MIT
Version
0.0.10
Deps
0
Size
77 kB
Vulns
0
Weekly
28
DeprecatedThis package is deprecated

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-cli

Or use directly with npx:

npx webhookbin-cli --slug my-bin --api-key xxx --forward http://localhost:3000

Usage

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 -v
Environment 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

  1. Connect: The CLI establishes a Server-Sent Events (SSE) connection to WebhookBin
  2. Wait: When a webhook arrives at your bin, WebhookBin pushes it to the CLI
  3. Forward: The CLI forwards the request to your local server
  4. Respond: Your local server processes the webhook normally
Webhook Provider → WebhookBin → CLI → Your Local Server

Benefits

  • 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

  1. Go to your bin's settings page on WebhookBin
  2. Enable "Forwarding" in the settings
  3. 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

Keywords