@content-agent/cli
v0.1.1
Published
CLI for content-agent AI writing service
Maintainers
Readme
@content-agent/cli
CLI for the content-agent AI writing service. Generate production-ready blog posts, articles, landing pages, emails, and captions from the terminal.
Status: v0.1.0 is live on npm (published 2026-05-17).
Installation
npm install -g @content-agent/cli
# Or from a clone of the content-api monorepo:
cd apps/cli && npm install && npm run build && npm linkQuick Start
Get your API key at https://content-api-web.vercel.app/register
Save your key:
content-agent auth set <your-api-key>- Generate your first piece:
content-agent write "Why TypeScript is worth it in 2025"Commands
auth — Manage credentials
auth set <key>
Save API key to ~/.content-agent.json.
content-agent auth set sk-abc123auth whoami
Show the current user and monthly usage.
content-agent auth whoami
# [email protected] (pro)
# Usage: 12 / 100 (88 remaining)auth url <url>
Override the API base URL (useful for self-hosted deployments).
content-agent auth url https://my-instance.example.comwrite <topic> — Generate content
content-agent write <topic> [options]| Option | Default | Description |
|--------|---------|-------------|
| -t, --type <type> | blog | blog · article · landing · marketing · email · caption |
| --tier <tier> | (auto) | basic · upgrade · pro |
| --mode <mode> | (auto) | A (story) · B (principle) · C (analysis) |
| --brief <text> | — | Additional context or brief |
| --voice <id> | — | Voice profile ID |
| --out <file> | stdout | Save output to file |
Examples
# Basic blog post
content-agent write "The future of remote work"
# Pro-tier article saved to file
content-agent write "AI in healthcare" --type article --tier pro --out ai-health.md
# Marketing email in storytelling mode
content-agent write "Launch announcement for v2.0" --type email --mode A
# Landing page with a brief
content-agent write "SaaS analytics tool" --type landing \
--brief "B2B, targets CTOs, price $99/mo"
# Caption for social media
content-agent write "Morning coffee ritual" --type caption --mode Cstatus <job-id> — Check a job
content-agent status <job-id> [--content]| Option | Description |
|--------|-------------|
| --content | Print the content if the job is completed |
content-agent status job_abc123
# Status: completed
# Score: 9/10
# Done: 2025-03-15T10:24:11Z
content-agent status job_abc123 --contentusage — Monthly quota
content-agent usage
# Tier: pro
# Used: 12 / 100
# Remaining: 88
# [████░░░░░░░░░░░░░░░░]Environment Variables
| Variable | Description |
|----------|-------------|
| CONTENT_AGENT_API_KEY | API key (overrides config file) |
| CONTENT_AGENT_API_URL | API base URL (overrides config file) |
CONTENT_AGENT_API_KEY=sk-xxx content-agent write "hello world"Config File
Config is stored at ~/.content-agent.json:
{
"apiKey": "sk-your-key-here",
"apiUrl": "https://content-apiapi-production.up.railway.app"
}You can edit this file directly or use content-agent auth set / content-agent auth url.
Polling & Timeouts
The write command polls until the job completes (up to 120 seconds). If it times out, use content-agent status <job-id> to check manually.
License
MIT
