CLIAPI

Schedule and publish from the terminal

fopost is the official FoPost CLI: a single static binary with nothing else to install. Create a post, attach media, schedule it across every connected account, and check each delivery, from your shell, a script, or a CI job.

brew install fopost/tap/fopost
fopost auth login

fopost posts create \
  --account acc_9f2c4a7b \
  --account acc_1ee3d5a0 \
  --text "We shipped dark mode. Every surface, every chart." \
  --media ./screenshots/dark-mode.png \
  --schedule-at "2026-09-01 09:00"

One binary

macOS, Linux and Windows on amd64 and arm64. Install with Homebrew, go install, or a release archive.

Built for scripts

Every command takes --json, errors go to stderr, and each failure has its own exit code.

Nothing posts by surprise

A post stays a draft until you pass --publish, run posts publish, or set a schedule.

Posts

Create, schedule and publish in one command

posts create takes the accounts, the text, local media files and a time. Files are uploaded to your media library and attached for you. Long copy comes from a file or a pipe, and preflight checks a post against every target network before anything is sent.

Read the posts commands
Posts
git log -1 --pretty=%s | \
  fopost posts create --account acc_9f2c4a7b --text-file - --draft

fopost posts preflight post_7d2a
fopost posts publish post_7d2a
fopost posts deliveries post_7d2a

Schedule or publish

Pass a time to schedule, --publish to send now, or nothing to keep a draft.

Preflight

See which accounts are ready or blocked, and why, before you publish.

Delivery status

Per-account status, attempts, and the live link once a network has one.

Scripting

JSON out, exit codes back

Add --json to any command and pipe the result into jq. A 401, a 404, a rate limit and a bad request each exit with a different code, so a script can tell them apart without parsing text. Retries and backoff happen underneath on every request.

Read the scripting guide
Accounts that need attention
fopost accounts health --json \
  | jq -r '.accounts[] | select(.healthStatus != "healthy") | .id' \
  | xargs -I{} fopost accounts validate {} --quiet

--json everywhere

The resource itself, indented, on stdout. Tables are for people.

Distinct exit codes

Bad input, auth, scope, not found, rate limit and server errors each have one.

Retries built in

Rate limits, server errors and network failures are retried with backoff.

CI

Post from your pipeline

Set your API key as a secret, pass the workspace, and the CLI needs no saved config. Announce a release, share a changelog, or block a merge when preflight fails. For GitHub there is also an official Action that wraps the same flow.

Start building
Release notes on every tag
FOPOST_API_KEY=$FOPOST_API_KEY fopost posts create \
  --workspace "$WORKSPACE_ID" \
  --account "$ACCOUNT_ID" \
  --text-file release-notes.md \
  --publish --json --quiet

Key from the environment

FOPOST_API_KEY is read automatically. No login step in CI.

Any CI system

GitHub Actions, GitLab CI, or anything else that runs a shell.

Automations and webhooks

Trigger automations and manage webhook subscriptions from the same tool.

CLI questions, answered

How do I install the CLI?

Run brew install fopost/tap/fopost, or go install github.com/fopost/fopost-cli@latest, or download the archive for your platform from the GitHub releases page and put fopost on your PATH.

Does it need an account?

Yes. The CLI talks to the hosted FoPost API, so it needs an API key, which you create in the dashboard under Settings, API Keys. fopost auth login stores it, or set FOPOST_API_KEY instead.

Where is my API key stored?

In your user config folder, readable only by you. The CLI never prints it back: auth status shows a masked prefix, and verbose output leaves it out.

What can it do?

Posts, accounts and their health, workspaces, media uploads, labels, analytics, automations and webhooks. Run fopost --help or read the CLI docs for every command.

Is it open source?

Yes. The CLI is MIT-licensed and its source is on GitHub at fopost/fopost-cli.

Build on the CLI today

Starting is free and the full API is included. Create a key and make your first call in minutes.

Get your API key