How to install Claude Code CLI on Mac
Claude Code installs on a Mac with one command. There are three official ways to run it, and they differ mostly in how updates arrive, so it pays to pick one and stay with it. This guide covers each method, the first sign-in, the errors that show up on macOS and what to do once the first session works.
Before you start
- macOS 13.0 or later, on Apple Silicon or Intel, with at least 4 GB of RAM and an internet connection.
- A Claude account that includes Claude Code: Pro, Max, Team, Enterprise or a Console account. The free claude.ai plan does not include it.
- The Terminal app. Press Cmd+Space, type Terminal and press Return. The commands below assume zsh, the default shell on a Mac.
- Node.js is not required unless you choose the npm method.
Two commands tell you what you have: the macOS version, and the chip, where arm64 means Apple Silicon and x86_64 means Intel.
sw_vers -productVersion # 13.0 or higher
uname -m # arm64 or x86_64
Option 1: the native installer (recommended)
This is the method Anthropic recommends. Paste one line into Terminal:
curl -fsSL https://claude.ai/install.sh | bash
The command shows no progress while it downloads, so give it a moment. When it finishes, open a new Terminal window and check the result:
claude --version
# prints something like: 2.1.211 (Claude Code)
What it does: it puts the launcher at ~/.local/bin/claude, a symlink into ~/.local/share/claude/versions/. No Node.js and no Homebrew involved.
Updates are automatic: Claude Code checks on startup and while it runs, downloads in the background, and the new version takes effect the next time you start it.
To follow the stable channel, which is typically about a week behind and skips releases with major regressions, or to install one exact version, pass it to the script:
curl -fsSL https://claude.ai/install.sh | bash -s stable
curl -fsSL https://claude.ai/install.sh | bash -s 2.1.89
Option 2: Homebrew
If you already manage your tools with brew, Claude Code is a cask. There are two, and you install one of them:
# stable channel, about a week behind
brew install --cask claude-code
# or: every release as soon as it ships
brew install --cask claude-code@latest
What is different: a Homebrew install does not update itself. Upgrade the cask you installed when you want the new version:
brew upgrade claude-code # or claude-code@latest
brew cleanup # removes the old versions
Homebrew keeps earlier versions on disk after an upgrade, which is what brew cleanup reclaims.
To have Claude Code run that upgrade for you in the background, set CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE=1 in your environment. If Homebrew answers Cask 'claude-code' is unavailable, your local index is stale: run brew update and install again.
Option 3: npm
npm install -g @anthropic-ai/claude-code
The npm package needs Node.js 22 or later. It installs the same native binary as the other two methods, so claude does not run on Node once it is installed. Two rules from the docs: never use sudo npm install -g, and upgrade with the explicit tag rather than npm update -g:
npm install -g @anthropic-ai/claude-code@latest
Which method to pick
| Method | Updates | Pick it when |
|---|---|---|
| Native installer | Automatic, in the background. | You want the default and no upkeep. Choose this one if you are unsure. |
| Homebrew | Manual with brew upgrade, or opt in to automatic. | Everything else on your Mac comes from brew and you want upgrades on your schedule. |
| npm | Automatic when npm's global folder is writable; otherwise by hand with the @latest tag. | Your team's setup script already installs its CLIs through Node. |
Install it once. Two copies on the PATH lead to version mismatches: you update one and keep running the other.
First run and sign-in
Go to a project folder and start it:
cd ~/code/shop
claude
Claude Code opens the browser to sign you in with your Claude account. If the browser does not open, press c to copy the login URL and paste it into a browser yourself. From then on, claude in any folder starts a session there.
- Health check.
claude doctorprints read-only diagnostics about the install and your settings, without starting a session. - Where it keeps things. Settings and session history live in
~/.claude, with a~/.claude.jsonfile next to it. - An API key in your shell. If
ANTHROPIC_API_KEYis set, Claude Code asks whether to use it, and approving skips the login. Decline if you meant to use your subscription.
Fix the errors people hit on a Mac
zsh: command not found: claude
The native installer puts claude in ~/.local/bin and does not edit your PATH. When that folder is missing from it, the installer says so (Native installation exists but ~/.local/bin is not in your PATH) and the shell cannot find the command. Check both, then add the folder:
ls -la ~/.local/bin/claude # is the launcher there?
echo $PATH | tr ':' '\n' | grep -Fx "$HOME/.local/bin"
# no output means the folder is not on the PATH
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
If you switched your shell to Bash, write the same line to ~/.bash_profile instead: Terminal starts Bash as a login shell, which does not read ~/.bashrc.
The version does not change after an update
You probably have two installs, and the shell runs the older one. List every claude on the PATH, then check where each could come from:
which -a claude
ls -la ~/.local/bin/claude # native installer
brew list --cask | grep claude-code # Homebrew
npm -g ls @anthropic-ai/claude-code # npm
Keep one and remove the others with the uninstall commands below.
dyld: Symbol not found or Abort trap: 6
The binary does not support your macOS version. Claude Code needs macOS 13.0 or later, and Homebrew and npm download the same binary, so switching method does not help. Update macOS.
npm permission errors
Do not reach for sudo. The fix in the docs is to switch to the native installer, which writes only inside your home folder.
Update and uninstall
| Method | Update | Uninstall |
|---|---|---|
| Native installer | Automatic. claude update applies one right now. | rm -f ~/.local/bin/claude and rm -rf ~/.local/share/claude |
| Homebrew | brew upgrade claude-code | brew uninstall --cask claude-code |
| npm | npm install -g @anthropic-ai/claude-code@latest | npm uninstall -g @anthropic-ai/claude-code |
Uninstalling leaves your settings and session history in place. Deleting ~/.claude and ~/.claude.json removes them for good, including allowed tools and MCP server configuration, so only do it if you mean to start from zero.
After the install: when one session becomes several
One claude in one terminal is where everyone starts. What limits you after that is not the install, it is the terminal. With three sessions open you cannot see which one is waiting for an answer, all of them close with the window, and two that edit the same checkout overwrite each other. The manual answers are tabs, tmux and git worktrees, and how to run multiple Claude Code sessions at once on a Mac walks through each.
Our recommendation for that stage is Hypervibe, and since we make it, read this as the maker's view. It is a native Mac app that runs the claude you just installed, from your PATH and under your own login, as a real terminal on a visual board. Whichever of the three methods you chose, there is nothing more to configure.
- You see who needs you. Every console shows as working, resting or needing you, driven by Claude Code's own hooks.
- Sessions come back. Quit with five consoles open; on reopen each one relaunches in place and offers Claude Code's native resume.
- Other agents sit next to it. Codex CLI and Gemini CLI get consoles on the same board, and a task can be handed from one to another. The side-by-side guide sets up all three.
- A second account stays separate. A work login and a personal login run as two profiles of the same CLI.
Where it does not fit: Hypervibe needs macOS 14 or later on Apple Silicon, which is narrower than Claude Code itself, and it is a paid app at USD 19 a month or 190 a year. If you run one session at a time, the terminal you already have is the right tool.
Questions people ask
Is there a DMG or a download page for the Claude Code CLI?
No. The CLI installs from Terminal with one of the three commands above. The Mac download Anthropic offers is the Claude Desktop app, which lets you use Claude Code without the terminal.
Does Claude Code run on an Intel Mac?
Yes. The requirement is macOS 13.0 or later with 4 GB of RAM or more, on either an Intel or an Apple Silicon processor.
Do I need Node.js?
Only for the npm method, which needs Node.js 22 or later. The native installer and Homebrew install a standalone binary.
Is Claude Code free?
Installing it costs nothing, but using it needs an account that includes Claude Code: Pro, Max, Team, Enterprise or Console. The free claude.ai plan does not.
How do I check which version is installed?
Run claude --version. For more detail, including the result of the last update attempt, run claude doctor.
Can I run more than one Claude Code at a time?
Yes. One install is enough: every claude you start is its own session. The parallel sessions guide covers how to keep several from colliding.
Put that install to work on a board
Hypervibe runs your Claude Code sessions as real terminals on one canvas, with status per console, resume on reopen and room for Codex and Gemini CLI next to them.
MACOS 14 OR LATER · APPLE SILICON · USD 19 / MONTH OR 190 / YEAR