-
Notifications
You must be signed in to change notification settings - Fork 964
Update ralph.sh to use npx for claude-code #57
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
Use pinned version npx @anthropic-ai/claude-code@2.1.17 instead of global claude command. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Greptile OverviewGreptile SummaryThis PR updates Key Changes:
Benefits:
Note: The Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant ralph.sh
participant npx
participant claude-code
participant CLAUDE.md
User->>ralph.sh: Execute ./ralph.sh --tool claude
ralph.sh->>ralph.sh: Parse arguments (TOOL=claude)
ralph.sh->>ralph.sh: Initialize iteration loop
loop Each iteration (max MAX_ITERATIONS)
ralph.sh->>ralph.sh: Check TOOL == "claude"
ralph.sh->>npx: npx @anthropic-ai/claude-code@2.1.17
Note over npx: Downloads/uses pinned version 2.1.17
npx->>claude-code: Launch claude-code@2.1.17
claude-code->>CLAUDE.md: Read instructions via stdin
CLAUDE.md-->>claude-code: Agent instructions
claude-code->>claude-code: Execute autonomous coding tasks
claude-code-->>ralph.sh: Return OUTPUT with logs
ralph.sh->>ralph.sh: Check for completion signal
alt Tasks complete
ralph.sh->>User: Exit with success
else Tasks incomplete
ralph.sh->>ralph.sh: Continue to next iteration
end
end
ralph.sh->>User: Exit (max iterations or complete)
|
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
| else | ||
| # Claude Code: use --dangerously-skip-permissions for autonomous operation, --print for output | ||
| OUTPUT=$(claude --dangerously-skip-permissions --print < "$SCRIPT_DIR/CLAUDE.md" 2>&1 | tee /dev/stderr) || true | ||
| OUTPUT=$(npx @anthropic-ai/claude-code@2.1.17 --dangerously-skip-permissions --print < "$SCRIPT_DIR/CLAUDE.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.
Check that README.md is updated - it still mentions npm install -g @anthropic-ai/claude-code as a prerequisite (line 15), but global installation is no longer required since this uses npx with a pinned version.
Prompt To Fix With AI
This is a comment left during a code review.
Path: ralph.sh
Line: 95:95
Comment:
Check that `README.md` is updated - it still mentions `npm install -g @anthropic-ai/claude-code` as a prerequisite (line 15), but global installation is no longer required since this uses `npx` with a pinned version.
How can I resolve this? If you propose a fix, please make it concise.
Use pinned version npx @anthropic-ai/claude-code@2.1.17 instead of global claude command. fixes: #56