CLI webhooks, impersonation, and a refreshed experience
- Category
- Product
- Published
CLI 2.0 adds a local webhooks toolkit, one-command user impersonation, and a refreshed interactive experience — built for you and your agents.
When we released the CLI and then shipped clerk deploy, the goal was a single tool that both developers and agents could use to run Clerk end to end. CLI 2.0 pushes further into day-to-day workflows: testing webhooks and debugging as a specific user, all without leaving your terminal.
Test webhooks locally with clerk webhooks
A new command group gives you a self-contained, local webhooks toolkit — no linked project and no Platform API required:
clerk webhooks listen: opens a relay tunnel and forwards deliveries to your local handler. Pass--tokento pin a stable, shareable URL you can reuse across restarts.clerk webhooks verify: verifies a webhook signature offline (HMAC-SHA256), from a saved delivery or explicit header values — no network calls.clerk webhooks token: generates a relay token you can pipe straight intolisten.
clerk webhooks listen --forward-to http://localhost:3000/api/webhooksDebug as any user with clerk impersonate
clerk impersonate (alias clerk imp) creates a short-lived sign-in URL that logs you in as another user, so you can reproduce a report from their exact session. Target a user by ID or email, add --open to launch the URL straight away, and every impersonation is stamped with your account for auditing.
# Impersonate a user by email and open the sign-in URL
clerk imp alice@example.com --open
# Revoke a pending token when you're done
clerk imp revoke act_29w9...Run clerk imp with no arguments to pick a user interactively.
A refreshed interactive experience
Prompts, lists, and spinners have a new visual style, and interactive commands now end by clearly reflecting success, failure, or a paused cancellation — so it's always obvious how a run finished.
Built for agents
Every command in 2.0 respects the CLI's agent contract: stable error codes, stdout for data and stderr for UI, and no hidden interactive prompts in non-TTY contexts. clerk webhooks token prints a bare token to stdout so it pipes cleanly, and clerk impersonate resolves the target instance explicitly rather than silently defaulting.
Get started
Update to the latest CLI, then try any of the new commands:
clerk webhooks listen --forward-to http://localhost:3000/api/webhooksSee the CLI docs for the full command reference.