Install
Install the CLI and sign in with a browser-approved device code.
Last updated on
Requires Node 22.12 or later.
npm install -g @postonus/cli
postonus loginlogin prints a code and opens your browser. Approve it there and the terminal picks it up automatically. On a remote machine with no browser, open the printed URL on any other device and type the code in — that is what the flow is designed for.
When it is done, login prints one line to paste into your coding agent. The agent then reads Set up with an agent, adds the Postonus MCP server to itself, and drafts a first post with you.
postonus post "shipping today" --to x,linkedin --optimalpostonus --help, or postonus <command> --help, lists everything. See Commands for every group.
Where credentials live
A session token from login is stored at ~/.config/postonus/config.json (or $XDG_CONFIG_HOME/postonus/config.json), permissioned so only your user can read it. postonus logout removes it.
Environment
| Variable | Purpose |
|---|---|
POSTONUS_API_KEY | An API key for non-interactive use. Takes precedence over a stored session — set it and login is unnecessary. |
POSTONUS_API_URL | Which dashboard to talk to. Defaults to https://app.postonus.com. |
EDITOR / VISUAL | Editor opened by post --editor. |
NO_COLOR | Disable coloured output. |
XDG_CONFIG_HOME | Where the session is stored. Defaults to ~/.config. |
For non-interactive use — CI, scripts — see CI and Scripting.