Skip to content

Conversation

@honcoops
Copy link

@honcoops honcoops commented Jan 9, 2026

The script was failing to detect the Claude CLI on macOS because the installer places it in ~/.claude/local/bin/ which may not be in PATH during script execution (non-interactive shell).

Changes:

  • Check common installation paths: ~/.claude/local/bin (macOS) and ~/.local/bin (Linux)
  • Add found path to PATH for subsequent commands
  • Use $CLAUDE_CMD variable for the login command
  • Display the found path in success message for debugging

Summary by CodeRabbit

  • New Features

    • Enhanced Claude CLI detection now checks multiple system paths for improved cross-platform compatibility.
    • Improved user feedback displaying the location of the resolved Claude CLI.
  • Bug Fixes

    • More reliable login process through proper command path resolution.

✏️ Tip: You can customize this high-level summary in your review settings.

The script was failing to detect the Claude CLI on macOS because
the installer places it in ~/.claude/local/bin/ which may not be
in PATH during script execution (non-interactive shell).

Changes:
- Check common installation paths: ~/.claude/local/bin (macOS)
  and ~/.local/bin (Linux)
- Add found path to PATH for subsequent commands
- Use $CLAUDE_CMD variable for the login command
- Display the found path in success message for debugging
@coderabbitai
Copy link

coderabbitai bot commented Jan 9, 2026

📝 Walkthrough

Walkthrough

The start.sh script is enhanced to intelligently detect the Claude CLI tool across multiple installation paths—standard PATH, macOS local directory, and Linux local directory—storing the resolved path in CLAUDE_CMD and using it throughout the script instead of relying on a hardcoded command name.

Changes

Cohort / File(s) Summary
Claude CLI path resolution
start.sh
Added multi-path detection logic for Claude CLI (PATH lookup, macOS local path, Linux local path); updated user feedback to display resolved path; replaced direct claude command calls with CLAUDE_CMD variable reference

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 Hop, skip, and a CLI bound,
We searched in paths both far and round,
From macOS nooks to Linux ground,
Claude's location safely found! 🔍✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly addresses the main fix: detecting Claude CLI on macOS by checking non-standard installation paths and adding them to PATH.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
start.sh (1)

55-55: Quote the variable for defensive scripting.

While the current paths are unlikely to contain spaces, it's a shell scripting best practice to quote variables during command execution to handle edge cases.

🛡️ Proposed defensive fix
-        $CLAUDE_CMD login
+        "$CLAUDE_CMD" login
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1690a61 and ac9eac8.

📒 Files selected for processing (1)
  • start.sh
🔇 Additional comments (3)
start.sh (3)

11-24: LGTM! Well-structured multi-path detection.

The detection logic correctly prioritizes PATH-available commands before checking platform-specific installation directories. Using command -v and the -x test are appropriate for this use case. The PATH exports on lines 19 and 23 are beneficial for any subprocess invocations that might occur later in the script (e.g., from the Python application).


26-26: LGTM! Appropriate error checking.

The empty string check using -z is correct and consistent with the detection logic above.


36-36: LGTM! Helpful debugging information.

Displaying the discovered path helps users verify which Claude CLI installation is being used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants