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.
Installation
npm install -g chirpieyarn global add chirpiepnpm add -g chirpieOr use directly with npx:
npx chirpie post "Hello from the CLI!"Authentication
Browser Login (Recommended)
chirpie loginThis opens your browser, signs you in, and saves an API key to ~/.chirpie/config.json automatically.
Manual Key
chirpie auth --key chirpie_sk_YOUR_KEYOr set the environment variable:
export CHIRPIE_API_KEY=chirpie_sk_YOUR_KEYThe CHIRPIE_API_KEY environment variable takes precedence over the config file.
Check Status
chirpie whoamiLogout
chirpie logoutRemoves 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 -yIDs
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 2e7e8e95A 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-446655440000Without --json, output is formatted as human-readable tables and messages.