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
- In the app open CLI → create a token (
rhk_…). Copy it once. - 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
- Point the provider at your ReplayHooks ingest URL — keep it forever.
- Run
replayhooks listenwhile developing. - Fix your handler, then replay any failed event to localhost without asking the provider to resend.
Troubleshooting
- 4403 multiple workspaces: run
replayhooks workspacesand pass--workspace. - Corporate proxy: outbound WSS must be allowed to
tunnel.replayhooks.com. - Wrong port: if the tunnel is on
:3000and you replay to:3001, the app returnstunnel_target_mismatch. - npm binary missing: build from source (above) or download a release asset.