# PostEverywhere CLI: Schedule Social Media Posts From Your Terminal **Source:** https://posteverywhere.ai/cli --- Open source, on npm # The PostEverywhere CLI **`@posteverywhere/cli` lets you log in, connect accounts and publish to all top platforms without leaving the terminal.** Seventeen commands cover the whole publishing workflow: scheduling, the queue, media upload, captions, analytics, account health and retries. Every command emits JSON, so an AI agent can drive it as easily as you can. Included on every plan, from [$9/mo](https://posteverywhere.ai/pricing). ## Publish your first post in 90 seconds `npm install -g @posteverywhere/cli posteverywhere login # opens your browser, saves a scoped key posteverywhere connect instagram # OAuth flow, auto-detects the account posteverywhere accounts # list connected accounts with ids posteverywhere post -c "Hello" -a 123,456`Prefer not to install anything? Every command works through `npx @posteverywhere/cli`. Full walkthrough in the [CLI guide](https://posteverywhere.ai/docs/cli). ## What the PostEverywhere CLI gives you ### Sixteen commands, one binary. Login, connect, publish, schedule, queue, upload, caption, analytics, retry. The whole workflow, not just a post endpoint wrapped in curl. ### Ships as an agent skill. npx skills add posteverywhere/cli auto-detects Claude Code, Cursor, Codex and 70+ other agents, teaching the full command surface in one install. ### JSON on every command. Pass --json, or just pipe the output and it turns on automatically. Agents and scripts act on structured results instead of parsing text. ### Device-flow login. The same pattern as the GitHub CLI: approve in the browser, get a scoped key saved locally. No tokens to copy and paste, revocable any time. ## Every command The complete surface, grouped by what it touches. Flags and worked examples for each are in the [CLI guide](https://posteverywhere.ai/docs/cli), and the underlying endpoints are in the [API reference](https://posteverywhere.ai/docs/api/reference). ### Auth and identity - `login`Device-flow login in your browser, saves a scoped key - `logout`Remove saved credentials - `whoami`Show the authed account, plan and quota ### Accounts - `accounts`List connected accounts with ids and health - `connect `Connect a new account - `reconnect `Re-authorize an account whose token expired - `account:health `Detailed health for one account ### Publishing - `post`Publish now, schedule, or drop into the next queue slot - `posts`List posts, filterable by status and platform - `queue`Show the next queue slots for your accounts - `results `Per-platform publish results - `retry `Retry failed destinations ### Media, AI and reporting - `upload `Import an image or MP4 by URL, returns a media_id - `caption`Generate captions by topic, platform and tone - `analytics`Analytics summary by week, month or all time - `campaigns`List campaigns - `platform-rules [platform]`Character limits, media constraints and supported features ## Driving the CLI from an AI agent One command installs the bundled skill and the agent learns the whole surface, no prompt engineering required: `npx skills add posteverywhere/cli # then just ask: # "schedule a post to all my accounts for tomorrow at 9am"`For headless pipelines, skip login entirely and set `POSTEVERYWHERE_API_KEY`, which takes precedence over any saved key. If you would rather work conversationally inside an assistant than in a shell, the [MCP server](https://posteverywhere.ai/mcp) covers the same API, and [the agents guide](https://posteverywhere.ai/agents) compares the two. [### CLI guide Every flag, the login flow and troubleshooting. Open](https://posteverywhere.ai/docs/cli)[### MCP server The conversational route, for Claude and ChatGPT. Open](https://posteverywhere.ai/mcp)[### API reference The endpoints behind every command. Open](https://posteverywhere.ai/docs/api/reference) ## Publish from your terminal today One install, one login, all top platforms. Included on every plan, with a 7 day free trial. [Start your 7 day trial](https://app.posteverywhere.ai/signup)[Read the CLI guide](https://posteverywhere.ai/docs/cli) ## PostEverywhere CLI FAQs ### What is the PostEverywhere CLI? A command line tool (@posteverywhere/cli) that lets you log in, connect social accounts, and schedule or publish posts to all top platforms without leaving the terminal. Install it globally with npm install -g @posteverywhere/cli, or run it ad hoc with npx @posteverywhere/cli. It is open source, and it talks to the same REST API as the dashboard. ### Can an AI agent use the CLI? Yes, and it ships with a skill file that teaches an agent the whole command surface in one install: npx skills add posteverywhere/cli auto-detects Claude Code, Cursor, Codex and 70+ other agents. Every command also accepts --json (automatically on when output is piped) and emits structured JSON, so an agent can act on what actually happened rather than parsing prose. ### How does CLI login work? A device-grant flow, the same pattern the GitHub CLI uses. Running posteverywhere login prints a short code, opens the approval page in your browser, and polls until you approve. It then saves a scoped API key to ~/.posteverywhere/config.json with 600 permissions. The key appears on the Developers page alongside dashboard-generated keys and can be revoked there at any time. ### Which platforms can the CLI connect? All top platforms. Instagram, Facebook, Threads, X, LinkedIn, TikTok, YouTube and Pinterest connect through the browser OAuth flow, and the CLI watches for the account to appear so there is no token to copy and paste. Bluesky, Telegram and Discord connect headlessly, prompting for an app password, bot token or channel webhook URL respectively. ### Can I run the CLI headlessly in CI? Yes. Skip login entirely and set POSTEVERYWHERE_API_KEY with a key from the Developers page. The environment variable takes precedence over any saved login key, so the same commands work unchanged in a pipeline. ### Should I use the CLI or the MCP server? The CLI is the better fit when publishing belongs in a script or a command, because it composes with everything else in your shell and pipes cleanly into other tools. The MCP server is the better fit for conversational use inside an assistant like Claude or ChatGPT. Both talk to the same API and both are included on every plan, so it is a workflow preference rather than a capability difference.