endpoint is the endpoint’s declared id (the id passed to webhooks.endpoint.define) or its wh_ id.
Replacing an existing secret
When the endpoint already has a secret, both commands ask how long the old one keeps working, with the same choices as the dashboard: stop immediately, 1 hour, 24 hours (the default) or 7 days. In a script or an AI agent, where there’s no prompt, pass--previous-secret-ttl instead; the command refuses to replace the secret without it, so a rotation can’t cut the provider off by accident:
webhooks set-secret
Stores the signing secret or public key a provider issued, such as thewhsec_ secret Stripe returns when you create a webhook endpoint. It replaces the endpoint’s current secret.
Pipe the secret in from the provider’s CLI or a file:
--from-file, the command checks the shell environment, then the project’s .env, .env.development, .env.local and .env.development.local files:
When the endpoint already has a secret, how long the old one keeps working while the provider switches to the new one: seconds (
3600) or a duration (1h, 24h, 7d), at most 7 days. 0 stops it straight away, for a secret that leaked.webhooks generate-secret
Generates a new signing secret, for providers that accept a secret you choose, such as GitHub. It replaces the endpoint’s current secret. Save it to an env file, then hand it to the provider by variable name:GITHUB_WEBHOOK_SECRET to .env.local, creating the file if needed, and prints only where it saved the value. Or pipe it straight into the provider’s CLI with --print, which outputs the secret and nothing else.
When the output isn’t a terminal, the command refuses to print the secret unless you pass --to-env or --print, so an AI agent running it doesn’t capture the value by accident.
When the endpoint already has a secret, how long the old one keeps working while the provider switches to the new one: seconds (
3600) or a duration (1h, 24h, 7d), at most 7 days. 0 stops it straight away, for a secret that leaked.Options
Common options
These options are available on most commands.The login profile to use. Defaults to the current profile, which is set by your last
login or switch (initially “default”).Override the default API URL. If not specified, it uses
https://api.trigger.dev. This can also be set via the TRIGGER_API_URL environment variable.The CLI log level to use. Options are
debug, info, log, warn, error, and none. This does not affect the log level of your trigger.dev tasks. Defaults to log.Opt-out of sending telemetry data. This can also be done via the
TRIGGER_TELEMETRY_DISABLED environment variable. Just set it to anything other than an empty string.
