Claude Code Setup on macOS: Step-by-Step Tutorial
Complete guide to installing and configuring Claude Code on macOS. Covers native installer, Homebrew, shell setup, and authentication.
macOS Requirements
Before installing Claude Code on your Mac, ensure you have:
- macOS 13.0 (Ventura) or later
- 4 GB RAM minimum (8 GB+ recommended)
- Bash or Zsh shell (Zsh is default on modern macOS)
- Active internet connection
Method 1: Native Installer (Recommended)
The fastest and recommended way to install Claude Code:
curl -fsSL https://claude.ai/install.sh | bash
This installs the Claude Code binary to ~/.local/bin/claude and sets up automatic background updates.
Verify Installation
claude --version
claude doctor
If claude is not found, ensure ~/.local/bin is in your PATH:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
Method 2: Homebrew
For developers who prefer managing packages with Homebrew:
brew install --cask claude-code
Keeping Homebrew Up to Date
Homebrew installations don’t auto-update, so run periodically:
brew upgrade claude-code
Method 3: Stable Channel
If you prefer stability over bleeding-edge features, install the stable release channel:
curl -fsSL https://claude.ai/install.sh | bash -s stable
The stable channel uses versions that are typically about one week old, skipping releases with major regressions.
Authentication on macOS
After installation, launch Claude Code:
claude
You’ll be prompted to authenticate. The easiest options:
Claude Pro/Max (Recommended)
- Go to claude.ai/pricing
- Subscribe to Pro ($20/mo) or Max ($100-200/mo)
- Log in when prompted in Claude Code
Anthropic Console
- Visit console.anthropic.com
- Create an account and add billing
- Complete the OAuth process in Claude Code
Shell Configuration Tips
Zsh (Default macOS Shell)
Add useful aliases to ~/.zshrc:
# Claude Code aliases
alias cc='claude'
alias ccc='claude --continue'
alias ccr='claude --resume'
iTerm2 Integration
Claude Code works great in iTerm2. For the best experience:
- Use a dark theme (the terminal output is optimized for dark backgrounds)
- Use a Nerd Font or JetBrains Mono for proper icon rendering
- Enable “Unlimited Scrollback” in iTerm2 preferences
Project Setup
Navigate to your project and initialize:
cd ~/Projects/my-app
claude
CLAUDE.md Configuration
Create a CLAUDE.md file in your project root to give Claude Code persistent context:
# Project: My App
## Tech Stack
- React 19 + TypeScript
- Node.js 22 backend
- PostgreSQL database
## Conventions
- Use functional components
- Prefer named exports
- Write tests for all new features
Claude Code reads this file automatically on every session.
Updating & Uninstalling
Update
Native install updates automatically. Manual update:
claude update
Uninstall
Native:
rm -f ~/.local/bin/claude
rm -rf ~/.local/share/claude
Homebrew:
brew uninstall --cask claude-code
Clean up settings (optional):
rm -rf ~/.claude ~/.claude.json
Next Steps
- Claude Code for Beginners — Your first AI coding session
- Tips and Tricks — Power user techniques
- Terminal Commands Cheat Sheet — Quick reference
- Visit Claude.ai to manage your subscription