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.

Download the app "Set Up Your Mac for Claude Code"

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

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

Command verification

Every command on this page was executed top-to-bottom on a clean macOS 26.5 (arm64) system on 2026-06-26.

CommandStatusResolved version
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"skipped
brew install --cask claude-code@latestpass
claude --versionpass2.1.193

Verification run 20260626T224852Z.