AI agents and API
Is there a CLI or SDK?
Yes. The CLI (@posteverywhere/cli) posts from your terminal and logs in with a browser code. The Node.js SDK (@posteverywhere/sdk) is for your own code.
Updated 23 October 2026
Yes. The CLI is @posteverywhere/cli on npm, and the Node.js SDK is @posteverywhere/sdk. Both use the same API, so an account connected once works everywhere.
CLI: log in and post
- Run
npx @posteverywhere/cli login. Your browser opens app.posteverywhere.ai/device. - On the Connect your CLI page, enter the code the terminal shows and click Authorize device. The page then says Device authorized.
- The CLI saves a key in
~/.posteverywhere/config.json. You can see and revoke it on the Developers page, API Keys tab. - Try it:
posteverywhere accounts
posteverywhere post -c "Hello" -a 123,456
For a server or CI, skip login and set POSTEVERYWHERE_API_KEY=pe_live_... instead.
CLI commands
| Command | What it does |
|---|---|
login / logout |
Log in with a browser code; remove the saved key |
whoami |
Your account, plan and remaining quota |
accounts |
Connected accounts with ids and health |
platform-rules [platform] |
Character limits, media rules and supported features |
connect |
Connect your coding agents to the MCP server |
connect <platform> |
Connect a new social account |
reconnect <accountId> |
Reconnect an account whose login expired |
account:health <id> |
Why one account cannot post |
post -c <text> -a <ids> [-s <iso>] [-m <mediaIds>] |
Publish now, or schedule with -s |
post -a <ids> --title <t> --body-file <md> |
WordPress blog post |
posts |
List posts, filter by status and platform |
results <postId> |
Per-platform success or failure |
retry <postId> |
Retry the failed destinations |
upload <url> |
Import an image or MP4 by link |
caption -t <topic> |
AI captions per platform |
analytics [--period] |
Performance summary |
campaigns |
List campaigns |
Add --json for machine-readable output. It turns on by itself when the output is piped.
Node.js SDK
npm install @posteverywhere/sdk
import PostEverywhere from '@posteverywhere/sdk';
const client = new PostEverywhere({ apiKey: process.env.POSTEVERYWHERE_API_KEY });
const { accounts } = await client.accounts.list();
await client.posts.create({ content: 'Posted from code', publish_now: true });
Typed errors carry a retryable flag, and the SDK supports idempotency keys. Full docs on the npm page and at posteverywhere.ai/docs.
Which one?
- An agent that runs shell commands (Claude Code, Codex, Cursor): the CLI, plus
npx skills add posteverywhere/cli. - An agent that speaks MCP (Claude, ChatGPT, hosted agents): the Agents page.
- Your own application: the SDK or the REST API.
Was this article helpful?
Related articles
Still stuck? Email support@posteverywhere.ai and we will help.