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
Requires Node.js 18+. Or run without a global install:
npx replayhooks@latest listen --to http://127.0.0.1:3000 --workspace your-slug
Login
- In the app open Settings → 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. - Install failed / binary missing: re-run
npm i -g replayhooks. The package downloads a platform binary from GitHub Releases during install — check your network can reachgithub.com.