by redwoodjs
Agent-CI is local GitHub Actions for your agents.
# Add to your Claude Code skills
git clone https://github.com/redwoodjs/agent-ciLast scanned: 5/10/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-05-10T06:37:13.557Z",
"semgrepRan": false,
"npmAuditRan": true,
"pipAuditRan": true
}Run GitHub Actions on your machine. Caching in ~0 ms. Pause on failure. Fix and retry — before you commit, before you push.
Agent CI is a ground-up rewrite of the GitHub Actions orchestration layer that runs entirely on your own machine. It doesn't wrap or shim the runner: it replaces the cloud API that the official GitHub Actions Runner talks to, so the same runner binary that executes your jobs on GitHub.com executes them locally, bit-for-bit.
Actions like actions/checkout, actions/setup-node, and actions/cache work out of the box — no patches, no forks, no network calls to GitHub. Dependencies that took a couple of minutes to install on GitHub's runners install in a few seconds on the second run, because the cache is bind-mounted — not uploaded, downloaded, or unpacked.
Remote CI is the final gatekeeper — it runs on every push and decides what ships. That's its job. The problem is what happens when it fails: you push, you wait, you read logs, you push again. Every retry pays the full cost of a fresh run, and the gatekeeper ends up being used as a debugger.
Agent CI is a pre-flight check that runs on your own machine before you commit. Catch the failure in seconds, fix it locally, only push work that's already green — and let remote CI stay the gatekeeper.
Existing "run actions locally" tools either re-implement steps in a compatibility layer or require you to maintain a separate config. Agent CI does neither.
| | GitHub Actions | Other local runners | Agent CI | | -------------------------- | ------------------ | ------------------------ | --------------------------------------- | | Runner binary | Official | Custom re-implementation | | | API layer | GitHub.com | Compatibility shim | | | Cache round-trip | Network (~seconds) | Varies | | | On failure | Start over | Start over | | | Container state on failure | Destroyed | Destroyed | | | Requires a clean commit | Yes | Yes | |
No comments yet. Be the first to share your thoughts!
Agent CI replaces GitHub's cloud cache with local bind-mounts. node_modules, the pnpm store, Playwright browsers, and the runner tool cache all live on your host filesystem and are mounted directly into the container — no upload, no download, no tar/untar. The first run warms the cache; every subsequent run starts with hot dependencies instantly.
Step 6 failed. Fix the file. Retry just that step. Green. No checkout, no reinstall, no waiting.
When a step fails, Agent CI pauses instead of tearing down. The container stays alive with all state intact — environment variables, installed tools, intermediate build artifacts. Your edits on the host are synced into the container, so you (or your AI agent) can fix the issue and retry just the failed step.
Agent CI does not re-implement GitHub Actions. It emulates the server-side API surface — the Twirp endpoints, the Azure Block Blob artifact protocol, the cache REST API — and feeds jobs to the unmodified, official runner. If your workflow runs on GitHub, it runs here.
Docker — a running Docker provider:
Optional — for runs-on: macos-* jobs (Apple Silicon Macs only):
brew install cirruslabs/cli/tartsshpass — brew install hudochenkov/sshpass/sshpassWithout both, macOS jobs are skipped with a reason. See macOS jobs below.
# Run a specific workflow
npx @redwoodjs/agent-ci run --workflow .github/workflows/ci.yml
# Run all relevant workflows for the current branch
npx @redwoodjs/agent-ci run --all
Agent CI runs against your current working tree — uncommitted changes are included automatically. No need to commit or stash before running.
Committing is optional, but it's a useful pattern: commit → run → fail → fix with --pause-on-failure → retry → commit the fix. When you do commit, the commit becomes a save point you can return to if the fix makes things worse. Your AI agent benefits from the same pattern — it can roll back to a known-good state before trying a different fix.
npx @redwoodjs/agent-ci retry --name <runner-name>
agent-ci runRun GitHub Actions workflow jobs locally.
| Flag | Short | Description |
| -------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| --workflow <path> | -w | Path to the workflow file |
| --all | -a | Discover and run all relevant workflows for the current branch |
| --jobs <n> | -j | Max concurrent containers (overrides auto-detection) |
| --pause-on-failure | -p | Pause on step failure for interactive debugging |
| --quiet | -q | Suppress animated rendering (also enabled by AI_AGENT=1) |
| --json | | Emit NDJSON event stream on stdout (also enabled by AGENT_CI_JSON=1); see Agent output mode |
| --no-matrix | | Collapse all matrix combinations into a single job (uses first value of each key) |
| --github-token [<token>] | | GitHub token for fetching remote reusable workflows (auto-resolves via gh auth token if no value given). Also available as AGENT_CI_GITHUB_TOKEN env var |
| --commit-status | | Post a GitHub commit status after the run (requires --github-token) |
agent-ci retryRetry a paused runner after fixing the failure.
| Flag | Short | Description |
| ----------------- | ----- | --------------------------------------------- |
| --name <name> | -n | Name of the paused runner to retry (required) |
| --from-step <N> | | Re-run from step N, skipping earlier steps |
| --from-start | | Re-run all steps from the beginning |
Without --from-step or --from-start, retry re-runs only the failed step (the default).
agent-ci abortAbort a paused runner and tear down its container.
| Flag | Short | Description |
| --------------- | ----- | --------------------------------------------- |
| --name <name> | -n | Name of the paused runner to abort (required) |
Workflow secrets (${{ secrets.FOO }}) are resolved in order:
.env.agent-ci file in the repo root (KEY=VALUE syntax, # comments supported)--github-token — automatically provides secrets.GITHUB_TOKEN# All three approaches work:
# 1. .env.agent-ci file
echo "CLOUDFLARE_API_TOKEN=xxx" >> .env.agent-ci
# 2. Inline env vars
CLOUDFLARE_API_TOKEN=xxx agent-ci run -w .github/workflows/deploy.yml
# 3. --github-token for GITHUB_TOKEN specifically
agent-ci run -w .github/workflows/ci.yml --github-token
Workflow variables (${{ vars.FOO }}) are provided exclusively via the --var CLI flag. There's no file-based lookup and no fallback to shell environment variables — this keeps workflow vars distinct from shell env vars and ensures every value is explicit on the command line.
agent-ci run -w .github/workflows/deploy.yml \
--var DEPLOY_ENV=production \
--var API_URL=https://api.example.com
If a workflow references a var (${{ vars.FOO }}) and no matching --var FOO=... flag is passed, the run fails with a message listing the missing vars.
All configuration is available via environment variables. For persistent machine-local overrides, create a .env.agent-ci file in your project root — Agent CI loads it automatically (KEY=VALUE syntax, # comments supported).
Only AGENT_CI_*-prefixed keys from .env.agent-ci are applied to the CLI process environment (so they influence Docker/network resolution, etc.). Non-prefixed keys in the file are still resolved as workflow secrets via ${{ secrets.FOO }}. Shell env