Open Terminal
Press Cmd + Space, type
Terminaland press Enter. Keep it in your Dock; you'll use it a lot.Install Claude Code
Terminalcurl -fsSL https://claude.ai/install.sh | bashWhen it finishes you'll see Claude Code successfully installed! This version updates itself in the background.
Check Claude Code
Open a new Terminal window (Cmd + N) and run:
Terminalclaude --versionA version number followed by (Claude Code). If you get
command not found: claude, see the troubleshooting page.Check for Git
Terminalgit --versionIf you see a version number, you have Git. If not, install Apple's Command Line Tools, which include it, and follow the window that opens:
Terminalxcode-select --installInstall Homebrew
Homebrew is a free installer for command line tools. It's the official way to get the GitHub CLI on a Mac. Paste the line from brew.sh:
Terminal/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"It explains what it will do and pauses before doing it. When it's done, it prints a "Next steps" section; run the commands listed there, then open a new Terminal window.
Install the GitHub CLI
Terminalbrew install gh gh --versionThe second line prints a version number.
Sign in and make an account
Run
claudeonce to sign in (Claude Code guide), and make a free GitHub account and connect it (Git and GitHub).
Other ways to install Claude Code
With Homebrew in place you can also run brew install --cask claude-code. That version doesn't update itself, so you'd run brew upgrade claude-code from time to time. Prefer not to use the terminal at all? There's a Claude Code desktop app for macOS, linked from the Advanced setup page. The lessons are written for the terminal.
You're set up when
claude --version,git --versionandgh --versioneach print a version number.- Running
claudeopens a session without asking you to log in again.
Sources
Read on October 4, 2026.
- Claude Code, Advanced setup: system requirements, install commands, Homebrew cask and updates, the desktop app.
- Claude Code, Terminal guide for new users: opening Terminal, the success message.
- Git, Install for macOS: Xcode Command Line Tools.
- Homebrew: the install line.
- Installing gh on macOS: Homebrew as the recommended method.