RolitRolit Docs
Rolit CLI

Automation and exit codes

Use rolit in scripts and CI with JSON output, environment variables, and exit codes.

JSON output

Add --json (or set ROLIT_JSON=1) to get machine-readable output. Job commands write exactly one rolit.job.v1 envelope to stdout. Estimates and progress go to stderr, so you can pipe stdout safely.

rolit research trend "AI video" --json > result.json

JSON and non-terminal sessions never approve actions automatically. See Approval modes.

Environment variables

VariableEquivalent
ROLIT_JSON--json
ROLIT_PROJECT--project
ROLIT_WORKSPACE--workspace
ROLIT_APPROVAL_MODE--approval-mode
ROLIT_TODOrolit chat --todo
ROLIT_NO_UPDATE_CHECKSet to 1 to turn off update checks

Exit codes

CodeMeaning
0Success
1General or protocol failure
10Login required
13Server denied the request
20A local approval or policy prevented execution
21A publish, send, or spend action is pending review (rolit approvals)
22A job stopped before a credit-consuming step because it would exceed its credit cap
29Rate limited
30An SEO job's --fail-on threshold matched. The report is still printed.
31.rolit/seo.json is invalid or required SEO configuration is missing
33A site crawl was rate-limited and the result is partial

Example: a CI check

rolit seo audit dist/ --fail-on fail
echo $?
30

Exit code 30 means the audit found issues at or above the threshold, so the CI step fails.

Limit credit spend

Pass --max-credits to a job to stop it before it exceeds a cap. It exits with 22 when the cap would be exceeded.

Scheduling in CI

rolit schedule create --runner ci writes a GitHub Actions workflow for you to review. It uses --json and an explicit --budget and holds no secrets.

On this page