Skip to main content

Clerk CLI

Category
Product
Published

A new command-line tool for you and your agents to manage authentication, billing, and more

Clerk CLI is a (surprise, surprise) command-line tool for setting up and managing Clerk directly from your terminal or agentic harness. It's open source and available for you to use today.

The Clerk CLI gives both developers and agents a scriptable, terminal-based interface to Clerk so they can avoid click-ops and build faster.

Key commands

  • clerk init — Detects your framework, scaffolds Clerk into your project, and gets auth ready to configure. This is the fastest way to start using Clerk in an existing or new project.

  • clerk config — Manage your application's settings directly from the command line. Choose sign-in methods, configure redirects, set session policies - everything you'd normally do in the dashboard, now in code.

  • clerk api — Interact with the Clerk API directly. Fetch users, organizations, sessions, and all other resources all through one command.

Try it

Use a script runner...

bunx clerk init

...or install the CLI globally and try it out today:

bun add -g clerk
clerk init
npm install -g clerk
clerk init
pnpm install -g clerk
clerk init
yarn global add clerk
clerk init
brew install clerk/stable/clerk
clerk init
curl -fsSL https://clerk.com/install | bash
clerk init

Read the full documentation or run clerk --help to see the full list of commands and options to get started.

What's next?

This is the first release of the Clerk CLI and we're working on adding more commands and features along the way to make it even more powerful.

For example, we're hard at work on clerk deploy — a single command to validate your auth setup and push it live. Deploy will handle syncing your local configuration to production, so you can go from development to launch without switching contexts.

Contributor
Clerk

Share this article