# Introducing Clerk CLI

As agentic workflows become central to how software gets built and shipped, developers are spending more time inside their terminals and IDEs. Setting up Auth, Organizations, and Billing should be no exception.

Today, as an accompaniment to the Clerk Dashboard, we're introducing the [Clerk CLI](https://clerk.com/docs/cli.md), a command-line tool that brings all of your Clerk workflows into your terminal.

## Bootstrap new projects faster

```bash
$ clerk init
```

`clerk init` reduces that workflow into a single command.

Run the init command in an empty directory and Clerk creates the project for you — pick your framework, your package manager, name your app, and you have a running application with sign-in, sign-up, and route protection already in place.

Run the init command inside a directory with an existing project and Clerk adapts to what's already there - detecting your framework and package manager and implementing authentication. If you're migrating from NextAuth, Auth0, or Supabase Auth, the CLI detects it and links you to the relevant migration guide.

Eight frameworks are supported today: Next.js, React Router, Astro, Nuxt, TanStack Start, React, Vue, and JavaScript.

## Manage your instance from the terminal

Once your project is up and running, you'll inevitably want to customize the experience by updating your Clerk settings. Enabling [Organizations](https://clerk.com/organizations) for B2B, turning on [Billing](https://clerk.com/billing) so you can charge your users seamlessly, or requiring MFA for additional security is all now possible from your terminal or IDE.

```bash
$ clerk config pull
$ clerk config patch --json '{"session": {"lifetime": 604800}}'
```

For example, `clerk config` lets you pull your instance configuration as JSON, inspect the schema, and push changes with a diff preview before anything is applied. The `--dry-run` flag shows you exactly what would change before committing.

Note, not all settings are available through CLI commands at the time of our first release but for any not yet supported, `clerk open` gets you to the right Dashboard page.

```bash
$ clerk open webhooks
$ clerk open # opens the dashboard for your linked app
```

## Talk to the Clerk API directly

The Dashboard is still a great command center for managing your applications but sometimes you need to view or manage resources directly alongside your agents. Fetch all resources within the [Clerk Backend API](https://clerk.com/bapi) by using the `clerk api` command.

```bash
$ clerk api ls
$ clerk api /users
$ clerk api /invitations -X POST -d '{"email_address": "john@example.com"}'
```

The CLI includes a lightweight client for the Clerk Backend API. It resolves your secret key from the linked project, so you can perform authenticated requests. Run `clerk api ls` to discover available endpoints, or run `clerk api` with no arguments for an interactive request builder that lets you browse endpoints and compose requests.

## Built for your agents

We built the CLI painstakingly with agents in mind. Whether its allowing token efficient context or reducing round trips by studying common agent workflows, its never been easier to build with Clerk alongside your agents.

And to supercharge them, a bundled skill ships with every release, pinned to the CLI version so agents always have accurate instructions for usage. The `init` command also offers to install framework-specific [skills](https://github.com/clerk/skills), so agents can reference the latest patterns and conventions.

You can install the bundled skill at any time by running:

```bash
$ clerk skill install
```

## Get started

Ready to try it? Tell your agent to use the [Clerk CLI](https://clerk.com/cli) or install it yourself and spin up a new project:

**npm**

```bash
$ npm install -g clerk
$ clerk init
```

**pnpm**

```bash
$ pnpm install -g clerk
$ clerk init
```

**yarn**

```bash
$ yarn global add clerk
$ clerk init
```

**bun**

```bash
$ bun add -g clerk
$ clerk init
```

**Homebrew**

```bash
$ brew install clerk/stable/clerk
$ clerk init
```

**curl**

```bash
$ curl -fsSL https://clerk.com/install | bash
$ clerk init
```

Everything here is just the beginning, and we're continuing to invest in making the terminal a first-class way to work with Clerk. We'd love to hear what commands or workflows would make your life easier — [open an issue on GitHub](https://github.com/clerk/cli/issues).

[Read the docs](https://clerk.com/docs/cli.md)

![Introducing Clerk CLI](./image.png)
