@autoblogwriter/cli
v0.1.3
Published
Postiz-style agent CLI for AutoBlogWriter
Readme
AutoBlogWriter CLI
Postiz-style automation CLI for AutoBlogWriter.
Agent Skill
If you're using agent workflows, see SKILL.md for the optimized command contract and usage guidance.
Install the hosted skill:
npx skills add auto-blog-writer-app/autoblogwriter-skillExample prompt:
/skill generate 5 blogs using these keywords: saas onboarding, activation metrics, product adoption, churn reduction, user retentionInstall
npm i -g @autoblogwriter/cliAuthentication
The CLI uses API keys. Resolution order:
AUTOBLOGWRITER_API_KEYenvironment variable- Stored key in OS keychain (via
set-keyorlogin)
API URL resolution order:
--api-urlflag (when supported)AUTOBLOGWRITER_API_URL- Stored profile value (
~/.autoblogwriter/config.json) - Default:
https://api.autoblogwriter.app
Commands
Output format:
- JSON is enabled by default for all commands
- Use
--no-jsonfor human-readable text output
status
Show authentication status and API URL.
autoblogwriter status
autoblogwriter status --no-jsonset-key
Store an API key in keychain.
autoblogwriter set-key --key ba_pk_xxx
autoblogwriter set-key --key ba_pk_xxx --api-url http://localhost:7777
autoblogwriter set-key --key ba_pk_xxx --no-jsonlogin
Browser-based login flow. Opens UI approval page, waits for callback, exchanges code, and stores key.
autoblogwriter login
autoblogwriter login --workspace my-workspace
autoblogwriter login --workspace my-workspace --api-url http://localhost:7777
autoblogwriter login --scopes workspace:read,ideas:write,posts:write,posts:schedule,posts:publish,integrations:readlogout
Remove stored API key from keychain.
autoblogwriter logout
autoblogwriter logout --no-jsonworkspaces:list
List accessible workspaces for current key.
autoblogwriter workspaces:list
autoblogwriter workspaces:list --no-jsonworkspaces:get <workspace>
Get one workspace by slug or ID.
autoblogwriter workspaces:get my-workspace
autoblogwriter workspaces:get 65f... --no-jsonintegrations:list
List workspace integrations details.
autoblogwriter integrations:list --workspace my-workspace
autoblogwriter integrations:list --workspace my-workspace --no-jsonintegrations:status
Get high-level integration status.
autoblogwriter integrations:status --workspace my-workspace
autoblogwriter integrations:status --workspace my-workspace --no-jsonideas:generate
Generate ideas from a JSON payload.
autoblogwriter ideas:generate --workspace my-workspace --json-file payload.json
autoblogwriter ideas:generate --workspace my-workspace --json-file payload.json --no-jsonExample payload:
{
"targetKeywords": ["saas onboarding", "activation"],
"contentStyle": "Educational",
"difficulty": "MEDIUM",
"count": 3
}ideas:list
List current idea items.
autoblogwriter ideas:list --workspace my-workspace
autoblogwriter ideas:list --workspace my-workspace --no-jsonideas:use-bulk
Convert idea IDs into draft posts.
autoblogwriter ideas:use-bulk --workspace my-workspace --idea-ids id1,id2,id3
autoblogwriter ideas:use-bulk --workspace my-workspace --idea-ids id1,id2,id3 --no-jsonposts:list
List posts.
autoblogwriter posts:list --workspace my-workspace
autoblogwriter posts:list --workspace my-workspace --page 1 --limit 50 --status DRAFT --no-jsonposts:schedule-bulk
Schedule multiple posts via JSON payload.
autoblogwriter posts:schedule-bulk --workspace my-workspace --json-file schedule.json
autoblogwriter posts:schedule-bulk --workspace my-workspace --json-file schedule.json --no-jsonExample payload:
{
"postIds": ["id1", "id2"],
"strategy": "fixed_time",
"timezone": "America/New_York",
"startAt": "2026-03-01T09:00",
"fixedTimeOfDay": "09:00",
"skipWeekends": true
}posts:publish-bulk
Publish multiple posts, optional integration flags via JSON payload.
autoblogwriter posts:publish-bulk --workspace my-workspace --post-ids id1,id2
autoblogwriter posts:publish-bulk --workspace my-workspace --post-ids id1,id2 --json-file publish.json --no-jsonExample payload (publish.json):
{
"publishNow": true,
"wordpress": { "enabled": true, "postStatus": "publish" },
"shopify": { "enabled": false, "postStatus": "draft" }
}posts:create
Generate a post JSON payload (content + SEO + metadata), optionally save it as a draft and queue image generation.
# Generate only (not saved)
autoblogwriter posts:create --workspace my-workspace --inline '{\"keywords\":[\"saas onboarding\"]}'
# Generate + save draft
autoblogwriter posts:create --workspace my-workspace --inline '{\"keywords\":[\"saas onboarding\"]}' --save-draft
# Generate + save + queue hero image (counts image limit)
autoblogwriter posts:create --workspace my-workspace --inline '{\"keywords\":[\"saas onboarding\"]}' --save-draft --image --image-style PHOTOruns:validate
Validate a workflow spec.
Inputs:
--file <path>accepts.json,.yaml,.yml--inline <spec>accepts inline JSON or YAML- exactly one of
--fileor--inline
autoblogwriter runs:validate --file workflow.json
autoblogwriter runs:validate --inline '{"version":"1",...}'
autoblogwriter runs:validate --file workflow.json --var WORKSPACE=my-workspace --no-jsonruns:start
Execute a full workflow (idea -> draft -> schedule -> publish).
Options:
--file <path>or--inline <spec>--resume <runId>--force-resume--var key=value(repeatable)
autoblogwriter runs:start --file workflow.json
autoblogwriter runs:start --inline '{"version":"1",...}' --no-json
autoblogwriter runs:start --resume run_123runs:status <runId>
Show persisted run status.
autoblogwriter runs:status run_123
autoblogwriter runs:status run_123 --no-jsonruns:logs <runId>
Show run event logs (line-delimited JSON).
autoblogwriter runs:logs run_123
autoblogwriter runs:logs run_123 --no-jsonruns:list
List run states in .autoblogwriter/runs.
autoblogwriter runs:list
autoblogwriter runs:list --no-jsonJSON Output Contract
By default, commands return a JSON envelope:
{
"ok": true,
"command": "ideas:generate",
"data": {},
"meta": {},
"error": null
}Exit Codes
0success2partial success10auth/config error11validation/spec error12API/network failure13rate/plan limit
Workflow Example (JSON)
{
"version": "1",
"workspace": "my-workspace",
"inputs": {
"keywords": ["saas onboarding"],
"contentStyle": "Educational",
"count": 2
},
"schedule": {
"strategy": "fixed_time",
"startAt": "2026-03-01T09:00",
"timezone": "America/New_York",
"fixedTimeOfDay": "09:00",
"skipWeekends": true
},
"publish": {
"mode": "scheduled"
},
"execution": {
"continueOnError": false,
"retry": { "maxAttempts": 2, "backoffMs": 1000 },
"concurrency": 1
},
"flow": ["idea", "draft", "schedule", "publish"],
"outputs": {
"summaryFile": ".autoblogwriter/runs/latest-summary.json"
}
}