Skip to main content

Prerequisites

Install

Both autoposting and ap (short alias) are available after install.

Setup

1

Authenticate

Set your API key via environment variable or browser login:
Add to your shell profile (~/.zshrc, ~/.bashrc) for persistence.
Auth priority:
The CLI talks to https://app.autoposting.ai/api-proxy by default. Override it with the AUTOPOSTING_BASE_URL environment variable (or ap auth login --base-url) for staging or self-hosted backends.
2

Verify

Checks CLI version, Node.js version, authentication, and API connectivity.
Shows which auth method is active and the associated workspace.
3

Shell Completions (optional)

CI/CD Usage

For CI/CD pipelines, use the AUTOPOSTING_API_KEY environment variable with --json and --quiet flags:

Exit Codes

Commands

Full command reference with flags and examples.

MCP Setup

Connect AI assistants to your account.

TypeScript SDK

Programmatic API access in Node.js.

API Reference

Explore the REST API directly.