> ## 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.

# Quickstart

> Install the Kit CLI, sign in, and run your first commands.

This guide takes you from nothing installed to reading data from your Kit account in the terminal.

## Before you start

You need:

* [Node.js](https://nodejs.org) 22 or later
* [Git](https://git-scm.com), which npm uses to install from GitHub
* A Kit account, on any plan

## Install and sign in

**1. Install the CLI**

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

This installs the newest release of [Kit/kit-cli](https://github.com/Kit/kit-cli), because the `stable` branch always points at it. Keep the quotes. Some zsh setups treat `#` as a pattern and fail without them.

**2. Sign in**

```bash theme={null}
kit login
```

Your browser opens so you can approve access to your Kit account through the Kit CLI app. There's nothing to register or configure first. Port `9876` on your machine needs to be free while you sign in.

To use an API key instead, run `kit init`. It asks whether you want OAuth or an API key, sets up the one you pick, and then checks your setup. See [Use an API key](https://developers.kit.com/cli/automation-and-agents.md#use-an-api-key) for scripts and CI.

**3. Check that it works**

```bash theme={null}
kit account
```

This prints the account you're signed in to. If something looks wrong, `kit doctor` checks your Node.js version, config, authentication, and API connectivity.

> [!NOTE]
>
> The first command you run in an interactive terminal asks `Share usage data and error reports with Kit? [y/N]`. The default is no, so press Enter to decline. Change your answer at any time with `kit config set-telemetry true` or `false`.

## Run your first commands

List subscribers:

```bash theme={null}
kit subscribers list
```

See how completed broadcasts performed:

```bash theme={null}
kit broadcasts stats --status completed --sent-after 2026-10-01
```

Find subscribers by state, tags, sign-up date, or engagement:

```bash theme={null}
kit subscribers filter --json '[{"type":"subscriber_state","states":["active"]}]'
```

Create a tag and add a subscriber to it:

```bash theme={null}
kit tags create "VIP"
kit tags add-by-email <tagId> jane@example.com
```

> [!WARNING]
>
> Commands act on your real Kit account. Adding a tag or adding a subscriber to a form or sequence can start automations that send email.

## Get JSON output

Commands print a table by default. Add `--format json` to get JSON on stdout, ready to pipe into another tool:

```bash theme={null}
kit tags list --format json | jq '.[].name'
```

Prompts, pagination hints, and retry notices go to stderr, so stdout stays a single valid JSON document.

## Page through results

List commands return 50 results by default. Set `--per-page` up to 1000. When there's another page, the command prints a `Pagination:` line with a cursor to pass to `--after` or `--before`:

```bash theme={null}
kit subscribers list --per-page 200
kit subscribers list --per-page 200 --after <cursor>
```

See [Pagination](https://developers.kit.com/api-reference/pagination.md) for how cursors work in the API.

## Call any endpoint

`kit api` sends a request straight to a v4 path, with your credentials and the CLI's retry handling:

```bash theme={null}
kit api GET /subscribers --query per_page=10
kit api POST /tags --data '{"name":"VIP"}'
```

The path is the part after `/v4`. Every method except `GET` asks for confirmation first.

## Update the CLI

Run `kit upgrade` to move to the newest release:

```bash theme={null}
kit upgrade
```

It reads the version on the `stable` branch and runs the install command again when a newer release exists.

### Pin a version

To keep a script on a fixed version, install a release by its tag:

```bash theme={null}
npm install -g "github:Kit/kit-cli#v0.1.0"
```

The [Releases page](https://github.com/Kit/kit-cli/releases) lists each release and its changes.

## Turn on shell completion

```bash theme={null}
eval "$(kit completion bash)"   # add to ~/.bashrc
eval "$(kit completion zsh)"    # add to ~/.zshrc, after compinit
kit completion fish | source    # add to ~/.config/fish/config.fish
```

Completion covers command names, subcommand names, and flags.

## Sign out

```bash theme={null}
kit logout
```

This clears the OAuth tokens stored on your machine. It doesn't remove the CLI's access on Kit's side, so other machines signed in to the same account keep working.

## Uninstall

**1. Sign out**

```bash theme={null}
kit logout
```

Do this first, while the `kit` command is still installed.

**2. Remove the CLI**

```bash theme={null}
npm uninstall -g @kit/cli
```

`@kit/cli` is the package's name. npm uses it for an install from GitHub too.

**3. Remove the Claude Code skill**

If you ran `kit setup-skill`, delete the skill:

```bash theme={null}
rm -rf ~/.claude/skills/kit-cli
```

**4. Remove access to your Kit account**

If you signed in with `kit login`, uninstall the Kit CLI app from the Manage tab of the Kit App Store. This revokes its tokens and ends access for every machine signed in to that account.

If you used an API key that nothing else depends on, delete it in your [developer settings](https://app.kit.com/account_settings/developer_settings).

## Next steps

* [Automation and AI agents](https://developers.kit.com/cli/automation-and-agents.md) covers API keys, CI, confirmation prompts, and the Claude Code skill.
* The [README](https://github.com/Kit/kit-cli#commands) lists every command and its flags.


## Related topics

- [Quick start guide](https://developers.kit.com/kit-app-store/quick-start-guide.md)
- [Kit CLI](https://developers.kit.com/cli/overview.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.