Schedule social posts from your terminal: the PostEverywhere CLI is here


Last updated: June 2026.
PostEverywhere has had a REST API and an MCP server for a while, but not a social media CLI. Both are great when you are writing an integration or wiring up an AI agent. But there has always been a gap in the middle: the moments when you just want to fire off a post, or script a quick scheduling job, without writing a single line of integration code or opening a browser tab.
If you spend your day in a terminal, posting to social used to mean one of two things. Open a dashboard and click through it, or hand-write an API call with curl, an auth header, and a JSON body. For a one-off "schedule these five posts for next week," both are more friction than the task deserves.
So we built a social media CLI.
Today we are shipping @posteverywhere/cli: a social media CLI that installs with one command, logs in once, and posts or schedules to all 11 platforms straight from your terminal. It is built for humans who live in a shell, for scripts and CI jobs, and for AI agents that can call it directly with structured --json output. This post is the developer walkthrough, with real commands.
Table of Contents
- What the CLI is for
- 90-second setup
- Logging in: device-grant, like the GitHub CLI
- Connecting your accounts
- Posting and scheduling
- For AI agents: structured --json output
- CLI, API, MCP, or dashboard: which to use
- Get started
- FAQs
What the CLI is for
The CLI is not trying to replace the dashboard. It is for the cases where a terminal is faster than a browser:
- One-off posts and quick schedules. You are already in a shell. Type one command instead of context-switching to a tab, finding the composer, and clicking through a calendar.
- Scripts and automation. Drop a
posteverywhere postline into a deploy script, a cron job, or a Makefile so a release announcement goes out the moment you ship. This is the lightweight cousin of full social media automation. - CI/CD and content pipelines. Generate content in a build step, then publish it across platforms in the same job. No SDK install, no client setup.
- AI agents. Every command supports
--json, so a coding agent can run the CLI as a tool and parse the result. It is the simplest possible bridge between an agent and your social accounts.
It runs on the same engine as everything else: the PostEverywhere API that also powers cross-posting across Instagram, TikTok, LinkedIn, YouTube, Facebook, X, Threads, Pinterest, Bluesky, Telegram, and Discord.
Prefer a calendar to a command line? The PostEverywhere dashboard covers the same 11 platforms with a visual content calendar and AI captions. Start a 7-day free trial.
90-second setup
The whole flow is four commands. Here it is end to end, then we will break it down:
npm install -g @posteverywhere/cli # or: npx @posteverywhere/cli <command>
posteverywhere login # opens your browser, saves a scoped key locally
posteverywhere connect instagram # opens the OAuth flow, auto-detects the account
posteverywhere accounts # list connected accounts, their ids, and health
posteverywhere post -c "We just shipped a CLI 🚀" -a 123,456
That is it. You are logged in, you have an account connected, and you have posted to it. The package is published on npm and needs Node.js installed. Everything below is detail on each step.
If you would rather not install it globally, npx @posteverywhere/cli <command> runs the latest version without a global install, which is handy in CI.
Logging in: device-grant, like the GitHub CLI
posteverywhere login
login uses a device-grant flow, the same pattern the GitHub CLI uses. It prints a short code, you approve it in your browser, and a scoped API key is written to ~/.posteverywhere with chmod 600 so only your user can read it. No copying keys out of a settings page and pasting them into a dotfile.
The key is yours to manage. You can view or revoke it anytime from Settings → Developers in your dashboard, and revoking it instantly kills the CLI's access.
Connecting your accounts
posteverywhere connect <platform>
How a platform connects depends on the platform:
- Browser platforms (
instagram,facebook,threads,x,linkedin,tiktok,youtube,pinterest): this opens the normal OAuth flow in your browser, then auto-detects the account you just authorized. No manual ID copying. - Bluesky: prompts for your handle and an App Password (created in Bluesky under Settings).
- Telegram: prompts for a bot token from @BotFather and your channel. Add the bot to the channel as an admin first.
- Discord: prompts for a channel webhook URL (Server Settings → Integrations → Webhooks).
To see everything you have connected, with each account's id and health, run posteverywhere accounts. If an account's token expires, you do not start over, you re-authorize it in place with posteverywhere reconnect <accountId>.
Posting and scheduling
The core command is post. Pass your caption with -c and the target account ids with -a:
posteverywhere post -c "New blog post is live: https://posteverywhere.ai/blog" -a 123,456,789
One call fans the post out to every account id you list, each through that platform's official API, so the publish is handled the same way it would be from the dashboard. Pair it with AI captions generated earlier in your script and you have a full generate-then-publish pipeline in two commands.
Because the CLI is a thin layer over the API, the same workflows you would build with the scheduling API (campaigns, bulk operations, scheduled times, retries) are all reachable from it. Run posteverywhere --help for the full command list, which grows as the API does.
For AI agents: structured --json output
This is the part we are most excited about. Every command takes a --json flag:
posteverywhere accounts --json
posteverywhere post -c "Shipping update" -a 123 --json
With --json, the CLI returns clean, machine-readable output instead of pretty terminal formatting. That makes it a first-class tool for AI agents. A coding agent in Claude, Cursor, or Codex can run posteverywhere as a shell tool, read the JSON, and decide what to do next, all on one scoped key.
If you want a deeper agent integration, the hosted MCP server exposes 33 tools your agent can call in natural language, built on the open Model Context Protocol. The CLI is the lighter-weight option: no MCP client required, just a binary the agent can shell out to.
CLI, API, MCP, or dashboard: which to use
PostEverywhere now gives you four ways in. They share one account and one set of connected platforms, so you can mix them freely:
- Dashboard: the visual social media scheduler, best for planning, previews, and anyone who is not in a terminal.
- CLI (
@posteverywhere/cli): fastest for one-off posts, scripts, CI jobs, and simple agent calls. No code to write. - REST API and SDK: for building social posting into your own product, with webhooks, campaigns, and bulk operations.
- MCP server: for AI agents that should drive scheduling in natural language.
Most teams end up using more than one. Plan in the dashboard, publish from the CLI in a deploy script, and let an agent handle the routine stuff over MCP.
Get started
npm install -g @posteverywhere/cli
posteverywhere login
The CLI is free to install, and it works with your PostEverywhere account. Full API and CLI access is included on every plan from $19/month, with no separate developer fee and no enterprise gating. New accounts get a 7-day free trial on all plans. See pricing for the connected-account and AI-credit limits per tier.
Ready to publish from your shell? Start your 7-day free trial, run
npm install -g @posteverywhere/cli, and you will be posting across 11 platforms in 90 seconds.
If you would rather schedule from a calendar than a command line, the PostEverywhere dashboard is waiting.
FAQs
How do I install the PostEverywhere CLI?
Run npm install -g @posteverywhere/cli to install it globally, then posteverywhere login to authenticate. You can also run it without installing, using npx @posteverywhere/cli <command>, which is convenient in CI pipelines. You need Node.js installed.
Which platforms can I post to from the CLI?
All 11 that PostEverywhere supports: Instagram, TikTok, YouTube, LinkedIn, Facebook, X, Threads, Pinterest, Bluesky, Telegram, and Discord. Each post publishes through that platform's official API.
Is the login secure?
Yes. posteverywhere login uses a device-grant flow like the GitHub CLI: you approve a short code in your browser and a scoped API key is saved locally at ~/.posteverywhere with chmod 600. You can revoke it instantly from Settings, Developers, which immediately cuts off the CLI's access.
Can AI agents use the CLI?
Yes. Every command supports a --json flag that returns clean, machine-readable output, so an AI coding agent in Claude, Cursor, or Codex can run the CLI as a shell tool and parse the result. For a fuller natural-language integration, the hosted MCP server exposes 33 tools.
What does the CLI cost?
The CLI itself is free to install from npm. It talks to your PostEverywhere account, and full API and CLI access is included on every plan from $19/month with no separate developer fee. All plans include a 7-day free trial.
How is the CLI different from the API and the MCP server?
The CLI is the no-code option for one-off posts, scripts, and CI. The REST API and SDK are for building social posting into your own product. The MCP server is for AI agents that drive scheduling in natural language. They all share one account and the same connected platforms, so you can use whichever fits the moment.
How do I connect a platform that is not browser-based?
Bluesky prompts for your handle and an App Password. Telegram prompts for a bot token from @BotFather plus your channel (add the bot as an admin first). Discord prompts for a channel webhook URL. The browser-based platforms (Instagram, Facebook, Threads, X, LinkedIn, TikTok, YouTube, Pinterest) just open the normal OAuth flow and auto-detect the account.

Founder & CEO of PostEverywhere. Writing about social media strategy, publishing workflows, and analytics that help brands grow faster.