Skip to content

About

Forward webhooks to your local dev server — same fan-out, retries, and signature verification as production.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

Repository files navigation

@relaykit/cli

Forward webhooks RelayKit has already ingested down to your local dev server — same fan-out, retries, signature verification, and Schema Sentinel as production, no deploy required.

Install

npm install -g @relaykit/cli

Or run without installing:

npx @relaykit/cli tunnel --port 3000

Usage

  1. Generate a CLI token at /settings/cli in your RelayKit dashboard.

  2. Log in once:

    relaykit login
    
  3. Start forwarding to your local server:

    relaykit tunnel --port 3000
    

    First run walks you through picking (or creating) a project and destination, then remembers your choice. Future runs ask Use last destination? <project> → <destination> — press Enter to reuse it, or choose No, pick another to switch projects.

Commands

Command Description
relaykit login Authenticate with a CLI token from your dashboard
relaykit logout Remove the saved token
relaykit whoami Show the currently logged-in account
relaykit tunnel --port <port> Forward pending webhooks to http://localhost:<port>

tunnel options:

Flag Description
--port <port> Shorthand for http://localhost:<port>
--path <path> Route to append when using --port, e.g. /webhook (default /)
--url <url> Full target URL instead of --port — use this for custom domains, HTTPS, or non-standard ports (e.g. https://myapp.test/webhook)
--project <id> Skip the project picker
--destination <id> Skip the destination picker
--pick Ignore the saved project/destination and go straight to the pickers

--path only applies alongside --port; if you pass --url, it's used as the complete target as-is. All of --path, --url, and your project/destination choice are remembered between runs.

Switching projects or destinations

After the first run, relaykit tunnel confirms the saved project and destination before connecting:

◆  Use last destination? Acme Shop → Local dev
│  ● Yes / ○ No, pick another
  • Enter reuses it.
  • No, pick another opens the project and destination pickers, with your last choice preselected.
  • --pick skips the confirm and opens the pickers directly.
  • --project <id> / --destination <id> bypass the saved choice entirely.

When stdin isn't a terminal (CI, scripts), there's no prompt — the saved destination is reused automatically.

Your choice is stored in ~/.config/relaykit/config.json. If the saved destination is deleted from the dashboard, the CLI clears it and asks you to pick again on the next run.

Live output

Each forwarded webhook logs its event, outcome, and latency:

7:39:46 pm  stripe/payment.succeeded        200 OK           21ms
7:40:02 pm  github/push                     UNREACHABLE       3ms
7:40:09 pm  github/push                     200 OK            18ms  (retry 1)

On exit (Ctrl+C) you get a summary: Tunnel stopped. 4 delivered, 1 failed.

How it works

The CLI polls RelayKit every ~2 seconds for webhooks waiting on your tunnel destination, replays each one against your local server with the original headers, and reports the result back — so retries, Incident grouping, and Schema Sentinel all apply exactly as they would in production. If the CLI isn't running (or your machine is offline), pending deliveries time out and retry with the same backoff as a real down endpoint, and eventually open an Incident if retries are exhausted before you reconnect — nothing is redelivered indefinitely.

About

Forward webhooks to your local dev server — same fan-out, retries, and signature verification as production.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages