> ## Documentation Index
> Fetch the complete documentation index at: https://developers.kit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Kit CLI

> Work with a Kit account from the terminal, in scripts, and through AI coding agents.

The Kit CLI is a command-line tool for the [Kit API v4](https://developers.kit.com/api-reference/overview.md). It installs a `kit` command that reads and writes a Kit account: subscribers, tags, forms, sequences, broadcasts, webhooks, and more. You sign in once, then run a command where you would otherwise write a script.

```bash theme={null}
npm install -g "github:Kit/kit-cli#stable"
kit login
kit subscribers list
```

The CLI is open source under the MIT license at [github.com/Kit/kit-cli](https://github.com/Kit/kit-cli), and it's free to use on every Kit plan.

> [!NOTE]
>
> The CLI is pre-1.0. Commands and flags may still change between releases, so pin a release if a script depends on exact behavior. See [Quickstart](https://developers.kit.com/cli/quickstart.md#pin-a-version).

## Who it's for

* **Developers** who want to query or change a Kit account without writing auth, pagination, and retry code first.
* **Scripts and scheduled jobs** such as a nightly subscriber sync, a weekly stats export, or a bulk import, run from cron or CI with an API key.
* **AI coding agents** such as Claude Code, which can run `kit` commands in a shell. The CLI ships a Claude Code skill for this. See [Automation and AI agents](https://developers.kit.com/cli/automation-and-agents.md).

## CLI, MCP, or API?

All three reach the same Kit account data. They differ in who drives them and where they run.

* Use the **CLI** when you want the same result every time: a script, a scheduled job, a data pull piped into another tool, or an agent that should run a known command instead of working the task out on each run.
* Use the **[Kit MCP](https://developers.kit.com/mcp/kit-mcp.md)** when a creator wants to work with their account in conversation, inside an AI client such as Claude or ChatGPT, with no terminal and nothing to install.
* Use the **[API](https://developers.kit.com/api-reference/overview.md)** when you're building an app or integration, including anything for the [Kit App Store](https://developers.kit.com/kit-app-store/overview.md).

| | Kit CLI | Kit MCP | Kit API v4 |
| - | - | - | - |
| **Runs without an AI client** | Yes. Terminal, cron, CI, a Makefile. | No. An AI client is always in the loop. | Yes. Anything that speaks HTTP. |
| **Best suited to** | Developers, scripts, coding agents | Creators working in a chat interface | Apps and integrations |
| **Setup** | `npm install -g`, then `kit login`. Run `kit init` instead to choose an API key. | Add the official Kit connector in your AI client, or add the [MCP URL](https://developers.kit.com/mcp/kit-mcp.md) as a custom connector | Write your own auth, pagination, and retries |
| **Works with other tools** | Yes. `--format json` pipes into `jq`, files, or other commands. | No. Results go to the model. | Yes. Whatever your code does next. |
| **Authentication** | OAuth or API key | OAuth | OAuth or API key |
| **Kit plans** | Every plan | Paid plans | See [API Overview](https://developers.kit.com/api-reference/overview.md) |
| **Updates** | You update it yourself | Automatic, server-side | Automatic within a version |
| **Open source** | Yes, MIT | No | No. Publicly documented. |

The CLI and the Kit MCP also behave differently with broadcasts. The Kit MCP only saves drafts. The CLI can schedule a broadcast with `--send-at`, and asks for confirmation before it does.

## What it covers

The CLI has commands for the Kit API v4, grouped the way `kit --help` lists them:

| Group | Commands |
| - | - |
| **Setup** | `init`, `login`, `logout`, `account`, `config`, `setup-skill`, `completion` |
| **Resources** | `apps`, `broadcasts`, `custom-fields`, `email-templates`, `forms`, `kit-fields`, `posts`, `purchases`, `segments`, `sequences`, `snippets`, `subscribers`, `tags`, `webhooks` |
| **Advanced** | `api`, `bulk` |
| **Maintenance** | `doctor`, `upgrade`, `help` |

`kit api` sends a raw request to any v4 path, for endpoints without a dedicated command or when you want full control over the parameters. The `webhooks` commands use the current [webhooks](https://developers.kit.com/webhooks/overview.md) resource. Legacy webhooks have no dedicated command.

Run `kit <command> --help` for the flags on any command. The [README](https://github.com/Kit/kit-cli#commands) is the full command reference.

## Safe by default

* Commands that delete, unsubscribe, act in bulk, or schedule a broadcast ask for a yes before they change anything. See [confirmation prompts](https://developers.kit.com/cli/automation-and-agents.md#confirmation-prompts).
* Other writes run right away. Adding a tag, for example, can start an automation that sends email. Every command acts on your real Kit account.
* Usage data and error reports are off unless you opt in. [TELEMETRY.md](https://github.com/Kit/kit-cli/blob/main/TELEMETRY.md) lists exactly what is sent.

## Support

Contact [Kit Support](https://kit.com/support) for help with the CLI, such as a problem installing it, signing in, or running a command. You don't need a GitHub account.

If you use GitHub, you can also [open an issue](https://github.com/Kit/kit-cli/issues/new/choose) to report a bug or suggest a command. Issues are public, so don't paste API keys, OAuth tokens, or subscriber email addresses into them. To report a security vulnerability, follow [SECURITY.md](https://github.com/Kit/kit-cli/blob/main/SECURITY.md) and don't open a public issue.

## Next steps

> [card] [Quickstart](https://developers.kit.com/cli/quickstart.md)
>
> Install the CLI, sign in, and run your first commands.

> [card] [Automation and AI agents](https://developers.kit.com/cli/automation-and-agents.md)
>
> Run the CLI from scripts and CI, and set up the Claude Code skill.


## Related topics

- [API Overview](https://developers.kit.com/api-reference/overview.md)
- [Kit MCP](https://developers.kit.com/mcp/kit-mcp.md)
- [Changelog](https://developers.kit.com/changelog.md)
- [Quickstart](https://developers.kit.com/cli/quickstart.md)
- [MCP overview](https://developers.kit.com/mcp/overview.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.