A cross-platform GUI application for setting up and running AI-assisted coding tasks using OpenCode CLI.
"Me fail English? That's unpossible!" - Ralph Wiggum
- Cross-Platform Support: Works on Windows, macOS, and Linux
- Dark Mode Interface: Easy on the eyes with Ralph Wiggum branding
- Model + Variant Selection: Choose OpenCode models and variants
- Task Management: Track multiple concurrent running tasks
- Loop Controls: Pause, resume, or stop running tasks
- Automatic Backup: Backs up existing files before each run
- Completion Viewer: GUI viewer shows results when tasks complete
- opencode.json Editor: Edit permission presets inside the app
- Voice Feedback: Text-to-speech completion notifications (Windows, macOS, Linux)
- Python 3.9 or higher
- OpenCode CLI installed and configured
- tkinter (usually included with Python)
# Clone the repository
git clone https://github.com/JohnConnorNPC/ralph-codes-4-opencode.git
cd ralph-codes-4-opencode
# Install dependencies
pip install -r requirements.txt
# Or install as a package
pip install -e .# Ubuntu/Debian
sudo apt-get install python3-tk
# Fedora
sudo dnf install python3-tkinter
# Arch
sudo pacman -S tk# Run directly
python ralph_gui.py
# Or use the convenience launcher
run_ralph.cmd # Windows
./run_ralph.sh # Linux/macOS
# Or if installed as package
ralph
- Select Target Folder: Choose a project folder where Ralph will work
- Choose Model + Variant: Select an AI model and optional variant from the dropdown
- Configure opencode.json: Optionally edit/copy the OpenCode config for the run
- Enter Design: Start from the preloaded
RALPH-DESIGN.mdtemplate and fill in your task - Run Ralph: Click "Run Ralph" to start the AI coding task
- Ralph writes
RALPH-DESIGN.mdand copiesRALPH-SPECS.md(and optionalopencode.json) to the target folder - Launches OpenCode CLI using the instructions in
RALPH-PROMPT.md - OpenCode updates
RALPH-PLAN.mdandRALPH-PROGRESS.mdeach iteration - Each iteration ends with
RALPH-CHECKPOINT.mduntil completion - Completion creates
RALPH-COMPLETE.md; blocked runs createRALPH-BLOCKED.md - The viewer opens to show results and plays a Ralph quote
| File | Purpose |
|---|---|
RALPH-DESIGN.md |
Your task/design instructions |
RALPH-PLAN.md |
Checklist for each iteration |
RALPH-PROGRESS.md |
Append-only progress log |
RALPH-CHECKPOINT.md |
Signals one iteration done |
RALPH-COMPLETE.md |
Signals all requirements done |
RALPH-BLOCKED.md |
Signals blocked state |
RALPH-PROMPT.md |
Prompt template for OpenCode |
RALPH-SPECS.md |
Lookup table of patterns |
run_ralph.cmd / run_ralph.sh |
Platform GUI launchers |
opencode.json |
Optional OpenCode config copied to target |
Recent folders and models are saved automatically to:
recent_folders.jsonrecent_models.jsonrecent_variant.json
Ralph GIF URLs and quotes live in ralph_content.json and are cached in gif_cache/.
Logs are written to ralph.log.
├── ralph_gui.py # Main GUI application (includes integrated viewer and TTS)
├── run_ralph.cmd # Windows GUI launcher
├── run_ralph.sh # Linux/macOS GUI launcher
├── opencode.json # Optional OpenCode config template
├── ralph_content.json # Ralph GIF URLs and quotes
├── RALPH-*.md # Prompt templates and scaffolds
├── requirements.txt # Python dependencies
├── pyproject.toml # Package configuration
├── gif_cache/ # Cached GIFs (created at runtime)
└── backup/ # Automatic backups (created at runtime)
pip install -e ".[dev]"MIT License
- Built for use with OpenCode CLI
- Inspired by The Ralph Wiggum Loop from 1st principles — Geoffrey Huntley (creator of Ralph)