Skip to main content
Every command she answers, every flag and every default, on one page. When you are hunting for the exact shape of a call, this is the page to keep open.
Most commands print a one-line human-readable header, then the full JSON result. posts:missing prints JSON with no header, posts:delete prints only a confirmation line, and the auth:* commands print human-readable status text. To pipe into jq, drop the header first:

Global options

Environment variables

Stored OAuth2 credentials in ~/.postqueen/credentials.json take priority over both POSTQUEEN_API_KEY and POSTQUEEN_API_URL; the API URL then comes from the credentials file. If neither credentials nor a key is present, any command that talks to the API exits with code 1 and prints ❌ Error: No authentication found., an Options: header, then two numbered lines naming your options. All four go to stderr, so redirect with 2>&1 if you want them in a log.

Auth

auth:login needs a reachable auth server, and PostQueen does not currently host one at the default cli-auth.postqueen.ai address. Use an API key, or self-host the auth server. Every command works identically either way.

Integrations

integrations:settings is the source of truth for --settings. Read it before you guess at a payload; it tells you the required fields and the character limit for that platform.

Posts

Flags for posts:create

-c and -m pair by index in the order they are passed, so the second -m attaches to the second -c. Omitting a -m in the middle shifts every later media value onto the wrong item; only a trailing -c can safely be left without media. To leave a middle item empty, use --json instead.
-s is --date on posts:create but --status on posts:status. Same letter, different meaning, because they are different commands.

Campaign files with --json

When one piece of content per channel is not enough, drop the flags and describe the whole campaign in a file:
The file is the request body her API receives, so it carries the top-level type, date, shortLink and tags, plus one posts entry per channel with its own integration.id, value array and settings object. You can omit __type in the settings block. The backend fills it in from each post’s integration ID. The full annotated example, including per-provider settings for Reddit, LinkedIn, and YouTube, lives in Managing Posts.

Post lifecycle

Analytics

-d means days here, but minutes on posts:create. Same letter, different unit, because they are different commands.
If analytics:post returns {"missing": true}, the post published but never got a usable platform ID. Run posts:missing then posts:connect to link it, and analytics start flowing. The response shape: Analytics.

Upload

Media must be uploaded to PostQueen first. Raw local filenames and external URLs are rejected by most providers, including TikTok and Instagram. The upload rules: Media Upload.

What each command calls

Every command is a thin wrapper over the Public API. The CLI joins POSTQUEEN_API_URL (default https://api.postqueen.ai) with the paths below, and sends your key in a raw Authorization header with no Bearer prefix.
posts:create is rate limited to 30 requests per hour on PostQueen Cloud. Running her yourself? Raise API_LIMIT.

Scripting and CI

You drop a posts:create into a deploy script, it works from your terminal, and then it fails the moment a machine runs it. Four behaviors account for most of that gap. A header line comes before the JSON. integrations:list opens with 🔌 Connected Integrations: and upload opens with ✅ File uploaded successfully!, so jq chokes on the first token. Strip line one with tail -n +2. Two commands break the pattern: posts:missing prints bare JSON and pipes straight through, and posts:delete prints a confirmation line with no JSON at all. Anything that fails exits 1. Errors go to stderr behind a and results stay on stdout, so a failed command falls out of your pipeline instead of feeding it half a result. set -e catches it. Every message and its cause: Troubleshooting.
auth:status is the exception. It prints ❌ Not authenticated. on stdout and still exits 0, which makes it worthless as a gate. Gate on a command that really calls the API:
Cron does not read your shell profile. The export POSTQUEEN_API_KEY=... sitting in your ~/.zshrc is invisible to a crontab entry, and the job dies on ❌ Error: No authentication found. before it sends anything. That line goes to stderr, so a crontab redirecting only stdout captures nothing and the failure looks silent. Give cron the key in its own environment, and redirect with 2>&1. A script that gates first, then uploads and posts:
The crontab that runs it sets the key itself:

Next steps

Managing Posts

Threads, campaigns, and the full JSON file format

Troubleshooting

Every CLI error message and its fix

Platform Examples

Ready-made commands per network

Public API

Skip the CLI and call the API directly