Initial Version

This commit is contained in:
Raza Khan
2026-02-06 14:34:32 -08:00
parent a3af4a8cae
commit f18e45d34d
8 changed files with 418 additions and 13 deletions

View File

@@ -124,6 +124,8 @@ npm install -g @google/gemini-cli@nightly
### Advanced Capabilities
- **Automated Iterative Loops**: Use [Ralph Wiggum mode](./docs/ralph-wiggum.md)
to repeatedly execute prompts until a goal is met (e.g., fixing tests).
- Ground your queries with built-in
[Google Search](https://ai.google.dev/gemini-api/docs/grounding) for real-time
information
@@ -256,6 +258,33 @@ use `--output-format stream-json` to get newline-delimited JSON events:
gemini -p "Run tests and deploy" --output-format stream-json
```
### Ralph Wiggum Mode (Iterative Automation)
Ralph Wiggum mode is an advanced automation feature that allows Gemini CLI to
repeatedly execute a prompt in a loop until a specific goal is achieved. This is
ideal for tasks like fixing failing tests or complex refactoring.
To use Ralph Wiggum mode, provide a prompt and a **completion promise** (a
string to look for in the output). The CLI will:
1. Enter **YOLO mode** to auto-approve all tool calls.
2. Run the prompt and check the response for your completion string.
3. If not found, it repeats the process up to a specified **max iterations**.
4. **Persistent Context**: It uses a **memory file** (`memories.md` by default)
to pass notes between iterations. **Note:** Use a unique `--memory-file` for
different tasks in the same directory to ensure context isolation.
```bash
gemini -p "Fix the failing tests in this repo" \
--ralph-wiggum \
--completion-promise "ALL TESTS PASSED" \
--max-iterations 5 \
--memory-file "task-fix-tests.md"
```
At the end of the run, a summary table displays the result of each iteration and
extracted test statistics.
### Quick Examples
#### Start a new project