Ralph Wiggum extension for Gemini CLI implements iterative, self-referential development loops. Named after Ralph Wiggum from The Simpsons, it embodies persistent iteration despite setbacks.
Ralph is a development methodology based on continuous AI agent loops. The technique creates a self-referential feedback loop where Gemini iteratively improves its work until completion.
Install the Ralph extension by running (requires Gemini CLI v0.4.0 or newer):
gemini extensions install https://github.com/AsyncFuncAI/ralph-wiggum-extension --auto-updateThe --auto-update is optional: if specified, it will update to new versions as they are released.
/ralph-loop Build a REST API for todos --completion-promise 'DONE' --max-iterations 20--max-iterations <n>- Stop after N iterations (default: unlimited)--completion-promise '<text>'- Phrase that signals completion (quote multi-word phrases)
/cancel-ralph# Basic loop with iteration limit
/ralph-loop Fix the auth bug --max-iterations 10
# Loop with completion promise
/ralph-loop --completion-promise 'ALL TESTS PASSING' Add unit tests
# Unlimited loop (use with caution)
/ralph-loop Refactor the cache layer/ralph-loopcreates a state file at.gemini/ralph-loop.local.md- Gemini works on the task iteratively
- Each iteration, progress is made and tracked
- Loop ends when:
- Max iterations reached, OR
- Completion promise is genuinely true and output
Monitor progress:
cat .gemini/ralph-loop.local.md- Iteration > Perfection: Don't aim for perfect on first try
- Failures Are Data: Use them to improve
- Persistence Wins: Keep trying until success
- Trust the Process: Don't circumvent with false completion
Apache License 2.0
