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

Before you start

You need:
  • Node.js 22 or later
  • Git, which npm uses to install from GitHub
  • A Kit account, on any plan

Install and sign in

1

Install the CLI

This installs the newest release of 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

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 for scripts and CI.
3

Check that it works

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.
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:
See how completed broadcasts performed:
Find subscribers by state, tags, sign-up date, or engagement:
Create a tag and add a subscriber to it:
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:
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:
See Pagination 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:
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:
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:
The Releases page lists each release and its changes.

Turn on shell completion

Completion covers command names, subcommand names, and flags.

Sign out

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

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

Remove the 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:
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.

Next steps