Get from install to replay in one terminal session.
Tofu gives every provider a stable URL, forwards requests to your local app, and keeps events ready to inspect or replay.
curl -fsSL https://trytofu.dev/install | sh
tofu login
tofu hooks create stripe --name "Stripe"
tofu hooks url stripe
tofu targets set local "http://127.0.0.1:3000/api/webhooks/stripe" --hook stripe
tofu watch stripe
tofu replay latest --hook stripeThe shortest useful path
Run the commands in order from the project that receives webhooks. The provider URL remains stable, even when your local server restarts.
- 1
tofu loginOpen browser approval and connect the CLI to your account.
- 2
tofu hooks create stripe --name "Stripe"Create a named provider URL for Stripe webhooks.
- 3
tofu hooks url stripePrint the provider URL to paste into Stripe.
- 4
tofu targets set local "http://127.0.0.1:3000/api/webhooks/stripe" --hook stripeForward events to the webhook route in your local app.
A stable relay between providers and localhost
Tofu separates the provider-facing URL from your local target, so webhook setup stays fixed while your development environment changes.
Provider calls Tofu
Use a stable hook URL in Stripe, GitHub, or another webhook provider.
Tofu stores the event
The original payload and headers are retained for inspection and replay.
Tofu forwards locally
Targets can point at localhost while your app runs on your machine.
You watch and replay
Stream incoming events, then replay after changing your webhook handler.
The commands you will use most
The CLI owns hook management. The website gives you account, billing, and read-only workspace context.
| Command | When to use it |
|---|---|
tofu login | Open browser approval and connect the CLI to your account. |
tofu hooks create stripe --name "Stripe" | Create a named provider URL for Stripe webhooks. |
tofu hooks url stripe | Print the provider URL to paste into Stripe. |
tofu targets set local "http://127.0.0.1:3000/api/webhooks/stripe" --hook stripe | Forward events to the webhook route in your local app. |
tofu watch stripe | Stream incoming events and delivery results. |
tofu replay latest --hook stripe | Replay the newest event after updating your handler. |
If events are not reaching your app
Most local delivery issues come from provider URL drift, an incomplete target URL, or a local server that is not running.
Delivery checklist
- The webhook provider uses the URL from tofu hooks url.
- Your local server is running before you set or test the target.
- The target URL includes the full local route path.
- Signed webhook handlers read the raw request body.
What to try next
Keep tofu watch running while you trigger a provider test event. If Tofu receives the event but delivery fails, update the target URL and replay the latest event.
tofu replay latest --hook stripeReady to inspect real events?
Create an account, run tofu login, and approve the CLI from the browser.