-
Notifications
You must be signed in to change notification settings - Fork 964
Gemini CLI support #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Greptile OverviewGreptile SummaryAdded Gemini CLI as a third supported AI tool option alongside Amp and Claude Code, following the existing pattern for tool integration. Key Changes:
Note: This PR does not update Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant ralph.sh
participant Gemini CLI
participant FileSystem
User->>ralph.sh: ./ralph.sh --tool gemini [max_iterations]
ralph.sh->>ralph.sh: Parse arguments (TOOL=gemini)
ralph.sh->>ralph.sh: Validate tool choice (amp/claude/gemini)
ralph.sh->>FileSystem: Check for prd.json
ralph.sh->>FileSystem: Initialize/check progress.txt
loop For each iteration (1 to MAX_ITERATIONS)
ralph.sh->>ralph.sh: Start iteration i
alt tool == "amp"
ralph.sh->>FileSystem: Read prompt.md
ralph.sh->>Gemini CLI: amp --dangerously-allow-all
else tool == "gemini"
ralph.sh->>FileSystem: Read GEMINI.md
ralph.sh->>Gemini CLI: gemini --yolo < GEMINI.md
Gemini CLI->>FileSystem: Read prd.json
Gemini CLI->>FileSystem: Read progress.txt
Gemini CLI->>Gemini CLI: Implement user story
Gemini CLI->>Gemini CLI: Run quality checks
Gemini CLI->>FileSystem: Commit changes
Gemini CLI->>FileSystem: Update prd.json (passes=true)
Gemini CLI->>FileSystem: Append to progress.txt
Gemini CLI-->>ralph.sh: OUTPUT (with potential COMPLETE signal)
else tool == "claude"
ralph.sh->>FileSystem: Read CLAUDE.md
ralph.sh->>Gemini CLI: claude --dangerously-skip-permissions --print
end
ralph.sh->>ralph.sh: Check OUTPUT for "<promise>COMPLETE</promise>"
alt All stories complete
ralph.sh->>User: Exit with success (iteration i)
else More stories remaining
ralph.sh->>ralph.sh: Continue to next iteration
end
end
ralph.sh->>User: Exit: Max iterations reached
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 file reviewed, 1 comment
| if [[ "$TOOL" == "amp" ]]; then | ||
| OUTPUT=$(cat "$SCRIPT_DIR/prompt.md" | amp --dangerously-allow-all 2>&1 | tee /dev/stderr) || true | ||
| elif [[ "$TOOL" == "gemini" ]]; then | ||
| OUTPUT=$(gemini --yolo < "$SCRIPT_DIR/GEMINI.md" 2>&1 | tee /dev/stderr) || true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
verify that --yolo is the correct flag for gemini CLI - flag is undocumented and should be confirmed
Prompt To Fix With AI
This is a comment left during a code review.
Path: ralph.sh
Line: 94:94
Comment:
verify that `--yolo` is the correct flag for gemini CLI - flag is undocumented and should be confirmed
How can I resolve this? If you propose a fix, please make it concise.
I tweaked
ralph.sha little bit to add a parallel logic flow to support Gemini CLI. The prompt fileGEMINI.mdis also added (a renamed version ofCLAUDE.md).Usage:
./scripts/ralph/ralph.sh --tool gemini