Postonus
CLI

Commands

Every command the CLI supports, grouped by what it acts on.

Last updated on

Global flags, valid on every command:

  • --json: machine-readable JSON output on stdout
  • -y, --yes: grant consent for destructive actions without an interactive prompt
  • -d, --debug: print verbose HTTP diagnostics and request IDs to stderr
  • -t, --token <token>: API token or key; takes precedence over stored login
  • --non-interactive: never prompt; fail instead of waiting for input (alias: --no-input)
  • -q, --quiet: suppress progress output on stderr
  • --no-color: disable coloured output
  • -w, --workspace <id>: workspace to act in (overrides local link and environment)

See Scripting for what each one does.

Times are RFC 3339 with an offset: 2026-08-01T09:30:00Z or 2026-08-01T11:30:00+02:00. A time with no offset is refused before anything is sent.

Workspaces & Linking

postonus workspaces list                           # alias: ls, workspace ls
postonus link [-w, --workspace <id>]                # link current directory to a workspace (.postonus/config.json)
postonus unlink                                     # remove directory link

Linking a directory means you don't need to pass -w, --workspace <id> on every command inside that folder or repository.

Auth

postonus login              # sign in via your browser
postonus logout              # remove the stored credentials
postonus whoami               # show the signed-in account

Channels

postonus channels list                              # alias: ls
postonus channels connect [-p, --platform <name>]    # prompts for a platform when omitted
                           [--no-wait]                # return immediately instead of waiting for approval

channels list shows each channel's handle, so two accounts on one platform are easy to tell apart. Pass a channel id to queue schedule --channels to pick one.

Two platforms — Bluesky and Telegram — connect with a credential instead of OAuth, so channels connect points you at the dashboard for those instead of opening a browser hop.

Post

postonus post [text]
  -t, --to <platforms>       comma-separated platforms, e.g. x,linkedin
  -c, --channel <id>         a channel id; repeatable. Use instead of --to to pick one of two accounts
  --channels <ids>           channel ids, comma-separated or repeatable
  -a, --at <time>            RFC 3339 time with an offset
  -o, --optimal              the next recommended window
  --now                      publish as soon as the queue picks it up
  -d, --draft                save as a draft without scheduling
  -f, --file <path>          read content from a file
  --thread-file <path>       read a thread: segments separated by a line of ---
  -e, --editor               compose in $EDITOR
  -m, --media <path...>      attach local image or video files
  --copy <channelId=text>    text that replaces the body on one channel; repeatable
  --subreddit <name>         target subreddit for Reddit posts, e.g. programming or r/programming
  --x-link-handling <mode>   how a link in an X post is sent: first_reply (default), plain_text or keep_live
  --dry-run                  run every server check and print the result without saving

text also accepts piped stdin: cat draft.md | postonus post --to x --optimal. Content resolves in this order: --thread-file, --file, --editor, the argument, piped input. Exactly one of --at, --optimal, --now or --draft is required. A thread goes out as a reply chain on channels that support threads, and as one joined post elsewhere.

postonus post edit <postId> [text]     # only the flags given change
  -t, --to | -c, --channel | --channels | -a, --at | -f, --file | --thread-file | -m, --media | --copy
  --subreddit | --x-link-handling | --dry-run

postonus post delete <postId>          # alias: rm, del
  --remote                   also delete published copies on their platforms
  -y, --yes                  confirm deletion without an interactive prompt

postonus post retry <scheduleId>       # queue a failed schedule again
  --content <text>           replacement copy for this channel only

A Reddit post needs a subreddit: pass --subreddit, or the post is refused with REDDIT_SUBREDDIT_REQUIRED. On X, a live link costs 13 credits, a link moved to the first reply costs 2, and a plain-text link costs 1. See X credits.

Every write prints the post's resulting state; with --json, the same object the API returns. Deletions prompt for confirmation in interactive terminals; scripts and CI must pass -y, --yes.

postonus best-times -t, --to <platforms>   # required
  -n, --limit <count>        how many times to list, 1-20 (default 5; alias: --count)

Upcoming recommended send times from the server, the same answer --optimal resolves to.

Queue

postonus queue list                          # alias: ls
  -n, --limit <count>       how many to show, 10-100 (default 20)
                            lists drafts, scheduled posts and failures unless --status says otherwise
  -t, --to <platforms>      filter by comma-separated platforms
  -s, --status <statuses>   filter by comma-separated statuses

postonus queue move <scheduleId> -a, --at <time>   # reschedule one queued post

postonus queue schedule <postId>                   # give a draft its send time
  -a, --at <time>           RFC 3339 time with an offset
  -o, --optimal             next recommended window
  --dry-run                 run every server check and print the result without saving
  -c, --channels <ids>      comma-separated channel ids; needed if the draft has none

<scheduleId> comes from queue list. <postId> comes from post --draft or queue list --status draft. Give exactly one of --at or --optimal.

Media

postonus media upload <paths...>

Uploads one or more local image or video files and prints each one's media id and public URL. post --media <path...> uploads the same way before creating the post.

postonus media import <url>

The server fetches a public image or video URL and stores it as post media.

On this page