Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

fix-claude-path

A one-shot shell script that fixes the command not found: claude error after installing Claude Code on macOS.

The problem

After installing Claude Code, your terminal may not find the claude command because the install directory isn't in your PATH. This happens when your shell config (~/.zshrc or ~/.bashrc) doesn't include the directory where claude was installed.

The fix

curl -fsSL https://raw.githubusercontent.com/rsg9999/fix-claude-path/main/fix-claude-path.sh | sh
source ~/.zshrc  # or source ~/.bashrc if you use bash

Or clone and run locally:

git clone https://github.com/rsg9999/fix-claude-path.git
cd fix-claude-path
sh fix-claude-path.sh
source ~/.zshrc

What it does

  1. Searches common install locations (~/.local/bin, /usr/local/bin, /opt/homebrew/bin) for the claude binary
  2. Detects your shell (zsh or bash)
  3. Appends the correct export PATH=... line to your shell config if it isn't already there
  4. Tells you to source your config to apply the change immediately

Requirements

  • macOS
  • Claude Code already installed (curl -fsSL https://claude.ai/install.sh | sh)
  • zsh or bash

License

MIT

About

Fixes 'command not found: claude' on macOS after installing Claude Code

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages