Command line

Post without opening a browser. Every command speaks JSON, so it pipes into what you already run.

The postonus CLI drives the same API the dashboard does. Sign in once from a terminal, then compose, queue, reschedule, and upload media without leaving it. Built for the case where the browser is somewhere else — an SSH session, a container, a build box.

Install the CLI

On npm. Available on every plan.

How it works

CLI, step by step.

  1. 1

    Install it

    npm install -g @postonus/cli. One binary, no runtime to configure.

  2. 2

    Sign in

    postonus login prints a code and opens your browser. Approve it there and the terminal picks it up.

  3. 3

    Connect a channel

    postonus channels connect walks the OAuth hop for you.

  4. 4

    Schedule something

    postonus post "shipped it" --to x,linkedin --optimal.

Capabilities

What you get with CLI.

--json on every command
Data goes to stdout, progress and errors to stderr, so pipes stay clean. Exit codes are 0 for success, 1 for a failure, 2 for a bad invocation — enough for a shell script to branch on.
Made for machines without browsers
Login is the device authorization grant: a code you can approve from any other device. That is the case a loopback redirect cannot serve, and it is where terminals often live.
CI needs no login step
Set POSTONUS_API_KEY and the CLI skips the stored session entirely. A GitHub Action that posts release notes on every tag is about four lines.
Content from a file, an editor, or a pipe
--file for a draft you already wrote, --editor to open $EDITOR, or pipe it in. Long posts do not have to survive being pasted into a shell.

The commands

npm install -g @postonus/cli
postonus login
CommandWhat it does
login / logout / whoamiBrowser-approved sign in, and who you are
channels listConnected channels and their health
channels connectConnect a new channel over OAuth
post <text>Schedule a post (never publishes immediately)
queue listUpcoming scheduled posts
queue move <scheduleId> --atReschedule one queued post
media upload <path…>Upload images or video for use in posts
best-times --to <platforms>Recommended posting windows

postonus <command> --help lists the flags on any of them.

Scripting it

The reason --json is on everything rather than on a chosen few: a scheduler is a thing you want in a cron job eventually, and a tool that only formats for humans is a tool you end up screen-scraping.

postonus queue list --json | jq -r '.queue[] | "\(.scheduledAt) \(.platform)"'
cat draft.md | postonus post --to x --optimal
postonus post "test" --to x --optimal --dry-run

Data on stdout, progress on stderr. Exit 0 success, 1 failure, 2 usage error.

In CI

- run: npx @postonus/cli post "Released ${{ github.ref_name }}" --to linkedin --optimal
  env:
    POSTONUS_API_KEY: ${{ secrets.POSTONUS_API_KEY }}

An API key is bound to the workspace that created it and cannot reach another, so a leaked key from one client's workspace cannot touch a different client's calendar. Use a separate key per workspace.

POSTONUS_API_URL points the CLI at a different deployment, which is what you want when testing against a local dashboard rather than production.

The limits are the same ones

Nothing about the CLI raises or lowers what your plan allows. post hits the same monthly per-platform quota the composer does, and media upload hits the same storage allowance, because both checks live inside the services rather than in each surface. Hitting one gives you a message naming the limit and your plan.

That also means a free workspace can use the CLI to write and stage dated drafts, but not to create a live schedule — publishing needs a subscription regardless of which surface asks.

Honest positioning

Postiz also ships a CLI on npm, so this is not a category of one. What we would compare on is the surface area: connecting channels, uploading media, moving queued items, and computing posting windows are all first-class commands here rather than things you drop to raw HTTP for.

Found this useful? Pass it on.

Questions

Frequently asked questions Everything the first evaluation usually needs.

How do I install it?

npm install -g @postonus/cli, then postonus login. The package is published on npm as "@postonus/cli"; the command it installs is postonus.

Does posting from the CLI publish immediately?

No. postonus post always schedules — it never publishes on the spot. Use --optimal to let it pick the next recommended window, or --at with a timestamp to choose one.

Can I use it on a remote server with no browser?

Yes, and that is what the login flow is designed for. It prints a URL and a code; open them on any device, approve, and the terminal picks up the session.

How do I use it in CI?

Create an API key in the dashboard and set it as POSTONUS_API_KEY. It takes precedence over a stored session, so no interactive login is needed. Keys are scoped to one workspace.

Is scripting it supported, or a side effect?

Supported. Every command takes --json, stdout carries only data, and with no TTY the CLI never prompts — pass --no-input to make a missing flag an error rather than a wait.

What can I check before committing to a post?

Add --dry-run and the CLI reports what would happen without scheduling anything.

Keep reading

Install the CLI

On npm. Available on every plan.