Posts
ap posts create
Create one or more posts — with media, per-platform overrides, per-account targeting, scheduling, threads, or in bulk from a file.
Basic
Thread
Media + alt text
Schedule
Per-account
Bulk
Dry run
ap posts create --brand my-brand --text "Hello world!" --platforms x,linkedin
Core flags
Flag Description --brand <slug>Brand slug. Falls back to the saved context (ap config set-context); required if neither is set. --text <text>Post text content (required unless --from) --platforms <list>Comma-separated (required unless --from): x,linkedin,instagram,threads,youtube --at <iso>ISO 8601 datetime to schedule at create. A past time is rejected. --thread <text...>Extra posts appended after --text to form a thread (X/Threads, max 25) --from <file>Create posts in bulk from a CSV or JSON file (one post per row) --dry-run / --previewPrint the resolved request body without uploading media or creating the post
Media & per-platform
Flag Description --media <path...>Media files to attach (max 10) --alt-text <text...>Alt text for --media files, aligned by index --platform-media <pairs...>Per-platform media, e.g. instagram=photo.jpg x=banner.png --platform-text <pairs...>Per-platform text, e.g. x=Hello linkedin=World --account <p=handle|id...>Target a specific account per platform — see Per-account targeting
Platform-specific options
--yt-title < t > # Video title
--yt-description < d > # Video description
--yt-tags < lis t > # Comma-separated tags
--yt-privacy < v > # public | unlisted | private
--yt-category < i d > # Category ID
--yt-made-for-kids # Mark as made for kids
Per-account targeting
--account <platform>=<handle|id> selects which connected account to post from when a brand has more than one on a platform. Repeat it per platform.
--account x=@handle — match by handle (case-insensitive, leading @ optional) or platform user ID.
--account linkedin=all (or =*) — fan out to every connected account on that platform. A fan-out over 5 accounts asks for confirmation on an interactive terminal.
On a TTY with 2+ accounts and no --account, the CLI shows an interactive checkbox picker.
Non-interactive (piped/CI) with 2+ accounts and no --account errors out and lists the accounts — pass --account to choose.
Save a default per brand+platform with ap brands set-default-account to skip the picker.
ap posts list
ap posts list [--brand < slu g > ] [--status < statu s > ] [--limit < n > ] [--page < n > ]
Flag Description --brand <slug>Filter by brand slug (defaults to the saved context) --status <status>draft, scheduled, published, or failed--limit <n>Max results per page (default 20) --page <n>Page number (default 1)
ap posts get
ap posts update
ap posts update < post-i d > --text "Updated copy"
ap posts publish
Publish a draft post immediately.
ap posts publish < post-i d >
ap posts schedule
Schedule a post for a specific time, or unschedule it back to draft with --cancel.
ap posts schedule < post-i d > --at "2026-07-01T10:00:00Z"
ap posts schedule < post-i d > --cancel
Flag Description --at <iso>ISO 8601 datetime to schedule (must be in the future) --cancelUnschedule the post (return it to draft). Mutually exclusive with --at.
ap posts retry
Retry a failed post on specific or all platforms.
ap posts retry < post-i d > [--platforms x,linkedin]
ap posts delete
Requires --force to confirm.
ap posts delete < post-i d > --force
ap posts rewrite
AI-rewrite a post for better engagement.
ap posts rewrite < post-i d >
ap posts score
Get an AI score and feedback for a post.
Config
CLI defaults are stored in ~/.config/autoposting/config.json (sibling to credentials, 0600 permissions).
ap config set-context
Set the default brand applied whenever --brand is omitted.
ap config set-context --brand my-brand
ap config get-context
ap config unset-context
Brand resolution: an explicit --brand flag wins, then the saved context, then the command errors. Set a context once to drop --brand from every command.
Brands
ap brands create
ap brands create --name "My Brand" --timezone "America/New_York"
ap brands list
ap brands get
ap brands update
ap brands update < slu g > --name "New Name"
ap brands delete
Brand deletion also removes all associated platform tokens. Posts are not deleted.
ap brands auth-status
Check which platforms are connected for a brand.
ap brands auth-status < slu g >
ap brands set-default-account
Save the default target account(s) for a brand, used when posts create --account is omitted. Local-only (stored in config.json).
ap brands set-default-account my-brand x=@myhandle linkedin=all
ap brands get-default-account
ap brands get-default-account my-brand
ap brands clear-default-account
Remove all saved default accounts for a brand.
ap brands clear-default-account my-brand
Agents
ap agents create
ap agents create --name "Daily News" --type publish --frequency daily --time "09:00"
ap agents list
ap agents get
ap agents update
ap agents update < agent-i d > --name "Weekly Digest"
ap agents run
Trigger an immediate agent run.
ap agents toggle
Enable or disable an agent.
ap agents toggle < agent-i d >
ap agents runs
View run history for an agent.
ap agents runs < agent-i d >
ap agents delete
ap agents delete < agent-i d >
Knowledge Base
ap kb create
ap kb create --name "Product Docs"
ap kb list
ap kb get
ap kb search
Search knowledge base content.
ap kb search < kb-i d > --query "pricing"
ap kb ingest
Ingest a URL into a knowledge base.
ap kb ingest < kb-i d > --url "https://docs.example.com"
ap kb docs
List documents in a knowledge base.
ap kb delete
Ideas
ap ideas generate
AI-generate content ideas from a topic.
ap ideas generate --topic "product launch" --count 10
ap ideas list
ap ideas enrich
Enrich an idea into platform-ready drafts (async — returns a job ID).
ap ideas enrich --title "<title>" --hook "<hook>" --angle "<angle>" --platforms twitter,linkedin [--kb < i d > ]
Flag Description --titleIdea title (required) --hookIdea hook (required) --angleIdea angle (required) --platformsComma-separated, max 5: twitter,linkedin,instagram,youtube,threads (required) --kbKnowledge base ID for extra context (optional)
ap ideas delete
ap ideas delete < idea-i d >
Clips
ap clips upload
Upload a local video file as a clip.
ap clips upload ./video.mp4 [--name "My Clip"]
ap clips import
Import a video from a URL for AI clipping.
ap clips import --url "https://youtube.com/watch?v=..."
ap clips list
ap clips get
ap clips render
Render a clip for publishing.
ap clips render < clip-i d >
ap clips delete
ap clips delete < clip-i d >
Carousels
ap carousels generate
AI-generate a carousel from a topic.
ap carousels generate --topic "5 Growth Tips" --brand my-brand --slides 5
ap carousels create
Create a carousel manually.
ap carousels create --brand my-brand --title "My Carousel"
ap carousels list
ap carousels list [--json]
ap carousels get
ap carousels get < carousel-i d >
ap carousels draft
Convert a carousel into a post draft.
ap carousels draft < carousel-i d >
ap carousels delete
ap carousels delete < carousel-i d >
Webhooks
ap webhooks create
ap webhooks create --url "https://api.example.com/hook" --events "post.published,post.failed"
ap webhooks list
ap webhooks list [--json]
ap webhooks get
ap webhooks get < webhook-i d >
ap webhooks update
ap webhooks update < webhook-i d > --url "https://new-url.com/hook"
ap webhooks test
Send a test event to a webhook endpoint.
ap webhooks test < webhook-i d >
ap webhooks delete
ap webhooks delete < webhook-i d >
Billing & Usage
ap billing status
Show current plan and subscription details.
ap billing credits
Show AI credit balance.
ap usage summary
Show publishing statistics.
Workspaces
ap workspaces list
ap workspaces switch
Switch to a different workspace (session auth only).
ap workspaces switch < workspace-i d >
Auth
ap auth login
Log in via browser device-code flow, or store an API key directly.
ap auth login
ap auth login --api-key sk-social-your-key --profile work
Flag Description --api-key <key>Store a key directly (skips the device-code flow) --profile <name>Profile to save under (default default) --base-url <url>API base URL (overrides AUTOPOSTING_BASE_URL)
ap auth logout
Remove the active profile, or all profiles with --all.
ap auth switch
Switch the active profile.
ap auth whoami / ap auth status
Show the current auth method and identity (status is an alias).
Utility
ap doctor
Health check — verifies CLI version, Node.js, authentication, and API connectivity.
ap whoami
Show the current auth source and workspace.
ap open
Open a resource in your browser.
ap open posts
ap open brands
ap update
Check for CLI updates.
ap completion
Generate shell completions.
ap completion zsh >> ~/.zshrc
ap completion bash >> ~/.bashrc
ap completion fish > ~/.config/fish/completions/ap.fish
ap mcp
Start the built-in MCP server for AI agents.
See MCP Server for full details.
Installation Install and configure the CLI.
MCP Tools Same operations as MCP tool calls for AI agents.
API Reference Underlying REST endpoints.
TypeScript SDK Programmatic API access in Node.js.