Autonomous AI development loop with intelligent exit detection and rate limiting
Ralph enables continuous autonomous development cycles where Claude Code iteratively improves your project until completion. Named after Ralph Wiggum from Geoffrey Huntley's technique.
Works on Windows, macOS, and Linux - Install once, use everywhere.
git clone https://github.com/SyntaxDiffusion/ralph-claude-code.git
cd ralph-claude-code
install-windows.batThen in any project directory:
ralph --inline-monitorgit clone https://github.com/SyntaxDiffusion/ralph-claude-code.git
cd ralph-claude-code
./install.shThen in any project directory:
ralph --monitor:: Clone the repo
git clone https://github.com/SyntaxDiffusion/ralph-claude-code.git
cd ralph-claude-code
:: Run Windows installer
install-windows.batThe installer will:
- Check for Git Bash, Node.js, and jq
- Install Ralph globally
- Optionally add to your Windows PATH
:: Create a new project
ralph-setup my-project
cd my-project
:: Run with inline monitor (recommended)
ralph --inline-monitor
:: Or just ralph (defaults to inline monitor on Windows)
ralph --monitorInline Monitor shows real-time status in your terminal:
╔══════════════════════════════════════════════════════════════════════════╗
║ 🤖 RALPH - Inline Monitor Mode ║
╚══════════════════════════════════════════════════════════════════════════╝
[14:32:15] Loop #3 │ ⠙ executing │ Calls: 5/100 │ Tasks: 7 │ CB: CLOSED
✅ Loop #3 completed (45s, 3 files changed)
| Command | Description |
|---|---|
ralph.bat |
Run Ralph loop (auto-uses inline monitor) |
ralph-monitor.bat |
Run monitor dashboard |
ralph-setup.bat |
Create new project |
install-windows.bat |
Install Ralph |
# macOS
brew install node jq tmux git
# Ubuntu/Debian
sudo apt-get install nodejs npm jq tmux git
# CentOS/RHEL
sudo yum install nodejs npm jq tmux gitgit clone https://github.com/SyntaxDiffusion/ralph-claude-code.git
cd ralph-claude-code
./install.sh# Create a new project
ralph-setup my-project
cd my-project
# Run with tmux split-pane monitoring
ralph --monitor
# Or run loop and monitor separately
ralph # Terminal 1
ralph-monitor # Terminal 2┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ PROMPT.md │────▶│ Claude Code │────▶│ Your Project │
│ @fix_plan.md │ │ (Autonomous) │ │ (Improved) │
└─────────────────┘ └──────────────────┘ └─────────────────┘
▲ │ │
└────────────────────────┴────────────────────────┘
Loop until complete
- Read - Loads
PROMPT.mdwith your project requirements - Execute - Runs Claude Code with current context
- Track - Updates task lists and logs results
- Evaluate - Checks for completion signals
- Repeat - Continues until project is complete
Ralph automatically stops when:
- All tasks in
@fix_plan.mdmarked complete - Multiple "done" signals from Claude Code
- Too many test-only loops (feature completeness)
- Circuit breaker detects stagnation
my-project/
├── PROMPT.md # Instructions for Ralph
├── @fix_plan.md # Prioritized task list
├── @AGENT.md # Build/run instructions
├── specs/ # Specifications
├── src/ # Source code
├── logs/ # Execution logs
└── docs/generated/ # Auto-generated docs
ralph # Start loop (inline monitor on Windows)
ralph --monitor # Start with monitoring
ralph --inline-monitor # Force inline monitor mode
ralph --status # Show current status
ralph --help # Show all optionsralph --calls 50 # Limit to 50 calls/hour (default: 100)
ralph --timeout 30 # 30-minute timeout (default: 15)
ralph --verbose # Detailed progress output
ralph --prompt FILE # Custom prompt fileralph --circuit-status # Show circuit breaker state
ralph --reset-circuit # Reset circuit breaker
ralph --reset-session # Reset session stateralph-setup my-project # Create new project
ralph-import requirements.md app # Import PRD to project| Option | Default | Description |
|---|---|---|
--calls |
100 | Max API calls per hour |
--timeout |
15 | Execution timeout (minutes) |
--monitor |
off | Enable monitoring |
--inline-monitor |
off | Inline status bar |
--verbose |
off | Detailed progress |
--output-format |
json | Output format (json/text) |
--no-continue |
off | Disable session continuity |
- Core autonomous loop with intelligent exit detection
- Rate limiting (100 calls/hour, configurable)
- Circuit breaker with stagnation detection
- Session continuity across loops
- JSON output format support
- Windows support with batch file launchers
- Inline monitor mode for Windows
- tmux integration for macOS/Linux
- PRD import functionality
- 276 passing tests (100% pass rate)
- CI/CD with GitHub Actions
- Log rotation (prevent disk fill)
- Dry-run mode (preview without execution)
- Configuration file support (.ralphrc)
- Improved error messages
- Documentation site
- Metrics and analytics dashboard
- Desktop notifications (Windows toast, macOS alerts)
- Git backup and rollback system
- Multiple project profiles
- Plugin system for custom analyzers
- Team collaboration features
- Centralized logging
- API for external integrations
- Docker containerization
- Cloud deployment options
"ralph is not recognized"
- Run from the ralph-claude-code directory, or
- Run
install-windows.batand add to PATH
"Git Bash not found"
- Install Git for Windows
"jq not found"
- Run
choco install jqor download from jq releases
"PROMPT.md not found"
- Run from a Ralph project directory
- Create a project:
ralph-setup my-project
Ralph exits immediately
- Reset state:
ralph --reset-circuit - Check
.exit_signalsfile and clear it
Circuit breaker opens
- Check logs:
cat logs/ralph.log - Reset:
ralph --reset-circuit
Contributions welcome! See CONTRIBUTING.md.
# Fork and clone
git clone https://github.com/YOUR_USERNAME/ralph-claude-code.git
cd ralph-claude-code
# Run tests (all 276 must pass)
npm testPriority areas:
- Windows testing - Test on different Windows versions
- Documentation - Tutorials and examples
- Bug reports - Real-world usage feedback
MIT License - see LICENSE
- Ralph technique by Geoffrey Huntley
- Claude Code by Anthropic
Ready to let AI build your project?
ralph-setup my-awesome-project && cd my-awesome-project && ralph --inline-monitor