You want Claude Code on your Mac. You’ve got a terminal open and you’re ready to go — you just need someone to walk you through it without assuming you already know what you’re doing.
That’s exactly what this guide is. By the end, Claude Code will be installed, authenticated, and ready to use.
This is part of our complete Claude Code Beginner’s Guide.
TL;DR
- macOS 13.0 (Ventura) or later is required
- The recommended install is one command in Terminal — no Node.js needed
- You also need a paid Anthropic account (Pro plan at $20/month minimum)
- Installation takes under two minutes
- After install, run
claudein any project folder to start a session
What You Need Before You Start
Before you open Terminal, make sure you have two things sorted.
1. A compatible Mac
Claude Code requires macOS 13.0 (Ventura) or later. To check your version, click the Apple menu in the top-left corner of your screen, then click About This Mac. You’ll see your macOS version right there.
If you’re on macOS 12 or earlier, you’ll need to update before continuing. Go to System Settings → General → Software Update.
Claude Code works on both Apple Silicon Macs (M1, M2, M3, M4 chips) and Intel Macs. You don’t need to do anything different — the installer detects your chip automatically.
2. A paid Anthropic account
The free Claude.ai plan does not include Claude Code. You need at least a Pro plan ($20/month) to authenticate and use it.
If you don’t have one yet, go to claude.ai/upgrade and sign up for Pro before continuing. The installation itself is free — you just won’t be able to log in without a paid account.
For a full breakdown of plans, see Claude Code Pricing — Free vs Pro vs API Explained.
How to Open Terminal on Mac
Terminal is the built-in app on your Mac where you type commands. If you’ve never used it, here’s the fastest way to find it:
Press Command + Space to open Spotlight, type Terminal, and press Enter. A white (or dark) window opens with a blinking cursor.
That’s it. You’re in the terminal. Everything from here is just copying and pasting commands.
Step 1: Run the Install Command
Copy this command exactly and paste it into your Terminal window, then press Enter:
# Install Claude Code using Anthropic's official native installer
curl -fsSL https://claude.ai/install.sh | bash
Here’s what each part does:
curl— a built-in tool that downloads files from the internet-fsSL— flags that tell curl to follow redirects, be silent, and fail cleanly on errorshttps://claude.ai/install.sh— the official Anthropic install script| bash— pipes the downloaded script directly into bash to run it
The installer will run for 30–60 seconds. You’ll see some output as it downloads and sets itself up.
⚠️ Warning: Only run this command from the official Anthropic URL shown above. Never run install scripts from unknown sources.
Step 2: Open a New Terminal Window
After the installer finishes, close your current Terminal window and open a new one.
This is important. The installer adds claude to your PATH (the list of places your Mac looks for programs), but your current terminal session doesn’t know about it yet. A fresh window picks it up automatically.
Press Command + N while Terminal is focused, or close the window and reopen Terminal from Spotlight.
Step 3: Verify the Installation
In your new Terminal window, type this and press Enter:
# Check that Claude Code installed correctly and print the version
claude --version
You should see output like:
2.1.211 (Claude Code)
The exact version number will vary — that’s fine. What matters is that you see a version number and not an error.
⚠️ Warning: If you see
command not found: claude, don’t panic. This almost always means the new PATH hasn’t loaded. Close the Terminal window completely, open a fresh one, and try again.
If it still doesn’t work after a fresh Terminal window, run this command to manually load your profile:
# Reload your shell profile to pick up the new PATH
source ~/.zshrc
Most Macs use Zsh as the default shell (any Mac running macOS Catalina or later). If you’re on an older system using Bash, use source ~/.bash_profile instead.
Step 4: Run a Quick Health Check
Claude Code has a built-in diagnostic tool. Run it to confirm everything is set up correctly:
# Run Claude Code's built-in health check
claude doctor
This prints a report showing your install status, settings, and any warnings. A healthy install looks something like this:
✓ Claude Code version: 2.1.211
✓ Installation: Native installer
✓ Network: Connected
✓ Auth: Not authenticated (login required)
That last line — “Not authenticated” — is expected. You haven’t logged in yet. That’s the next step.
Step 5: Log In to Your Anthropic Account
Now it’s time to connect Claude Code to your Anthropic account. Run:
# Launch Claude Code and begin the login process
claude
Claude Code will open and prompt you to log in. It will open a browser window automatically and take you to Anthropic’s login page.
Sign in with the same account you used to subscribe to Pro or Max. Once you authorize in the browser, you’ll see a confirmation message back in the terminal, and Claude Code will be ready to use.
Step 6: Start Your First Session
Navigate to a project folder (or any folder you want to work in) and launch Claude Code:
# Navigate into a project folder
cd ~/Documents/my-project
# Start a Claude Code session in this folder
claude
cd stands for “change directory” — it moves you into a folder. Replace ~/Documents/my-project with the actual path to your project. Once you run claude, an interactive session opens and you can start typing instructions.
Try asking it something simple first:
What files are in this project?
Claude Code will scan your folder and give you an overview. You’re up and running.
Alternative Install Methods
The native installer above is the recommended method for most people. But there are a couple of alternatives worth knowing about.
Homebrew (for developers who already use it)
Homebrew is a popular package manager for Mac. If you already use it, you can install Claude Code like this:
# Install Claude Code via Homebrew (stable channel)
brew install --cask claude-code
The difference: Homebrew installs don’t auto-update. You’ll need to manually run brew upgrade claude-code to get new versions. The native installer updates automatically in the background.
npm (legacy method)
The old way to install Claude Code was via npm (Node Package Manager). It still works, but it’s no longer the recommended approach. If you specifically need it:
# Install Claude Code via npm (requires Node.js 22+)
npm install -g @anthropic-ai/claude-code
Only use this if you have a specific reason — like pinning a version in a team project. Otherwise, stick with the native installer.
Common Problems and How to Fix Them
“command not found: claude” after installing
Close your Terminal window completely and open a new one. The PATH update only takes effect in new sessions. If that doesn’t work, run source ~/.zshrc in the new window.
The install command returns an error with 403 or syntax error
This usually means your Mac’s security software or network is blocking the download. Try connecting to a different network (like your phone’s hotspot) and running the command again. If you’re on a corporate network, it may be blocked by a firewall — ask your IT team.
The installer says it’s done but claude --version shows an old version
You may have a previous npm-based install that’s taking priority. Run which claude to see which claude binary your system is using:
# Find out which claude binary your system is running
which claude
If it shows something like /usr/local/bin/claude instead of ~/.local/bin/claude, you have an old npm version installed. Uninstall it:
# Remove the old npm-based Claude Code installation
npm uninstall -g @anthropic-ai/claude-code
Then open a new Terminal window and try claude --version again.
“macOS cannot verify the developer” security warning
If macOS shows a warning when Claude Code tries to run, go to System Settings → Privacy & Security and scroll down until you see a message about Claude Code being blocked. Click Allow Anyway.
Login page doesn’t open in the browser
Run claude again and look for a URL printed in the terminal. Copy that URL and paste it manually into your browser to complete the login flow.
Key Takeaways
- Claude Code on Mac requires macOS 13.0 or later and a paid Anthropic account
- The install is a single command:
curl -fsSL https://claude.ai/install.sh | bash - Always open a new Terminal window after installing before running
claude --version - Run
claude doctorto check your installation health - The native installer auto-updates — you don’t have to manage updates manually
Next Steps
- Actually use it**: Your First 10 Minutes with Claude Code
- Understand pricing**: Claude Code Pricing — Free vs Pro vs API Explained
- On a different OS?**: How to Install Claude Code on Windows or How to Install Claude Code on Linux
Return to the Claude Code Beginner’s Guide for the full learning path.