Tutorials

Schedule Posts From Your Terminal With a Social Media CLI for 14 Networks

Taras Shynkarenko
•Updated: •5 min read
Schedule Posts From Your Terminal With a Social Media CLI for 14 NetworksSchedule Posts From Your Terminal With a Social Media CLI for 14 Networks

TL;DR, Quick Answer

5 min read

The AdaptlyPost CLI (adaptlypost, or apost for short) schedules, publishes and measures posts on 14 networks from the terminal. Install it with npm install -g @adaptlypost/cli (Node 22.12+), Homebrew or a curl script that installs a standalone binary. adaptlypost login stores an adaptly_ API token. post create takes text, flags or a markdown file with YAML frontmatter for accounts, schedule, per-network text, threads of up to 25 replies and first comments; local media is uploaded first. post bulk --csv validates a whole CSV and schedules it in batches of 100. post watch prints each network's result as it lands and exits 0, 1 or 8, so it fits CI. --json gives one JSON document for jq.

The AdaptlyPost social media CLI schedules and publishes posts on 14 networks from your terminal: write the post as a markdown file, run one command, and watch each network report back. It also uploads media, bulk-schedules a month from a CSV, reads analytics and answers comments.

I use it for the posts that live next to code. A release note in the repo becomes a LinkedIn post, an X thread and a Bluesky thread from one file, in the same CI job that tags the release. Nobody copies a changelog into a browser tab at 6pm.

The short version: npm install -g @adaptlypost/cli, run adaptlypost login with a token from adaptlypost.com/api-tokens, then adaptlypost post create -t "Hello" -a <account id> --at "+2h".

How do you install the AdaptlyPost CLI?

You install it with npm on Node 22.12 or later, or as a standalone binary through Homebrew or a curl script that needs no Node at all. Both install the same program under two names, adaptlypost and the shorter apost.

The @adaptlypost/cli package page on npm, with the global install command and the note that it also ships as a standalone binary.

npm install -g @adaptlypost/cli
 
brew trust adaptlypost/tap && brew install adaptlypost/tap/adaptlypost
 
curl -fsSL https://adaptlypost.com/install.sh | sh

To try it without installing, run npx -p @adaptlypost/cli adaptlypost --help. The curl script verifies the release checksum and puts the binary in ~/.local/bin without touching your shell files.

Hands typing on a laptop at a desk, as when pasting an API token to log in from the terminal.

How do you log in?

You log in with adaptlypost login, which opens the API Tokens page, reads the token from a hidden prompt, checks it with one API call, and stores it in ~/.config/adaptlypost/credentials.json with 0600 permissions. Nothing is saved if the check fails.

For CI, pipe the token in with --token-stdin, or skip login and set ADAPTLYPOST_API_TOKEN. adaptlypost whoami prints the token's workspace, its role and what it can do:

RoleWhat the CLI can do with it
AdminEverything, including accounts, connect links, members and workspaces
EditorCreate, schedule, publish, retry and delete posts, manage webhooks
ContributorSave drafts and upload media only
ViewerRead posts, accounts and analytics

A Contributor token in CI is a good safety net: the pipeline drafts, a person publishes.

How do you schedule a post from the terminal?

You schedule a post with post create, giving the text with -t, the accounts with -a and the time with --at, which takes an ISO date or a relative time such as +2h. The command prints the post id and the networks it queued.

adaptlypost post create -t "Shipping the CLI today." -a tw_4d1b -a li_22aa --at "+2h"

For anything longer, write a markdown file. The YAML frontmatter holds the accounts, schedule, timezone, media and per-network settings, and the body is the post text. Local paths under media: are uploaded first.

---
accounts: [tw_4d1b, li_22aa, bs_19aa]
at: 2026-12-08T09:00:00Z
timezone: Europe/Warsaw
media: [./release.png]
linkedin:
  text: |
    A longer version for LinkedIn, because the audience is different.
twitter:
  thread:
    - What changed, in three parts.
    - Release notes: https://example.com/changelog
---
Version 2.0 is out.

adaptlypost post create --file release.md sends it. A thread: list works on X, Threads, Bluesky and Mastodon, up to 25 replies with up to 4 images each, and firstComment: adds a first comment instead.

People planning dates on a wall calendar, the kind of month-long schedule a content team can load from one CSV file.

How do you schedule a month of posts from a CSV?

You run adaptlypost post bulk --csv december.csv. The CLI validates every row before sending anything, uploads each local file once however many rows use it, sends the posts in batches of 100, and reports failures by row number.

The basic columns are text, scheduledAt, contentType and media. Per-network columns cover the rest: text_LINKEDIN for LinkedIn's own text, firstComment_TWITTER for an X first comment, thread1_THREADS to thread25_THREADS for a Threads thread. A content team can fill the sheet in Google Sheets, export it, and one command schedules all of it.

How do you know every network published?

You run adaptlypost post watch <post id>, which polls the post's results and prints each network the moment its state changes. It exits 0 when every network published, 1 when any failed and 8 on timeout.

$ adaptlypost post watch post_9c3e1f
  11:41:03  TWITTER    PUBLISHED   https://x.com/acme/status/1836…
  11:41:19  LINKEDIN   FAILED      token expired
  ✓ Finished in 21s · 1 published, 1 failed

That exit code is why it belongs at the end of a deploy script. A failed LinkedIn post fails the job, and adaptlypost post retry <id> republishes only the networks that failed.

What post watch tells your CI job
Exit 0Every network published
Exit 1A network failed, so the job fails. post retry republishes only the failed ones
Exit 8The watch timed out
A deploy script can act on the exit code without anyone reading the log.

What else can the CLI do?

The CLI covers the whole AdaptlyPost API: accounts, posts, recurring posts, labels, media, connect links, webhooks, workspaces, members, invitations, the inbox, analytics and AI captions. Add --json to any command for one JSON document that jq can read.

  • adaptlypost ai caption --prompt "announce the launch" --platform TWITTER | adaptlypost post create -t - -a tw_4d1b writes and schedules in one line.
  • adaptlypost webhook create --url ... --event post.failed registers a webhook.
  • post create --repeat WEEKLY --on mon --count 12 starts a recurring series.
  • Exit codes are fixed per failure: 3 for a bad token, 7 for a rate limit, 10 for a role that can't do the command.

The full command list is on the CLI docs page. For code inside an app, the TypeScript SDK is the better fit, and the unified social media API guide covers the REST endpoints both call.

Frequently Asked Questions

Is there a command line tool for scheduling social media posts?

The AdaptlyPost CLI schedules and publishes posts on 14 networks from the terminal. Install it with npm install -g @adaptlypost/cli or as a standalone binary.

Can I run the AdaptlyPost CLI in GitHub Actions or other CI?

The CLI runs in CI with the token in ADAPTLYPOST_API_TOKEN. With CI set it switches to machine output, and post watch exits non-zero when a network fails.

Does the CLI need Node.js?

The npm package needs Node 22.12 or later. The Homebrew and curl installs put a standalone binary on your machine that needs no Node.

Can I post a thread from the CLI?

A thread: list in the twitter:, threads:, bluesky: or mastodon: block of a markdown file posts a thread of up to 25 replies, each with up to 4 images.

How do I schedule posts from a CSV file?

Run adaptlypost post bulk --csv file.csv. The CLI checks every row first, uploads local media once, and schedules the posts in batches of 100.

Is the AdaptlyPost CLI free?

The CLI is free and open source. It calls the AdaptlyPost API, which comes with every plan from $19 a month, with a 7-day free trial.

Can I schedule recurring social media posts from the terminal?

The AdaptlyPost CLI starts a recurring series with post create. Adding --repeat WEEKLY --on mon --count 12 sets up a weekly Monday series with a count of 12.

How do I retry a social media post that failed on one network?

Run adaptlypost post retry <id> with the post's id. It republishes only the networks that failed. To see which ones those are, run adaptlypost post watch <id>.

Where does the AdaptlyPost CLI store my API token?

adaptlypost login stores the token in ~/.config/adaptlypost/credentials.json with 0600 permissions. It checks the token with one API call first and saves nothing if the check fails. In CI you can skip login and set ADAPTLYPOST_API_TOKEN.

How do I stop a CI pipeline from publishing posts without approval?

Give the pipeline a token with the Contributor role. That role can only save drafts and upload media, so the pipeline drafts and a person publishes.

Was This Article Helpful?

Let us know what you think!

See us more often in Google

One click marks AdaptlyPost as a preferred source, so our articles sit higher in your Top Stories, AI Mode, and AI Overviews.

Related Articles