lacspace-webhook

Receive, inspect, verify and replay webhooks — locally.

● Live · v0.2.0npmSource
terminal
npx lacspace-webhook listen --port 4000
What it does

Everything, in one command

lacspace-webhook stands up a tiny HTTP server that accepts anything and shows you exactly what arrived — headers, query and the parsed body — either in the terminal or in a live web inspector UI streamed over SSE. Verify signatures with the right scheme, or let --verify auto detect it (github/stripe/shopify/slack/svix/hmac/sha1, all timing-safe), return mocked responses from rule files, fan the request out to several local targets with retries, and save every hit to NDJSON so you can replay it later — filtered, transformed, and asserted (--expect-status / --expect-contains) for CI. Export any capture as a curl command. It's local-only; put a tunnel (cloudflared/ngrok) in front for public delivery.

Features

What's inside

Catch anything

Any method/path; JSON, form-urlencoded and text bodies parsed and pretty-printed.

Verify signatures

GitHub, Stripe and generic HMAC-SHA256 — timing-safe, with a clear ok/fail per request.

Forward & relay

--forward proxies the request to your local app and returns its response.

Save + list

Append every hit to NDJSON, then list a capture with method, path and size.

Replay

Re-send any captured request to a target — reproduce a webhook on demand.

Zero deps

Just node:http + node:crypto, plus a typed library (createReceiver, verifySignature, replayRequests).

Live web inspector

--ui opens an SSE dashboard that streams each incoming hook in the browser as it lands.

Response mocking

--rules returns canned status/body per matched request — stand in for a real endpoint.

Auto signature-detect

--verify auto identifies github/stripe/shopify/slack/svix/hmac/sha1; export any hit as curl.

Fan-out & replay CI

Forward to multiple targets with --retry; replay with --filter/--transform and --expect assertions.

How to use

Copy, paste, done

Real commands and snippets — from a one-liner to the typed library.

Live inspector UI
terminal
npx lacspace-webhook listen --ui --save hooks.ndjson

Opens a browser dashboard that streams each hook over SSE, and saves them too.

Auto-verify any provider
terminal
npx lacspace-webhook listen --secret "$SECRET" --verify auto

Detects github/stripe/shopify/slack/svix/hmac/sha1 automatically.

Mock responses from rules
terminal
npx lacspace-webhook listen --rules rules.json

Returns the status/body each matching request should get.

Replay + assert in CI
terminal
npx lacspace-webhook replay hooks.ndjson --to http://localhost:3000 \
  --filter method=POST --expect-status 200 --expect-contains ok

Filters, replays and asserts — exits non-zero on a mismatch.

Good for

What people build with it

Develop against Stripe/GitHub webhooks locally

See exactly what a provider sends

Reproduce a webhook without re-triggering it

Verify signatures before trusting a payload

Start now

Run lacspace-webhook today

Free, open-source, no API keys. It's a CLI and a typed library.

terminal
npx lacspace-webhook listen --port 4000