relayhq-cli
v1.0.2
Published
Local webhook tunnel for RelayHQ — forward live webhooks to localhost, no ngrok needed
Maintainers
Readme
relayhq-cli
Forward live RelayHQ webhooks to your local machine — no ngrok needed.
Use the same permanent relay URL in development and production. Run your app on localhost, start the CLI, and webhooks arrive in real time.
Install
# Run once (no install)
npx relayhq-cli listen --api-key rly_xxx
# Or install globally
npm install -g relayhq-cli
relay-cli listen --api-key rly_xxxQuick start
- Get an API key: dashboard.relayhq.org/settings
- Start your local server (e.g.
http://localhost:3000/webhook) - Run:
relay-cli listen \
--api-key rly_xxxxxxxxxxxxxxxxxxxx \
--forward-to http://localhost:3000/webhook- Send a webhook to your relay URL (
https://hooks.relayhq.org/in/<token>)
Options
| Flag | Env var | Default | Description |
|------|---------|---------|-------------|
| --api-key | RELAY_API_KEY | — | Your RelayHQ API key (required) |
| --forward-to | RELAY_FORWARD_TO | http://localhost:3000 | Local URL to forward requests to |
| --api-url | RELAY_API_URL | wss://api.relayhq.org | RelayHQ API URL |
Example output
relay-cli v1.0.1
✓ Connected to RelayHQ
✓ Forwarding to http://localhost:3000/webhook
✓ POST [Stripe] → http://localhost:3000/webhook 200 42ms
{ type: payment_intent.succeeded · amount: 4999 }