Skip to content

CLI

The autoranq CLI is the terminal-native version of the platform. Login once, then every other command just works — no key juggling, no copy-paste, no Postman.

Install

Terminal window
npm install -g @autoranq/cli
autoranq --version

The CLI needs Node 20+ on your machine.

Login

Terminal window
$ autoranq login
Paste your AutoRanq API key (starts with ar_live_ or ar_test_): ar_test_...
Validating key against API…
Authenticated (test mode)
Token saved to ~/.autoranq/config.json

For CI environments without a TTY:

Terminal window
$ autoranq login --with-key ar_live_your_key
Authenticated (live mode)

Commands

autoranq config

Terminal window
autoranq config show # show current config (key is masked)
autoranq config set apiUrl https://api.autoranq.ai/api/public/v1
autoranq config set defaultProject clxprj123def456ghi789
autoranq config use test # switch between live and test mode
autoranq config clear # delete stored credentials

autoranq projects

Terminal window
autoranq projects list
autoranq projects list --json | jq '.[] | .id'

autoranq articles

Terminal window
autoranq articles list
autoranq articles list --project clxprj... --status PUBLISHED --limit 20
autoranq articles get clxart123def456ghi789
autoranq articles get clxart123def456ghi789 --json | jq '.content_html'

autoranq generations

Terminal window
autoranq generations list --status FAILED
autoranq generations get clxgen123def456ghi789
autoranq generations retry clxgen123def456ghi789 --from-step CONTENT

autoranq keywords

Terminal window
autoranq keywords search "best CRM for startups" --location nl-NL
autoranq keywords search "best CRM for startups" --project clxprj... --json

Global flags

FlagEffect
--jsonOutput raw JSON instead of a formatted table. Pipe into jq.
--helpShow help for the current command. Works at every level (autoranq articles get --help).
--versionPrint the CLI version.

Roadmap (v0.2 — Phase 3.5)

  1. OAuth device-flow loginautoranq login opens browser, you confirm, no key paste needed.

  2. autoranq generations tail <id> — SSE-streamed live logs for any generation. Backend SSE endpoint lands here.

  3. autoranq logs tail — global tail across all projects, with --level ERROR --since 1h filters.

  4. autoranq listen --forward-to <url> — local webhook forwarding (the stripe listen pattern). Hits a test webhook subscription endpoint and replays deliveries to your local URL with the correct HMAC signature.

  5. Homebrew tap + curl installerbrew install autoranq/tap/autoranq and curl -fsSL https://docs.autoranq.ai/install.sh | sh.

Troubleshooting

”Not authenticated. Run autoranq login.”

Your config doesn’t have a stored key. Run autoranq login and paste the key from app.autoranq.aiSettings → API.

”API key was rejected (401 Unauthorized).”

The key was revoked or rotated. Run autoranq login again with the new value.

”Insufficient scope (403 Forbidden).”

Your key has only read scope but you tried a write action (e.g. generations retry). Create a read,write key in the dashboard.

”Rate limit exceeded (429).”

Default limit is 1000 requests/hour per key. Wait or request a higher rate-limit. See Authentication → Rate limits.

Next steps

  • Quickstart — same workflow via raw cURL if you skip the CLI
  • MCP — conversational alternative via your AI assistant
  • Webhooks — what autoranq listen will forward in v0.2
  • Authentication — manage API keys, scopes, rotation