Prerequisites for Claude Code
Quick answer. Using Claude Code for real work needs a developer environment: a terminal, Homebrew, the Xcode Command Line Tools, git, a code editor, and a paid Claude plan. The best way to get all of it is the free app Set Up Your Mac for Claude Code, which inspects your Mac and installs whatever's missing. ✓ Every command verified on macOS 26.5, 2026-06-26, arm64.
This page covers what Claude Code needs on a Mac, the developer environment for the claude command-line coding tool. For the install itself once your Mac is ready, see Install Claude Code on Mac. For the graphical Claude Desktop app, see Claude Code vs Claude Desktop.
What you need
- macOS 13 or newer, on Apple Silicon or Intel — Claude Code's supported floor.
- A terminal — where you run
claude. Terminal.app ships with every Mac; Warp is an optional AI-assisted alternative. - Homebrew — the macOS package manager. Installing it also installs the Xcode Command Line Tools, so this one step covers both.
- The Xcode Command Line Tools — compilers, headers, and git; installed for you when you install Homebrew.
- git — Claude Code uses it directly to stage changes, write commits, and open pull requests; the Command Line Tools include it.
- A code editor — to read and edit the code Claude Code writes. Zed (Claude Code runs in Zed through Zed's Agent Client Protocol) or VS Code.
- A paid Claude plan — Pro, Max, Team, or Enterprise (or an Anthropic Console/API account). The free Claude.ai plan does not include Claude Code.
Manual setup
If you'd rather set it up by hand, this is the same set of steps the app runs for you.
Install Homebrew with the official one-liner. Copy the current command from brew.sh — it looks like this:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
The script asks for confirmation and your Mac login password, and installs the Xcode Command Line Tools (which include git) if they're missing. On Apple Silicon it then prints two shellenv lines to add Homebrew to your PATH — run them.
Then install Claude Code with the Homebrew cask:
brew install --cask claude-code@latest
Then verify it runs, in a fresh terminal window:
claude --version
A version string appears. If you get zsh: command not found: claude, your PATH needs a fix — see command not found: claude.
This page is high-risk
Installing Homebrew uses sudo and edits your shell's PATH configuration. If you'd rather not run those steps by hand, the free app Set Up Your Mac for Claude Code installs Homebrew, the Xcode Command Line Tools, git, a code editor, and Claude Code for you, then verifies the result.
Download the app "Set Up Your Mac for Claude Code"
Sources
- Homebrew — https://brew.sh
- Claude Code setup — https://code.claude.com/docs/en/setup
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 |
|---|---|---|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | skipped | |
brew install --cask claude-code@latest | pass | |
claude --version | pass | 2.1.193 |
Verification run 20260626T224852Z.