---
title: "Social Media CLI for AI Agents"
description: "Post, schedule and read results on 30+ social networks from Claude Code, Codex, OpenClaw or any agent that runs commands. Every command returns JSON."
canonical_url: "https://postqueen.ai/cli"
markdown_url: "https://postqueen.ai/cli.md"
last_updated: "2026-09-25"
llms_txt: "https://postqueen.ai/llms.txt"
---

# Social media, one command away.

AI agents CLI

With the PostQueen CLI, OpenClaw, Claude Code, Codex, Grok Build and any agent that runs commands can post, upload and check results on 30+ networks. Everything comes back as JSON, ready for the next step.

`npm install -g postqueen`

Then sign in with postqueen auth:login and approve it in your browser.

[Start 7-day trial for $0](https://app.postqueen.ai/auth?utm_source=postqueen.ai&utm_medium=landing&utm_campaign=trial&utm_content=cli-hero) $0 due today. Cancel in one click. [See the commands](https://postqueen.ai/cli#commands)

Runs wherever your agent runs

- OpenClaw
- Claude Code
- Codex
- Cursor
- Gemini CLI
- Grok Build

Get started

## Three commands to your first post.

### Install

One global package. The optional skill teaches your agent every command.

```
npm install -g postqueen

# Optional: the agent skill
npx skills add \
  GkhanKINAY/postqueen-agent
```

### Sign in

Your browser opens PostQueen, a workspace admin approves, and the login stays on your machine. On a server with no browser, use the API key from Connections instead.

```
postqueen auth:login

# Check it works
postqueen integrations:list
```

### Post

Pick the accounts and a time. Repeat `-c` for a thread.

```
postqueen posts:create \
  -c "Hello from the PostQueen CLI" \
  -s "2026-10-01T09:00:00Z" \
  -i "your-integration-id"
```

Commands

## Every command your agent needs.

Each one prints a short line, then JSON your agent can read and act on.

### Posts

7

**posts:create**

Create a post, a thread or a draft

**posts:list**

List posts between two dates

**posts:status \<id>**

Switch a post between draft and scheduled

**posts:settings \<id>**

Change network settings before it goes out

**posts:delete \<id>**

Delete a post

**posts:missing \<id>**

Find what was published, if a network did not say

**posts:connect \<id>**

Link a post to what was published, for analytics

### Channels

4

**integrations:list**

List the accounts you connected

**integrations:groups**

List client groups

**integrations:settings \<id>**

See what a network accepts

**integrations:trigger \<id> \<method>**

Fetch flairs, boards or playlists

### Media

1

**upload \<file>**

Upload an image, a video or a document

### Analytics

2

**analytics:platform \<id>**

Results for an account, add -d for days

**analytics:post \<id>**

Results for one post

Tip

### Start with drafts

Add `-t draft` and the post waits on your calendar until you give it the go.

```
postqueen posts:create -t draft \
  -c "Our spring menu is here" \
  -s "2026-10-01T09:00:00Z" \
  -i "ig_4d0"
```

[Every flag, in the docs](https://docs.postqueen.ai/cli/command-reference)

Built for agents

## Your agent reads it. Your agent runs it.

### Made to be read by agents

Results come back as JSON, so your agent can take the next step without guessing.

### Threads and per-network text

Repeat `-c` for a thread. Pass a JSON file to give each network its own text.

### Media from your disk

The `upload` command sends images, videos and documents: PNG, JPG, MP4, MOV, PDF and more.

### Drafts or scheduled

Add `-t draft` and a post waits on your calendar. When you are ready, `posts:status` flips it to scheduled.

### Each network’s settings

The `integrations:settings` command shows what a network accepts, and `integrations:trigger` fetches the values it needs.

### Results in the loop

The `analytics:platform` and `analytics:post` commands tell your agent what worked, so the next post is better.

Other ways in

## Not a terminal person? There are more doors.

- [MCP Server One link for any agent that speaks MCP. `api.postqueen.ai/mcp/YOUR_API_KEY` Use the MCP server](https://postqueen.ai/mcp)
- [Public API REST endpoints to build posting into your own product. `api.postqueen.ai/public/v1` API docs](https://docs.postqueen.ai/public-api/introduction)
- [Node SDK Typed calls for your Node app or script. `npm i @postqueen/node` SDK docs](https://docs.postqueen.ai/public-api/sdk)
- [n8n node Add PostQueen to your n8n workflows. `n8n-nodes-postqueen` n8n guide](https://docs.postqueen.ai/public-api/n8n)

Make and Zapier SOON

### Posting by hand is over.

Put posting in your agent’s hands and get your time back.

[Start 7-day trial for $0](https://app.postqueen.ai/auth?utm_source=postqueen.ai&utm_medium=landing&utm_campaign=trial&utm_content=band-cli) $0 due today. Cancel in one click.

## CLI questions, answered.

Anything else? Write to [support@postqueen.ai](mailto:support@postqueen.ai) and a person answers.

### CLI or MCP?

Use the CLI when your agent runs commands in a terminal. Use MCP when your agent supports it and you want it to find the tools on its own. Both are in every plan.

### Where does my API key go?

Nowhere, if you sign in with postqueen auth:login: the CLI keeps its own login on your machine, and you can revoke it in Connections, then Approved Apps. On a machine with no browser, the key goes in an environment variable, POSTQUEEN_API_KEY. Either way it never passes through your chat app, and a workspace admin can rotate the key any time in Connections, then API Keys.

### Does my computer need to stay on for posts to go out?

No. The CLI puts the post on your PostQueen calendar, and PostQueen publishes it at its time from our servers.

### Does it cost extra?

No. The CLI is in every plan and posts are unlimited. After the 7-day trial, Pro is $49 a month, or $33 a month billed yearly.

### What does the CLI leave to the app?

Connecting new accounts, notifications and video generation live in the app and the Public API. The CLI covers posting, channels, media and analytics.
