Frequently Asked Questions
General Questions
What is Ralph?
Ralph is a CLI tool that orchestrates AI coding agents to work through Product Requirements Documents (PRDs) autonomously. It manages long-running development sessions with automatic retries, progress tracking, and GitHub integration.
Think of Ralph as a supervisor for your AI coding agent. Instead of manually prompting the agent repeatedly, Ralph automates the entire workflow: feeding tasks, monitoring progress, handling failures, and tracking what’s been completed.
Which AI agents does Ralph support?
Ralph supports three AI coding agents:
- Cursor CLI — The most commonly used option, requires Cursor Pro subscription
- Claude Code — Anthropic’s Claude Code CLI
- Codex — OpenAI’s Codex CLI
You can switch between agents per-project or globally via configuration.
Is Ralph free?
Yes, Ralph itself is free and open source under the MIT license. You can:
- Use it for personal or commercial projects
- Modify the source code
- Contribute improvements
However, you need a subscription to the AI agent you choose:
- Cursor Pro for Cursor CLI
- Claude API access for Claude Code
- OpenAI API access for Codex
Does Ralph work offline?
No, Ralph requires internet access because:
- AI agents connect to their respective APIs (Anthropic, OpenAI, etc.)
- GitHub integration requires network access
- Package managers need to download dependencies
However, Ralph itself doesn’t require internet beyond what the AI agent needs.
What programming languages does Ralph support?
Ralph is language-agnostic. It works with any programming language or framework because it orchestrates the AI agent, which handles the actual coding.
Successfully used with:
- JavaScript/TypeScript (Node.js, React, Next.js)
- Python (Django, Flask, FastAPI)
- Go
- Rust
- Ruby (Rails)
- PHP (Laravel)
- Java/Kotlin
- And more
How is Ralph different from using an AI agent directly?
| Using Agent Directly | Using Ralph |
|---|---|
| Manual prompting for each task | Automatic task orchestration |
| No progress tracking | Persistent progress across sessions |
| Manual retry on failures | Automatic retries with context |
| Lose context between sessions | Session memory and learning |
| Manual GitHub operations | Automated PR creation |
| No structured workflow | PRD-driven systematic approach |
Ralph adds structure, automation, and reliability to AI-assisted development.
Installation & Setup
How do I install Ralph?
The easiest way is the automated install script:
curl -fsSL https://raw.githubusercontent.com/nitodeco/ralph/main/scripts/install.sh | bashThis automatically:
- Detects your OS and architecture
- Downloads the appropriate binary
- Installs to
~/.local/bin - Adds to your PATH if needed
See Installation Guide for manual installation and troubleshooting.
What are the system requirements?
Required:
- macOS, Linux, or Windows (via WSL)
- One of the supported AI agents (Cursor CLI, Claude Code, or Codex)
- Git for version control
Optional:
- GitHub account (for PR creation and integration)
- Bun or Node.js 18+ (only if building from source)
How do I update Ralph?
ralph updateThis checks for the latest version and installs it automatically.
Or manually re-run the install script:
curl -fsSL https://raw.githubusercontent.com/nitodeco/ralph/main/scripts/install.sh | bashCan I install Ralph without the install script?
Yes, download the binary directly from the releases page:
# macOS (Apple Silicon)
curl -L https://github.com/nitodeco/ralph/releases/latest/download/ralph-macos-arm64 -o ralph
# macOS (Intel)
curl -L https://github.com/nitodeco/ralph/releases/latest/download/ralph-macos-x64 -o ralph
# Linux
curl -L https://github.com/nitodeco/ralph/releases/latest/download/ralph-linux-x64 -o ralph
chmod +x ralph
mv ralph ~/.local/bin/Where does Ralph store data?
Ralph stores all data in ~/.ralph/:
~/.ralph/
├── config.json # Global configuration
├── registry.json # Project registry
├── usage-statistics.json # Usage stats
└── projects/ # Per-project data
└── <project-name>/
├── config.json # Project config
├── prd.json # PRD file
├── session.json # Session state
├── guardrails.json # Guardrails
├── instructions.md # Custom instructions
└── logs/ # Iteration logsHow do I uninstall Ralph?
Remove the binary:
rm ~/.local/bin/ralphOptionally remove all data:
rm -rf ~/.ralphUsage & Workflow
How do I start a new project?
Navigate to your project directory and run:
ralph initRalph will:
- Ask you to describe what you want to build
- Generate a PRD with 5-15 tasks
- Let you choose your AI agent (Cursor, Claude, or Codex)
- Save everything to
~/.ralph/projects/<project>/
How do I run Ralph?
Start a session with:
ralph runThis runs 10 iterations by default. For more iterations:
ralph run 20 # Run 20 iterations
ralph run 50 # Run 50 iterationsFor long-running sessions, use background mode:
ralph run -b # Run in backgroundHow do I stop Ralph?
If running in foreground:
# Press Ctrl+C
^CIf running in background:
ralph stopRalph stops gracefully after completing the current iteration.
How do I check progress?
Multiple commands show different aspects of progress:
ralph status # Overall session status
ralph progress # Progress notes
ralph task list # Task completion
ralph task current # Next task to work onExample output:
$ ralph status
Session Status:
State: Running
Iteration: 5 / 10
Started: 15 minutes ago
Current Task:
[4] Implement user signup endpoint
Recent Progress:
✓ Set up Express server (3 minutes)
✓ Configure PostgreSQL (4 minutes)
✓ Create user schema (5 minutes)Can I run Ralph in the background?
Yes, use the -b or --background flag:
ralph run -bRalph detaches from the terminal and continues running. Monitor with:
ralph status # Check status
ralph progress # View progress
ralph task list # See completed tasksView logs:
tail -f ~/.ralph/projects/<project>/logs/latest.logCan I pause and resume a session?
Yes, Ralph maintains session state:
Pause:
ralph stop
# or press Ctrl+CResume:
ralph resumeRalph picks up exactly where it left off, including:
- Current task
- Iteration count
- Progress notes
- Error history
How long does a session take?
It depends on:
- Number of tasks in your PRD
- Complexity of each task
- Configured timeouts
- Number of iterations
Typical sessions:
- Simple CRUD API (8 tasks): 1-2 hours
- Full-stack feature (15 tasks): 3-5 hours
- Complex refactor (20+ tasks): 6-12 hours
You can run overnight sessions with:
ralph run 100 -bWhat if I need to make manual changes during a session?
You can:
Stop the session:
ralph stopMake your changes manually
Mark tasks as done if needed:
ralph task done 5 ralph progress add "Completed manually"Resume:
ralph resume
Ralph continues with the next pending task.
Can I run multiple projects simultaneously?
Yes, Ralph supports multiple projects:
cd project-a
ralph run -b
cd ../project-b
ralph run -bEach project maintains independent:
- PRD and tasks
- Session state
- Configuration
- Progress tracking
View all projects:
ralph projectsTasks & PRDs
What is a PRD?
A Product Requirements Document (PRD) is a structured list of tasks that defines what you want to build. Ralph uses the PRD to guide the AI agent through your project systematically.
Example PRD:
1. Set up Express server with TypeScript
2. Configure PostgreSQL database
3. Create user authentication schema
4. Implement signup endpoint
5. Implement login endpoint
6. Add JWT token generation
7. Create authentication middleware
8. Protect API routesCan I edit the PRD manually?
Yes, but use Ralph commands when possible:
ralph task add --title "New task"
ralph task edit 5 --title "Updated title"
ralph task remove 3
ralph task done 4
ralph task undone 5The PRD file is stored at ~/.ralph/projects/<project>/prd.json if you need to edit it directly.
How do I add more tasks?
Several ways:
During initialization:
ralph init # Generates tasks based on your descriptionAdd individual tasks:
ralph task add --title "Add rate limiting"Add with details:
ralph task add \
--title "Add rate limiting" \
--description "Protect API from abuse" \
--steps "Install express-rate-limit" \
--steps "Configure limits"What makes a good task?
Good tasks are:
Specific:
Bad: Add authentication
Good: Implement JWT-based authentication with signup and login endpointsAppropriately scoped:
Too large: Build entire authentication system
Too small: Import bcrypt library
Just right: Implement user signup endpoint with validation and password hashingSelf-contained:
Bad: Create API endpoint (will add validation later)
Good: Create API endpoint with input validation and error handlingAction-oriented:
Create user database schema
Implement password reset flow
Add rate limiting to API endpoints
Refactor database queries to use transactionsSee Core Concepts: PRDs for detailed guidelines.
Can Ralph break down large tasks automatically?
Yes, Ralph supports automatic task decomposition. If the AI agent detects a task is too complex, it can:
- Output a
DECOMPOSE_TASKmarker - Provide a list of subtasks
- Ralph replaces the original task with subtasks
- Continues with the first subtask
Example:
Original:
[ ] 5. Build authentication system
Decomposed:
[ ] 5.1. Create user schema
[ ] 5.2. Implement signup endpoint
[ ] 5.3. Implement login endpoint
[ ] 5.4. Add JWT generation
[ ] 5.5. Create auth middlewareHow do I reorder tasks?
Tasks are processed in order. To reorder:
Mark completed tasks as undone:
ralph task undone 5 ralph task undone 6Complete tasks in desired order:
ralph task done 6 ralph task done 5
Or edit the PRD file directly to reorder tasks.
What if a task is no longer needed?
Remove it:
ralph task remove 5
ralph progress add "Removed task 5 - no longer needed"Or mark it done to skip it:
ralph task done 5
ralph progress add "Skipped - requirement changed"Configuration & Customization
Where is configuration stored?
Ralph uses a layered configuration system:
- Global:
~/.ralph/config.json(defaults for all projects) - Per-project:
~/.ralph/projects/<project>/config.json(overrides global)
Project settings override global settings.
How do I change the AI agent?
Interactive setup:
ralph setupEdit global config:
echo '{"agent": "claude"}' > ~/.ralph/config.jsonEdit project config:
echo '{"agent": "claude"}' > ~/.ralph/projects/<project>/config.jsonSupported agents: cursor, claude, codex
How do I increase timeouts?
Edit your config file:
{
"agentTimeoutMs": 3600000,
"stuckThresholdMs": 600000
}Common timeout values:
1800000(30 min) — Default3600000(1 hour) — Complex tasks5400000(90 min) — Large refactors7200000(2 hours) — Migrations
See Configuration Guide for all options.
Can I customize agent instructions?
Yes, create ~/.ralph/projects/<project>/instructions.md:
# Project Instructions
## Technology Stack
- TypeScript with strict mode
- Bun as runtime
- Prisma for database
## Code Standards
- Use functional programming
- Write descriptive variable names
- Add JSDoc for public APIs
## Project Structure
- API routes in src/routes/
- Business logic in src/services/
- Database models in src/models/Ralph includes these instructions in every agent prompt.
How do I configure notifications?
Edit your config:
{
"notifications": {
"systemNotification": true,
"webhookUrl": "https://hooks.slack.com/services/...",
"markerFilePath": ".ralph/complete.marker"
}
}Options:
- systemNotification: OS notification on completion
- webhookUrl: POST to webhook (Slack, Discord, etc.)
- markerFilePath: Create file when done
Can I have different settings per project?
Yes, project config overrides global config:
Global (default for all projects):
cat > ~/.ralph/config.json << EOF
{
"agent": "cursor",
"agentTimeoutMs": 1800000
}
EOFProject-specific:
cat > ~/.ralph/projects/my-project/config.json << EOF
{
"agent": "claude",
"agentTimeoutMs": 3600000
}
EOFThis project uses Claude with 1-hour timeout, while others use global settings.
GitHub Integration
Do I need GitHub to use Ralph?
No, GitHub integration is completely optional. Ralph works perfectly for local development without any GitHub connection.
Use GitHub integration if you want:
- Automatic PR creation
- Branch management
- Commit pushing to remote
How do I connect GitHub?
Authenticate with OAuth device flow:
ralph auth loginFollow the prompts:
- Ralph displays a code and URL
- Open the URL in your browser
- Enter the code
- Authorize the Ralph application
- Return to terminal
Verify authentication:
ralph authSee GitHub Integration Guide for details.
Can Ralph create pull requests automatically?
Yes, after authenticating:
ralph auth loginRalph can create PRs from completed work. Configure PR creation in your workflow or use commands:
# After completing tasks
ralph github create-pr --title "Feature: User Authentication" --body "Implemented signup and login"What GitHub permissions does Ralph need?
Ralph requests:
- repo — Read/write access to repositories (create branches, push commits, create PRs)
- read:user — Read your user profile
These are the minimum permissions needed for full functionality.
Can I use a personal access token instead of OAuth?
Yes, if you prefer:
- Create a token at GitHub Settings > Tokens
- Grant
reposcope - Set the token:
ralph github set-token ghp_xxxxxxxxxxxxxOAuth is recommended for better security and automatic token refresh.
How do I disconnect GitHub?
ralph auth logoutThis clears stored credentials. You can reconnect anytime with ralph auth login.
Troubleshooting & Common Issues
Ralph keeps retrying the same task
Causes:
- Task is too complex
- Task description is unclear
- Agent lacks necessary context
- Technical blocker (missing dependency, etc.)
Solutions:
Break the task down:
ralph task remove 5 ralph task add --title "Subtask 1: Setup" ralph task add --title "Subtask 2: Implementation"Add more context via guardrails:
ralph guardrails add "For authentication, use the pattern from src/auth/example.ts"Check logs for specific errors:
tail -f ~/.ralph/projects/<project>/logs/latest.logComplete manually:
# Do the work yourself ralph task done 5 ralph progress add "Completed manually - agent struggled with X"
Agent times out frequently
Causes:
- Tasks are too complex
- Default timeout (30 min) is too short
- System is slow or under load
Solutions:
Increase timeout:
{ "agentTimeoutMs": 3600000 }Break tasks into smaller pieces:
ralph task edit 5 --title "Smaller, more focused task"Check system resources:
top free -h
Agent appears stuck (no output)
Causes:
- Agent is processing large files
- Network issues
- Agent crashed but process didn’t exit
Solutions:
Reduce stuck threshold:
{ "stuckThresholdMs": 180000 }Check agent process:
ps aux | grep cursorKill if hung:
kill -9 <pid> ralph run # Ralph will retry
Where are the logs?
Logs are stored in:
~/.ralph/projects/<project>/logs/
├── latest.log # Current session
├── 2024-01-20.log # Daily logs
└── ...View logs:
# Latest log
tail -f ~/.ralph/projects/<project>/logs/latest.log
# Search for errors
grep -i error ~/.ralph/projects/<project>/logs/*.log
# View specific date
cat ~/.ralph/projects/<project>/logs/2024-01-20.logSee Troubleshooting Guide for more solutions.
How do I debug issues?
Check logs:
tail -f ~/.ralph/projects/<project>/logs/latest.logCheck session status:
ralph statusReview failure patterns:
ralph analyze patternsCheck configuration:
ralph configVerify agent is accessible:
which cursor # or claude, codex
What if I encounter a bug?
Check existing issues: Ralph GitHub Issues
Open a new issue with:
- Ralph version:
ralph --version - Agent being used: From
ralph config - Operating system:
uname -a - Error message: Full error text
- Steps to reproduce
- Relevant log excerpts
- Ralph version:
Include logs:
cat ~/.ralph/projects/<project>/logs/latest.log
Advanced Usage
Can I use Ralph with CI/CD?
Yes, Ralph can run in CI/CD pipelines:
# GitHub Actions example
- name: Run Ralph
run: |
ralph run 20 --json > results.json
- name: Check completion
run: |
DONE=$(cat results.json | jq '.done')
TOTAL=$(cat results.json | jq '.total')
if [ "$DONE" -ne "$TOTAL" ]; then
exit 1
fiConfigure for CI/CD:
{
"agentTimeoutMs": 600000,
"maxRetries": 2,
"notifications": {
"systemNotification": false,
"markerFilePath": "/tmp/ralph-complete"
}
}Can I run Ralph on a remote server?
Yes, Ralph works on any Linux server:
# SSH into server
ssh user@server
# Install Ralph
curl -fsSL https://raw.githubusercontent.com/nitodeco/ralph/main/scripts/install.sh | bash
# Run in background
ralph run -b
# Disconnect (Ralph keeps running)
exit
# Later, check progress
ssh user@server
ralph statusCan I script Ralph operations?
Yes, use --json flag for programmatic access:
#!/bin/bash
# Start session
ralph run 10 -b
# Wait for completion
while true; do
STATUS=$(ralph status --json | jq -r '.state')
if [ "$STATUS" = "complete" ]; then
break
fi
sleep 60
done
# Get results
ralph task list --json > results.json
ralph progress --json > progress.json
# Send notification
curl -X POST https://hooks.slack.com/... \
-d "{\"text\": \"Ralph session complete!\"}"How do I backup my Ralph data?
Backup the entire Ralph directory:
# Backup
tar -czf ralph-backup.tar.gz ~/.ralph
# Restore
tar -xzf ralph-backup.tar.gz -C ~/Or backup specific project:
# Backup project
tar -czf project-backup.tar.gz ~/.ralph/projects/my-project
# Restore project
tar -xzf project-backup.tar.gz -C ~/.ralph/projects/Can I use Ralph with Docker?
Yes, create a Dockerfile:
FROM oven/bun:latest
# Install Ralph
RUN curl -fsSL https://raw.githubusercontent.com/nitodeco/ralph/main/scripts/install.sh | bash
# Install your AI agent
RUN curl -fsSL https://cursor.sh/install | bash
# Set working directory
WORKDIR /app
# Copy project
COPY . .
# Run Ralph
CMD ["ralph", "run"]Build and run:
docker build -t my-ralph-project .
docker run -v ~/.ralph:/root/.ralph my-ralph-projectContributing
How do I contribute to Ralph?
Fork the repository: github.com/nitodeco/ralph
Set up development environment:
git clone https://github.com/your-username/ralph.git cd ralph bun installMake changes and test:
bun run dev bun testSubmit a pull request
See Contributing Guide for detailed instructions.
How do I report bugs?
Open an issue on GitHub with:
- Ralph version:
ralph --version - Agent being used: From
ralph config - Operating system:
uname -a - Steps to reproduce: What you did before the error
- Expected behavior: What should have happened
- Actual behavior: What actually happened
- Error message: Full error text
- Logs: Relevant log excerpts
Can I request features?
Yes! Open a feature request on GitHub Issues with:
- Clear description of the feature
- Use case (why you need it)
- Proposed implementation (if you have ideas)
Getting Help
Where can I get help?
- Documentation: docs.ralph.dev
- FAQ: This page
- GitHub Issues: github.com/nitodeco/ralph/issues
- Troubleshooting Guide: /docs/troubleshooting/common-issues/
How do I stay updated?
- Watch the repository: github.com/nitodeco/ralph
- Check releases: github.com/nitodeco/ralph/releases
- Follow changelog: /changelog
Is there a community?
- GitHub Discussions: Ask questions and share experiences
- GitHub Issues: Report bugs and request features
- Discord: (Link if available)
More Questions?
If your question isn’t answered here:
- Search the docs: /docs/
- Check troubleshooting: /docs/troubleshooting/common-issues/
- Search GitHub Issues: github.com/nitodeco/ralph/issues
- Ask a question: Open a new issue or discussion