Skip to Content
REDCELLDocs

Run in scripts and CI

Use redcell exec to run tasks without a session — in scripts, cron jobs, and CI pipelines.

redcell exec runs one task from start to finish, prints the result, and exits. It never stops to ask for approval, so you choose up front what it's allowed to do.

Run a task

redcell exec "Find hardcoded API keys in this repo and list file and line"

redcell e is a shorter alias.

Choose what it can do

Because nobody is there to approve actions, set the sandbox with -s:

ValueRedCell can
read-onlyRead files only
workspace-writeRead and edit files in the working folder, and run commands
danger-full-accessDo anything, including network access. Use only in an isolated container or VM
redcell exec -s workspace-write "Fix the SQL injection in app/db.py"

See Permissions for details.

Pass input in

Pipe text in. It's added to your prompt as context:

cat scan-results.txt | redcell exec "Triage these findings by severity"

Or pass the whole prompt through stdin with -:

redcell exec - < task.md

Get output out

FlagWhat you get
(none)Human-readable progress and the final answer
-o FILEThe final answer written to FILE
--jsonEvery event as JSON Lines on stdout
--output-schema FILEA final answer that matches your JSON Schema
redcell exec -o report.md "Write a findings summary for ./results"

Use in CI

Add an API key as a secret

Create a key on the API keys page. Save it as a secret in your CI, for example REDCELL_API_KEY.

Install and sign in

curl -fsSL https://redcell.sh/install.sh | sh
printenv REDCELL_API_KEY | ~/.local/bin/redcell login --with-api-key

Run your task

~/.local/bin/redcell exec --ephemeral -s read-only -o findings.md "Review this change for security issues"

--ephemeral skips saving the session to disk, which you usually don't need in CI.

Other useful flags

FlagWhat it does
-C DIRRun in another folder
-m MODELUse a specific model
--skip-git-repo-checkAllow running outside a Git repository
--ignore-user-configIgnore ~/.redcell/config.toml (sign-in still works)
--color neverTurn off colors in output

Continue a previous run

redcell exec resume --last "Now write remediation steps for each finding"

Review code changes

redcell review runs a security-minded review of changes in a Git repo:

CommandReviews
redcell review --uncommittedStaged, unstaged, and untracked changes
redcell review --base mainYour branch compared to main
redcell review --commit SHAOne commit

Add your own instructions as a prompt, for example redcell review --base main "Focus on auth and input validation".