Config File Reference
Complete guide to Ralph TUI configuration file structure with annotated examples.
Config File Structure
Ralph TUI uses TOML files for configuration. TOML is a minimal, human-readable format that's easy to edit and version control.
Configuration is validated using Zod schemas at runtime. Invalid configurations will show helpful error messages pointing to the specific problem.
Minimal Configuration
The simplest valid configuration just needs an agent:
This uses Claude Code with all default settings.
Complete Example
Here's a fully annotated configuration file showing all available options:
Common Configurations
Development Setup
For day-to-day development with Claude Code:
PRD-Based Workflow
For working through a prd.json task file:
High-Reliability Setup
For critical tasks where you want maximum retry capability:
Headless/CI Setup
For automated pipelines:
Custom Prompt Template
When you need customized prompts for your workflow:
Alternative AI Provider (CCR)
Use Claude Code Router to route requests through alternative providers like OpenRouter, DeepSeek, Ollama, or Gemini:
This uses the Claude agent plugin (for output parsing, flags, etc.) but executes through CCR which handles provider routing.
Advanced: Plugin Arrays
For complex setups with multiple agents or trackers, you can define arrays:
For most users, the shorthand agent and tracker fields are sufficient. The array syntax is only needed for advanced multi-agent setups.
Merging Behavior
When multiple config files exist, they're merged with these rules:
- Scalar values (strings, numbers, booleans): Project overrides global
- Arrays (
agents,trackers,fallbackAgents): Project completely replaces global - Objects (
errorHandling,agentOptions): Merged, with project values taking precedence
Result: agent = "claude", maxIterations = 5, agentOptions = { model: "...", timeout: 30000 }
Validation Errors
If your configuration has errors, Ralph TUI will show helpful messages:
Next Steps
- Options Reference - Complete list of all options
- CLI Commands - CLI flag documentation
- Prompt Templates - Customize prompts