Autonomous Claude Code runner for hands-off task execution.
Ralph runs Claude Code in a loop, working through backlog tasks or feature plans until complete, stuck, or max iterations reached.
npm install -g ralph-runRalph checks for updates on startup and notifies you when a new version is available.
In any project where you want to use Ralph:
ralph setupThis creates:
.ralph/backlog.json- Task backlog.ralph/state.json- Runner state.ralph/progress.txt- Progress log
Set NTFY_URL in your environment to receive notifications when Ralph completes, errors, or gets stuck:
export NTFY_URL=https://ntfy.sh/your-topicWork through tasks in .ralph/backlog.json:
ralph backlog # Run loop until complete or max iterations
ralph backlog --once # Single iteration
ralph backlog --resume # Resume from last iteration
ralph backlog --max-iterations 100Run a specific feature plan from .ralph/features/<name>/:
ralph feature <name>
ralph feature <name> --onceFeature directories contain:
plan.md- Feature plan and contexttasks.json- Task breakdownprogress.txt- Progress log
ralph status # Show current state
ralph cancel # Stop running session
ralph help # Show helpralph completions bash >> ~/.bashrc{
"tasks": [
{
"title": "Add user authentication",
"description": "Implement JWT-based auth with refresh tokens",
"acceptance": ["Login endpoint works", "Tokens refresh correctly"],
"branch": "feature/auth",
"passes": false
}
]
}- Ralph spawns Claude Code with
--permission-mode acceptEdits - Claude reads the backlog/feature plan and works on the highest priority task
- Claude runs linting, type checking, and tests
- Claude commits and creates/updates a PR
- If Claude outputs
<promise>COMPLETE</promise>, Ralph exits successfully - If Claude outputs
<promise>I AM STUCK</promise>, Ralph exits with an error - Otherwise, Ralph starts the next iteration
- Bun
- Claude Code CLI
- Graphite CLI (for PR workflows)