ChirpieDocs
CLI

CLI Overview

Install and authenticate the Chirpie command-line interface.

The Chirpie CLI lets you post, manage accounts, and handle API keys from your terminal.

When to use it: for shell agents, scripts and scheduled jobs, where one command per action and JSON output are what you want. Working in an AI app such as Claude, Cursor or ChatGPT? Add the hosted MCP server instead: one URL and a sign-in, nothing to install. Building an app? Use the SDK or the REST API.

Installation

npm install -g chirpie
yarn global add chirpie
pnpm add -g chirpie

Or use directly with npx:

npx chirpie post "Hello from the CLI!"

Authentication

chirpie login

This prints a chirpie.ai link and a short code, opens the link if this machine has a browser, and waits. Open it in any browser, on this machine or your phone, sign in or sign up with just your email, check the code matches and tap Approve: the CLI saves an API key to ~/.chirpie/config.json. It works over SSH, in containers and on headless servers. --read-only asks for a key that can only read, and --localhost keeps the older flow, where a browser on this machine hands the key back to the CLI.

Sign up by email

chirpie signup --email you@example.com

For a brand-new account: Chirpie sends one email, you tap Review and approve and then Approve, and the CLI saves the key. An address that already has an account is signed in the same way. Both commands are device authorization, so an agent running the CLI only ever relays the link; it never handles your password or a code.

Manual Key

chirpie auth --key chirpie_sk_YOUR_KEY

Or set the environment variable:

export CHIRPIE_API_KEY=chirpie_sk_YOUR_KEY

The CHIRPIE_API_KEY environment variable takes precedence over the config file.

Check Status

chirpie whoami

Logout

chirpie logout

Removes the config file at ~/.chirpie/config.json.

Config File

The CLI stores its config at ~/.chirpie/config.json with 0600 permissions (readable only by your user):

{
  "api_key": "chirpie_sk_...",
  "base_url": "https://chirpie.ai"
}

Confirmation Prompts

Commands that cannot be undone ask before they run: chirpie accounts disconnect <id>, which ends a connection and cancels that account's scheduled posts, and chirpie comments delete. In a script or any other non-interactive shell there is nobody to ask, so pass -y (--yes) or the command stops without doing anything.

chirpie accounts disconnect 550e8400-e29b-41d4-a716-446655440000 -y

IDs

Listings print a short ID, the first eight characters of the full one. Wherever a command takes an account, post, key or comment ID it accepts either: the short ID from chirpie accounts, chirpie posts, chirpie keys or chirpie comments list, or the full ID from --json. That covers -a and the keys of --config when posting, too. A group ID (chirpie posts --group) is the full one a multi-account post returned.

chirpie accounts disconnect 90208e20 -y
chirpie posts delete 2e7e8e95

A short ID is matched against your own accounts, posts, keys or comments, and it has to name exactly one of them. When it matches none, or more than one, the command stops without doing anything and says which, so type a few more characters or pass the full ID. A short post ID is looked up among your 1,000 most recent posts, and a short draft ID among your 1,000 most recent drafts. A short comment ID is looked up among a post's 1,000 most recent comments, so use the full ID for anything older.

Output Formats

All commands support --json for machine-readable output:

chirpie posts --json | jq '.[] | .id'

On a subcommand the flag works in either position, before or after the arguments:

chirpie accounts deactivate 550e8400-e29b-41d4-a716-446655440000 --json
chirpie accounts --json deactivate 550e8400-e29b-41d4-a716-446655440000

Without --json, output is formatted as human-readable tables and messages.

On this page