postpilot-cli
v2.0.0
Published
CLI for PostPilot - AI-powered blog generation and management
Maintainers
Readme
PostPilot CLI
CLI tool for the PostPilot AI-powered blog generation platform. Generate, manage, and publish SEO-optimized blog content directly from your terminal.
Installation
npm install -g postpilot-cliOr run directly with npx:
npx postpilot-cliQuick Start
# Authenticate with your API key
postpilot login <your-api-key>
# Generate a blog post
postpilot blog generate --industry Technology --audience "Software Developers"
# List your posts
postpilot blog listCommands
postpilot login <api-key>
Authenticate with PostPilot. Your API key is saved to ~/.postpilot/config.json.
postpilot blog generate
Generate a new AI-powered blog post.
| Option | Description | Default |
|--------|-------------|---------|
| -i, --industry <industry> | Industry / niche (required) | |
| -a, --audience <audience> | Target audience (required) | |
| -t, --tone <tone> | Content tone: professional, casual, technical | professional |
| -k, --keywords <keywords> | Comma-separated keywords | |
| -p, --prompt <prompt> | Custom prompt for the AI | |
| -w, --word-count <count> | Target word count | 2000 |
| -d, --domain-id <id> | Domain ID to publish to | |
| --publish | Auto-publish after generation | false |
| -c, --country <country> | Target country (e.g. US, UK, global) | global |
| --trends <trends> | Comma-separated trending topics to base the article on | |
| --show-trends | Show available trending topics for the industry/country | false |
Examples:
# Basic generation
postpilot blog generate -i "Digital Marketing" -a "Small Business Owners"
# With trending topics
postpilot blog generate -i Technology -a Developers --trends "AI Agents, WebAssembly, Edge Computing" --country US
# Preview trends first, then generate
postpilot blog generate -i Healthcare -a "Medical Professionals" --show-trends
postpilot blog generate -i Healthcare -a "Medical Professionals" --trends "Telemedicine, AI Diagnostics" --country US
# Generate and publish immediately
postpilot blog generate -i E-commerce -a "Online Retailers" --publish -d <domain-id>postpilot blog list
List your blog posts.
| Option | Description | Default |
|--------|-------------|---------|
| -p, --page <page> | Page number | 1 |
| -l, --limit <limit> | Posts per page | 10 |
| -s, --status <status> | Filter: draft, published, scheduled | all |
postpilot blog publish <id>
Publish a draft blog post by ID.
postpilot trends list
Discover trending topics by industry and country.
| Option | Description | Default |
|--------|-------------|---------|
| -i, --industry <industry> | Industry / niche | General |
| -c, --country <country> | Target country (e.g. US, UK, global) | global |
| --limit <limit> | Number of trends to show | 20 |
Example:
postpilot trends list -i Technology -c USpostpilot domains list
List all your connected domains with their verification status.
postpilot domains add <domain>
Add a new domain (e.g. example.com). Shows DNS setup instructions after adding.
postpilot stats
Show account usage statistics including total posts, published count, average SEO score, and domains.
Configuration
The CLI stores your API key in ~/.postpilot/config.json:
{
"apiKey": "your-api-key",
"apiUrl": "https://postpilot.gg/api/v1"
}Development
git clone <repo-url>
cd postpilot-cli
npm install
npm run build # compile to dist/Running without building (Windows PowerShell)
Use the PowerShell dev script (bypasses npm arg forwarding issues):
.\dev.ps1 trends list --industry Technology --country US
.\dev.ps1 blog generate --industry Technology --audience Developers
.\dev.ps1 login <your-api-key>Or use npx directly:
npx ts-node src/index.ts trends list --industry Technology --country USRunning without building (cmd / Git Bash / Linux)
npm run dev -- trends list --industry Technology --country US
npm run dev -- blog generate --industry Technology --audience DevelopersLicense
MIT
