Brew Install Claude Code
Quick answer. Install the Claude Code CLI with Homebrew:
brew install --cask claude-code@latestThis is the recommended path for developers. Most developers already have Homebrew. However, before you can work on a real project with Claude Code, you'll need to set up a development environment. The easiest way is the free app Set Up Your Mac for Claude Code, which installs Homebrew (if needed), configures your development environment, adds Claude Code for you and verifies it works. ✓ Every command verified on macOS 26.5, 2026-06-26, arm64.
This page covers the Claude Code CLI, the command-line coding tool you run with the claude command. The claude cask (the same name without -code) is the graphical Claude Desktop app; see Claude Code vs Claude Desktop. To install the CLI, the Homebrew cask is claude-code.
This page edits or assumes a developer environment. The Homebrew installation script prompts for a password (it uses sudo for directory creation and permission changes. If you don't have Homebrew yet, set up the environment first — see Prerequisites for Claude Code, or let the app above install Homebrew and Claude Code for you.
Install
brew install --cask claude-code@latest
Homebrew is on version 6.0.0; brew install shows a summary and asks for confirmation before it proceeds.
Release channels
Two casks track two channels:
claude-code— stable, about a week behind the latest release (skips releases with major regressions).claude-code@latest— the newest release.
Install one, not both, or you'll have two copies of Claude Code that conflict on PATH.
Update
Homebrew installs with "do not auto-update." Upgrade manually when you want a new version:
brew upgrade claude-code@latest
You can have Claude Code run the Homebrew upgrade for you. Set CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE=1 in your shell environment. For the full update flow or fixing a version that won't change, see Update Claude Code.
Uninstall
brew uninstall --cask claude-code@latest
To also remove the preferences and support files Claude Code leaves behind, add --zap:
brew uninstall --cask --zap claude-code@latest
Use plain claude-code in these commands if you installed the stable channel instead.
Download the app "Set Up Your Mac for Claude Code"
Sources
- Claude Code setup — https://code.claude.com/docs/en/setup
- Homebrew — https://brew.sh
Command verification
Every command on this page was executed top-to-bottom on a clean macOS 26.5 (arm64) system on 2026-06-26.
| Command | Status | Resolved version |
|---|---|---|
brew install --cask claude-code@latest | pass | |
brew install --cask claude-code@latest | pass | |
brew upgrade claude-code@latest | pass | |
brew uninstall --cask claude-code@latest | pass | |
brew uninstall --cask --zap claude-code@latest | info |
Verification run 20260626T231312Z.