ReplayHooks CLI

Capture needs nothing running on your laptop. The CLI is only for delivery — replaying a stored event to http://127.0.0.1:….

Install

npm i -g replayhooks

Or build from source (Go 1.23+):

cd cli
go build -o replayhooks ./cmd/replayhooks
# Windows: go build -o replayhooks.exe ./cmd/replayhooks

Login

  1. In the app open CLI → create a token (rhk_…). Copy it once.
  2. Run:
replayhooks login
# paste rhk_… when prompted
# or: replayhooks login --token rhk_…

Credentials are stored at ~/.config/replayhooks/credentials.json (mode 0600).

Workspaces

If you belong to more than one workspace:

replayhooks workspaces

Then pass --workspace <slug> (or the UUID) to listen.

Listen

replayhooks listen --to http://127.0.0.1:3000 --workspace your-workspace-slug

On Windows prefer 127.0.0.1 over localhost (avoids IPv6 ::1 issues).

Leave the process running. When you click Replay on a loopback URL in the inspector, the job is pushed down the tunnel and your local server receives the original request.

Stripe / GitHub local workflow

  1. Point the provider at your ReplayHooks ingest URL — keep it forever.
  2. Run replayhooks listen while developing.
  3. Fix your handler, then replay any failed event to localhost without asking the provider to resend.

Troubleshooting

  • 4403 multiple workspaces: run replayhooks workspaces and pass --workspace.
  • Corporate proxy: outbound WSS must be allowed to tunnel.replayhooks.com.
  • Wrong port: if the tunnel is on :3000 and you replay to :3001, the app returns tunnel_target_mismatch.
  • npm binary missing: build from source (above) or download a release asset.
ReplayHooks CLI — replay webhooks to localhost · ReplayHooks