Installation script provides incorrect PATH export command on fresh macOS
Installation script provides incorrect PATH export command on fresh macOS
Summary
The official Claude Code installation script provides a PATH export command that doesn't work on fresh macOS installations, causing the claude command to remain unavailable after following the installation instructions exactly.
Environment
- OS: macOS Sequoia (fresh install)
- Shell: zsh (default)
- Installation method:
curl -fsSL claude.ai/install.sh | bash - Claude Code version: 1.0.84
Problem
After running the official installation command, the script shows this message:
⚠ Setup notes:
• ~/.local/bin is not in your PATH
• Add it by running: export PATH="~/.local/bin:$PATH"
However, following this exact command does not work:
export PATH="~/.local/bin:$PATH"
# claude command still not found
Root Cause
The tilde (~) in the suggested export command is not being expanded properly in this context on fresh macOS installations.
Reproduction Steps
- Start with a fresh macOS installation
- Run:
curl -fsSL claude.ai/install.sh | bash - Follow the provided instructions exactly:
export PATH="~/.local/bin:$PATH" - Try to run:
claude --version - Result:
zsh: command not found: claude
Working Solution
The fix is to use the full path instead of the tilde:
export PATH="/Users/$USER/.local/bin:$PATH"
Or for the .zshrc:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
Suggested Fix
Update the installation script to provide the correct PATH export command. Instead of:
Add it by running: export PATH="~/.local/bin:$PATH"
Use one of these alternatives:
Add it by running: export PATH="$HOME/.local/bin:$PATH"
or
Add it by running: export PATH="/Users/$USER/.local/bin:$PATH"
Impact
- Severity: High - prevents successful installation for new macOS users
- Frequency: Affects all fresh macOS installations following official docs
- User Experience: Frustrating - users think installation failed when it actually succeeded
Additional Context
- The claude binary is correctly installed at
~/.local/bin/claudeas a symlink - The symlink correctly points to
/Users/user/.local/share/claude/versions/1.0.84 - The binary has correct permissions (
-rwxr-xr-x) - Only the PATH configuration instruction is incorrect
This issue would be particularly problematic for new users who might not have the shell/PATH troubleshooting knowledge to resolve it independently.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗