CLI
Command line
Publish, schedule and triage from a terminal or a CI job. A thin layer over the same API the app uses — zero dependencies, Node 18 or newer.
Install
npm install -g echoia-cliOr run it without installing, which is what a pipeline usually wants: npx echoia-cli accounts. The package is echoia-cli; the command it installs is echoia.
Authenticate
echoia loginOpens your browser, you approve the terminal, and the key lands in ~/.config/echoia/config.json with 0600 permissions. Nothing to copy or paste.
It uses PKCE over a loopback redirect (RFC 8252). A CLI published on npm cannot keep a client secret — anyone can read it off the registry — so it commits to the hash of a random value up front and proves itself with the value at the end. The browser is handed a one-time code, never the key: a key in a redirect URL survives in browser history, in the referrer, and in every proxy log on the way.
Without a browser
A CI job has no browser and nobody to click, so the environment still wins over everything else — no login step needed:
export ECHOIA_API_KEY="eko_..."On a shared machine, pipe the key in so it never reaches argv: anyone else on the box can read a command line out of ps.
echo "$KEY" | echoia login --stdinechoia login --no-browser prompts instead, without echoing what you type. The browser flow is skipped automatically whenever output is not a terminal.
Your first commands
# Which workspace does this key open?
echoia whoami
# What is connected, and does anything need reconnecting?
echoia accounts
# Draft a post — no --at or --now means it stays a draft
echoia post "Something I'm still thinking about" -a linkedin:@youDraft is the default
--at or --now, nothing goes public — a draft waits in the Posts tab. --now publishes straight away and does not ask again: the flag is the confirmation.Commands
| Command | Does |
|---|---|
echoia login | Sign in through your browser |
echoia logout | Remove the stored key |
echoia whoami | Show which workspace this key opens |
echoia accounts | List connected social accounts |
echoia posts | List posts |
echoia post | Create a draft, schedule, or publish |
echoia stats | Daily performance of one post |
echoia comments | List comments with sentiment and tags |
echoia reply | Reply publicly to a comment |
echoia raw | Call any endpoint directly |
Full options for each on the commands page, or echoia <command> --help in your terminal.
Environment
| Variable | Effect |
|---|---|
ECHOIA_API_KEY | The key. Wins over the stored one. |
ECHOIA_BASE_URL | Point at another API host. |
ECHOIA_CONFIG_DIR | Where to keep config.json. |
NO_COLOR | Disable colour. Also off when stdout is not a terminal. |
Exit codes
0— success.1— anything else. The message goes to stderr with a hint: a 403 names the missing scope, a 429 says whether waiting will help.
Commands
Every command and flag, with examples.
Scripting & CI
JSON output, jq pipelines and GitHub Actions.