tofu targets — forward webhooks to localhost
Targets are the outbound side of a hook. Each target points at one URL, can be enabled or disabled independently, and inherits the same event stream from the provider.
tofu targets set local "http://127.0.0.1:3000/api/webhooks/stripe" --hook stripeCreate or replace the target named local for the stripe hook. Use set when you only have one local target and want idempotent setup.
tofu targets add staging "https://staging.example.com/api/webhooks/stripe" --hook stripeAdd an additional target on top of an existing one. Use add to fan a single event out to localhost and staging at once.
tofu targets list --hook stripeList every target for a hook with URL and enabled status.
tofu targets disable staging --hook stripeTemporarily stop forwarding to a target without deleting it. Pair with enable to bring it back.
tofu targets delete staging --hook stripeRemove a target. Future events stop forwarding to it; past delivery records remain.
Fan out to multiple environments
Provider sends one event, Tofu forwards it to every enabled target. Useful when a teammate needs the same event you do, or when you want to compare staging and localhost behaviour side by side.
$ tofu targets set local "http://127.0.0.1:3000/api/webhooks/stripe" --hook stripe$ tofu targets add teammate "https://teammate.ngrok.app/api/webhooks/stripe" --hook stripe$ tofu targets list --hook stripe