# Clerk CLI

[Clerk CLI](https://clerk.com/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](https://github.com/clerk/cli) 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...

```bash
$ bunx clerk init
```

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

**bun**

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

**npm**

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

**pnpm**

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

**yarn**

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

**Homebrew**

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

**curl**

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

Read the [full documentation](https://clerk.com/docs/cli.md) 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.
