The Kit CLI lets you work with your Kit account by typing commands instead of clicking through the app. Pull a report on your latest broadcasts, import a list of subscribers, or tag hundreds of people at once. It's free, open source, and works on every Kit plan.
You'll type the commands in a terminal, the text window built into your computer. Never used one? The steps below show you where to find it.
Prefer to ask questions about your account in plain language? Try the AI Connectors instead.
What you can do with the Kit CLI
The Kit CLI gives you access to everything in Kit's public API (V4). Every operation has its own command, and kit api covers anything without one. The Kit CLI README on GitHub lists every command.
Here are three examples of what you can do with it:
Pull your data and report on it. Run
kit broadcasts stats --status completed --sent-after 2026-10-01to see recipients, open rate, click rate, and unsubscribes for each broadcast. Add--format jsonto send the results to a spreadsheet or a script.Make bulk changes and run scheduled jobs.
kit bulkcommands import subscribers, add tags, or update custom fields from a JSON file. The CLI tells you how many records the file holds and asks before it sends anything.Build on the Kit API. Test webhooks and check API responses without writing auth code first. Building something bigger? The Kit CLI developer docs cover scripts, automation, and AI coding agents.
Commands change your live Kit account. The Kit CLI can do anything the API can, including deleting tags, unsubscribing people, changing subscriber data, scheduling broadcasts, and adding tags that start automations, which can send emails. It asks for your yes before it deletes, unsubscribes, acts in bulk, or schedules a broadcast. Other changes run straight away, and some can be hard to undo.
If you're not sure what a command does, add --help to see before you run it, and read every confirmation before you type y. Not comfortable in a terminal yet? You can do the same things in Kit, or ask your AI tool with the AI Connectors.
Before you start
You need two free tools on your computer:
Node.js 22 or later. This is what runs the Kit CLI. Download it from nodejs.org.
Git. The Kit CLI installs from GitHub, and Git is how your computer gets it. Download it from git-scm.com. On a Mac, the pop-up that offers to install developer tools also installs Git.
Not sure if you already have them? Open a terminal and run node --version and git --version. If each one prints a version number, you're set. Node needs to be 22 or higher.
Install the Kit CLI
Open your terminal. Any terminal works. New to this? On a Mac, press Command + Space, type Terminal, and press Enter. On Windows, open the Start menu, search for PowerShell, and open it.
Copy and paste this command, then press Enter. Keep the quotation marks, because some terminals fail without them. Wait for it to finish before moving on.
npm install -g "github:Kit/kit-cli#stable"
Check that it worked. This should print a version number.
kit --version
Heads up: the first time you run a kit command, the CLI asks "Share usage data and error reports with Kit? [y/N]". Sharing is optional and off by default. Press Enter to keep it off, or type y and press Enter to share.
Log in
You log in with your Kit account. You don't need an API key.
In your terminal, run:
kit login
Your browser opens. Sign in to Kit if asked, then approve the Kit CLI app.
Go back to your terminal. When you see "Authenticated with Kit successfully," you're logged in.
Port 9876 needs to be free while you log in. If you'd rather use an API key, run kit init and choose the API key option instead.
Run your first commands
Try these in order:
kit accountshows your account details.kit subscribers listlists your subscribers.kit broadcasts stats --status completedshows stats for the broadcasts you've sent.
Not sure what a command can do? kit --help lists every command, and adding --help after any command explains it.
Confirmations for bulk and destructive changes
Before the CLI deletes, unsubscribes, acts in bulk, or schedules a broadcast, it shows what it's about to do and asks [y/N]. Type y and press Enter to go ahead. Anything else cancels it, and nothing changes.
Use the Kit CLI with Claude Code
Run kit setup-skill to add the /kit-cli skill to Claude Code. Then ask things like /kit-cli list my subscribers. Before the skill makes any change, it shows you the exact command and what it will change, then waits for your yes.
Check your setup
If something isn't working, run kit doctor first. It checks your Node.js version, your login, and the connection to Kit.
Update the Kit CLI
Run kit upgrade. It checks for a newer release and installs it for you. If you already have the newest one, it tells you you're up to date.
Want to know which version you have? Run kit --version.
Log out
On this computer: run
kit logout. This signs out only the computer you run it on.On every computer: in Kit, go to Apps, open the Manage tab, open Kit CLI, and click Uninstall. Use this if you lose a laptop.
Uninstall the Kit CLI
Log out first. Run
kit logout, so your login isn't left behind on your computer.Copy and paste this command, then press Enter.
npm uninstall -g @kit/cli
Use that exact name. With any other name, npm says "up to date" and removes nothing.
Heads up: if you saved an API key, uninstalling doesn't remove it. The Kit CLI README on GitHub shows how to clear everything.
Troubleshooting
Find the message you see in your terminal below.
"Not authenticated. Run kit login or set KIT_API_KEY env var."
You're not logged in yet. Run kit login.
"Port 9876 is already in use."
Another kit login is probably still running. Close your other terminal windows and try again.
"Authorization timed out after 5 minutes."
Run kit login again and approve the app in your browser within 5 minutes.
"Could not open a browser… Open this URL yourself"
Copy the link from your terminal and paste it into a browser.
"Cancelled. Nothing was changed."
You didn't type y at the [y/N] question, so the CLI stopped before changing anything. Run the command again and type y to go ahead.
An install warning about an unsupported engine, or kit doctor says Node is too old
Your Node.js version is out of date. Install Node.js 22 or later from nodejs.org, then install the Kit CLI again.
An install error that mentions git
Errors like "syscall spawn git" or "An unknown git error occurred" mean Git isn't installed. Install it from git-scm.com, then try again.
Get help
Where to go depends on what's wrong:
You have a question about the Kit CLI, your Kit account, or your data. Contact Kit Support. You don't need a GitHub account. For a problem with the Kit CLI itself, include the command you ran and the full error, the output of
kit --versionandkit doctor, and your operating system.You use GitHub and want to report a bug or request a command. You can also open an issue on the Kit CLI project.
You found a security problem. Report it privately by emailing security@kit.com or through GitHub's private vulnerability reporting. Please don't share the details in a support ticket or a public GitHub issue.
Heads up: GitHub issues are public. Never paste API keys, login tokens, or subscriber email addresses into an issue or a support ticket. If an error includes one, replace it with [removed] first.
