How to install Claude Code on macOS. One command, then a new Terminal window
How to install Claude Code on a Mac with the installer, Homebrew or npm, how to check the install, fix command not found, and remove everything cleanly.
Part of the guideClaude Code, the complete guide. From installation to your own skills and plugins
In this article
In short
Claude Code installs on a Mac with one command in Terminal, and the native install keeps itself up to date. We also cover Homebrew and npm, checking the install, the most common PATH error and a full uninstall.
You paste one command into Terminal, the installer sits silent for a while, finishes, and claude still does not work. That is how most first installs of Claude Code on macOS go. The program is already on disk, the Terminal window you have open just does not know about it yet. Below is the whole path from requirements to uninstalling, checked against the Anthropic documentation as of 10 November 2026.
We work in Claude Code on a Mac every day. What the tool itself does is covered in What is Claude Code, and the whole series lives in the Claude Code guide.
Requirements before you install Claude Code on macOS
Claude Code runs on macOS 13.0 and later, on both Apple silicon and Intel Macs. You need at least 4 GB of RAM and a working internet connection. Git is not required, although you will want it for real work.
To log in you need a Claude Pro, Max, Ultra, Team or Enterprise plan, a Claude Console account, or access through your company's cloud provider. The free claude.ai plan does not include Claude Code. If the terminal puts you off, Anthropic also has a desktop app that runs Claude Code without typing commands. This article is about the Terminal version.
Install with one command
Open Terminal and paste the installer command. Anthropic calls this the native install and recommends it.
curl -fsSL https://claude.ai/install.sh | bashThe installer shows no progress bar while it downloads, so a quiet minute is normal. Everything goes into your home folder. The claude command lands at ~/.local/bin/claude as a link to the actual version in ~/.local/share/claude/versions/.
When the installer finishes, close the window and open a new one. Check the install there.
claude --version
claude doctorThe first prints a version number followed by (Claude Code). The second checks the installation and settings files without starting a session, lists warnings and suggests fixes. The binary is signed by Anthropic and notarized by Apple, which you can confirm with codesign --verify --verbose on the binary.
Homebrew and npm as alternatives
If you install your software through Homebrew, one command does it.
brew install --cask claude-codeThere are two casks. claude-code follows the stable channel, usually about a week behind the newest release and skipping releases with major regressions. claude-code@latest gets every release as soon as it ships. Homebrew installs do not update themselves. Run brew upgrade claude-code or brew upgrade claude-code@latest, depending on which cask you chose. Homebrew keeps old versions on disk, so run brew cleanup now and then.
If brew says the claude-code cask does not exist, your local Homebrew index is simply old. Run brew update and install again.
The third route is npm. The package needs Node.js 22 or later and installs the same binary as the installer. Never put sudo in front of it, or Claude Code cannot update itself later.
npm install -g @anthropic-ai/claude-codePick one method. Two installs side by side end with Terminal running a different version than you think. which -a claude lists every copy your system can see.
When Terminal says command not found
zsh: command not found: claude right after installing almost always means ~/.local/bin is not on your PATH. First check that the program is actually there with ls -la ~/.local/bin/claude. If it is, add the folder to your shell config. zsh is the default shell on a Mac.
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrcIf you use bash, put that line in ~/.bash_profile, not ~/.bashrc. Terminal on a Mac starts bash as a login shell, which skips ~/.bashrc. A terminal inside an editor takes its PATH from the editor, so quit and reopen VS Code too.
The documentation lists a few other symptoms that are specific to the Mac.
zsh: permission denied: /Users/…/.zshrcmeans the file belongs to another user, usually root.sudo chown $(whoami) ~/.zshrcfixes it.dyld: Symbol not foundordyld: cannot loadmeans your macOS is too old. Homebrew will not help, because it downloads the same binary. Update to macOS 13.0 or later.- In an SSH session the Keychain can be locked. Claude Code stores your login there, and when the Keychain rejects the write, it falls back to
~/.claude/.credentials.json.claude doctorthen warns that the Keychain is not writable and prints the fix. Once it is writable again,/logoutand/loginmove your login back into the Keychain.
Shortcuts that use the Option key, such as Option+Enter for a new line, need Option set as the Meta key. The easy way is to type /terminal-setup inside a session. In Apple Terminal it turns on Option as Meta and switches off the audible bell.
Updating and uninstalling on a Mac
The native install checks for updates at startup and while running. A new version downloads in the background and takes effect the next time you start Claude Code. To update right away, run claude update. You can choose the slower stable channel in /config or with the autoUpdatesChannel key in your settings file.
Removing a native install takes two commands.
rm -f ~/.local/bin/claude
rm -rf ~/.local/share/claudeFor Homebrew it is brew uninstall --cask claude-code, for npm npm uninstall -g @anthropic-ai/claude-code. Your settings stay in the ~/.claude folder and the ~/.claude.json file. Deleting them removes your settings, saved approvals, MCP server configuration and session history. The VS Code extension and the desktop app also write to ~/.claude, so uninstall them first if you want everything gone.
After installing, go on to first run and login and then to the commands you will use most. Installs on other systems are covered for Windows and Linux.
If claude does not work after installing, start with a fresh Terminal window and claude doctor before searching any further. If you are wondering whether AI makes sense in your business at all, our free AI audit looks at where it can take work off your team.
What would you like to change in your business?
Leave your number. We will talk about your process and see whether we can help. The first call is free.
The service this text is about
Automation and AI / OCRAutomation of document re-typing, OCR and checking rules, and your data stays with you.