How to Use Claude Code on Mac in 2026: Install, Setup and Tips
Install Claude Code on your Mac with one Terminal command or Homebrew, sign in with a paid Claude plan, and learn the commands, modes and fixes that matter.
Claude Code installs on a Mac with one Terminal command: run curl -fsSL https://claude.ai/install.sh | bash, then type claude inside a project folder and sign in through your browser. You need macOS 13.0 or later and a paid Claude plan (Pro, Max, Ultra, Team or Enterprise) or a Claude Console account, per Anthropic's setup page.
If you've never opened Terminal on purpose, a blinking cursor and a command that starts with "curl" can feel like a lot. It's less than it looks. Below: the requirements, three install methods, the desktop app and VS Code options if you'd rather not live in Terminal, your first session, the commands worth memorizing, what it costs, and how to fix the errors Mac users hit most.
What Claude Code is, and which version you want on a Mac
Claude Code is Anthropic's agent for working on code and files: it reads a project folder, edits files, runs commands and handles Git, asking your permission along the way. Mac users get three ways in, all on the same account, according to Anthropic's quickstart:
- Terminal (the CLI). The full version. You type claude in a folder and work in text.
- The Claude desktop app. Claude Code is the Code tab, next to chat. No Terminal needed, and you review changes in a visual diff (desktop docs).
- VS Code or Cursor. An extension that puts Claude Code in a side panel of your editor (VS Code docs).
My advice: install the CLI even if you plan to use the desktop app most of the time. The CLI is where the setup, update and troubleshooting commands live, and every guide you'll read assumes it. When I first set it up, I started with the desktop app, then went back and installed the CLI the moment I wanted to run claude doctor.
Claude Code requirements on Mac
Claude Code needs macOS 13.0 or later, 4 GB of RAM or more, an internet connection and a supported country. Both Apple silicon and Intel Macs work. Here's the full list from Anthropic's system requirements:
Requirement | What Anthropic lists |
|---|---|
macOS | 13.0 or later |
Memory | 4 GB of RAM or more |
Processor | x64 (Intel) or ARM64 (Apple silicon) |
Shell | Zsh (the macOS default) or Bash |
Network | An internet connection |
Location | A country on Anthropic's supported list |
Account | Claude Pro, Max, Ultra, Team or Enterprise, or a Claude Console account. The Free plan doesn't include Claude Code. |
Git | Optional, though some features use it. Run git --version to check. |
To check your macOS version, open the Apple menu and choose About This Mac. If it says anything older than 13, update through Software Update before you try to install, or you'll get the dyld error covered further down.
How to install Claude Code on Mac
The recommended way to install Claude Code on a Mac is Anthropic's native installer, one command pasted into Terminal. Homebrew and npm also work. The difference that matters is updates: the native install updates itself in the background, and Homebrew doesn't unless you tell it to.
Method | Command | Updates |
|---|---|---|
Native installer (recommended) | curl -fsSL https://claude.ai/install.sh | bash | Automatic, in the background |
Homebrew, stable | brew install --cask claude-code | Manual: brew upgrade claude-code |
Homebrew, latest | brew install --cask claude-code@latest | Manual: brew upgrade claude-code@latest |
npm (needs Node.js 22+) | npm install -g @anthropic-ai/claude-code | Automatic if npm's folder is writable |
Install with the native installer
- Press Cmd + Space, type Terminal and press Return (terminal guide).
- Paste this line with Cmd + V and press Return: curl -fsSL https://claude.ai/install.sh | bash
- Wait. The installer shows no progress bar while it downloads, so leave the window alone until you see "Claude Code successfully installed!"
- Open a new Terminal window (Cmd + N) so it picks up the new command.
- Type claude --version and press Return. A working install prints a version number followed by "(Claude Code)".
curl -fsSL https://claude.ai/install.sh | bash
claude --versionThe installer puts the claude command at ~/.local/bin/claude and keeps its versions in ~/.local/share/claude, per Anthropic's setup page. If you want the slower, safer release track from day one, add the word stable: curl -fsSL https://claude.ai/install.sh | bash -s stable.
Install with Homebrew
If you already manage your Mac's tools with Homebrew, run brew install --cask claude-code. Anthropic's docs say this cask follows the stable channel, which is typically about a week behind and skips releases with major regressions; claude-code@latest gets each version as soon as it ships. Homebrew installs don't update on their own, so run brew upgrade claude-code now and then, and brew cleanup to clear old versions off your disk (setup page).
On my own Mac I'd pick the native installer over Homebrew for one reason: I forget to run upgrades. Automatic updates mean I'm never on a months-old version when a new model needs a newer Claude Code.
Install with npm
The npm package needs Node.js 22 or later. Run npm install -g @anthropic-ai/claude-code, and never put sudo in front of it: Anthropic warns that this causes permission problems and stops Claude Code from updating itself (setup page). To upgrade later, use npm install -g @anthropic-ai/claude-code@latest rather than npm update -g.
How to sign in to Claude Code
Claude Code signs you in the first time you run it: type claude, and a browser window opens for you to log in with your Claude account. After that your credentials are stored, so you won't log in again (quickstart).
- In Terminal, go to a project folder (next section) and type claude.
- Follow the prompt. Your browser opens on the Claude sign-in page.
- Sign in with the account that has Pro, Max, Ultra, Team or Enterprise, or with a Claude Console account.
- Go back to Terminal. The Claude Code prompt appears with the version, current model and working folder above it.
To switch accounts later, type /login inside a session. If you've set an ANTHROPIC_API_KEY in your shell, Claude Code asks whether to use it and skips the browser login when you approve; run /status to see which sign-in method is active (troubleshooting guide). An old API key line left in ~/.zshrc can put you on API billing when you meant to use your subscription, so it's worth a look if the numbers surprise you.
Your first Claude Code session on Mac
Start Claude Code from inside the folder you want it to work on, because that folder is what it reads. In Terminal, type cd followed by a space, drag the folder from Finder into the Terminal window to paste its path, press Return, then type claude.
cd ~/Documents/my-project
claudeThen talk to it in plain English. Anthropic's quickstart suggests starting with a question rather than a change, and I agree: asking it to explain a project first shows you how it reads your files before you let it touch anything (quickstart). A good opening sequence:
- Ask what does this project do? and read the summary.
- Ask for something small, such as adding a short function or fixing a typo in a README.
- When Claude Code shows the change and asks, choose Yes to approve it, or say what to change.
- Ask what files have I changed? and then commit my changes with a descriptive message if the folder uses Git.
You don't have to be a developer. Anthropic's terminal guide gives non-coding examples such as renaming screenshots on your Desktop by what's in them. The first time I tried something like that, I pointed it at a messy downloads folder and asked for a plan before any renaming, which is exactly what Plan mode below is for.
Before a long task, run /init. It looks through the project and writes a CLAUDE.md file with the build commands and conventions it finds, which Claude Code loads each time a session begins (memory docs). Add the things it can't work out on its own, like "never edit the files in /exports". For instructions that apply to all your projects, use ~/.claude/CLAUDE.md, and edit either one later with /memory.
Claude Code commands worth knowing
Claude Code has two kinds of commands: shell commands you type in Terminal to start it, and slash commands you type inside a running session. These are the ones I'd learn first, with descriptions from Anthropic's quickstart and commands reference.
Command | Where | What it does |
|---|---|---|
claude | Terminal | Starts an interactive session in the current folder |
claude "task" | Terminal | Starts a session with a first prompt |
claude -p "query" | Terminal | Answers one question, then exits |
claude -c | Terminal | Continues the most recent conversation in this folder |
claude -r | Terminal | Picks a previous conversation to resume |
claude doctor | Terminal | Checks your install and settings without starting a session |
claude update | Terminal | Installs an update now |
/init | Session | Creates a CLAUDE.md guide for the project |
/compact | Session | Summarizes the conversation so far to free up context |
/clear | Session | Starts a fresh conversation |
/usage | Session | Shows session cost, plan usage limits and activity (/cost is an alias) |
/model | Session | Switches the model |
/rewind | Session | Rolls the conversation and/or code back to an earlier point |
/help | Session | Lists available commands |
/exit | Session | Quits Claude Code (so does Ctrl + D twice) |
Three keys save the most time: Esc stops Claude Code mid-task, Shift + Tab switches permission modes, and the Up arrow brings back what you typed before (terminal guide, quickstart).
Claude Code permission modes: how much it does without asking
Permission modes decide which actions Claude Code takes without asking you first. In Terminal, press Shift + Tab to cycle through them; in the desktop app, use the selector under the prompt box (permission modes).
Mode | What runs without asking | When I'd use it |
|---|---|---|
Manual (default) | Only reading files | Any project you care about, and every first session |
Accept edits | Reads, file edits and common file commands like mkdir and mv | A task you've already planned and trust |
Plan | Reads; edits wait until you approve a plan | Anything big, or anything you don't fully understand yet |
Auto | Everything, with background safety checks | Where available, once you know how Claude Code behaves in this project |
Bypass permissions | Everything | Only inside an isolated container or virtual machine, per Anthropic |
The harder a change is to undo, the more I want Plan mode. Asking for a plan costs one extra message, and reading it is the cheapest review you'll ever do. To start in a mode directly, run claude --permission-mode plan.
Use Claude Code without Terminal: the desktop app and VS Code
The Claude desktop app's Code tab
The Claude desktop app for macOS is one universal download that runs on both Intel and Apple silicon, and Claude Code lives in its Code tab (desktop docs). Download it from Anthropic's setup page, sign in, and click Code.
- Press Cmd + N or click + New to start a session.
- Click Changes in a session's title bar to review the diff, and click the + beside a line number to comment on it.
- Turn on Worktree before you start a session to keep its changes separate. That needs Git.
- Press Cmd + / to see every shortcut, and use Claude > Check for Updates… to update.
One Mac-specific catch from Anthropic's docs: the desktop app reads variables from ~/.zshrc only when it starts, so quit and reopen it after you change them.
The VS Code and Cursor extension
- Make sure you have VS Code 1.94.0 or later; the About window shows your version.
- Press Cmd + Shift + X to open Extensions.
- Search for Claude Code and click Install.
- Click the Spark icon in the editor toolbar of an open file, or ✻ Claude Code in the status bar, and sign in.
The same extension works in Cursor (VS Code docs). Cmd + Esc toggles focus between the editor and Claude, but on macOS Tahoe and later the Game Overlay can grab that shortcut. Anthropic's fix is System Settings > Keyboard > Keyboard Shortcuts > Game Controllers, then clear Game Overlay. Note that the extension carries its own private copy of Claude Code, so installing it doesn't give you the claude command in Terminal.
How much Claude Code costs
Claude Code comes with every paid Claude plan, starting with Pro at $20 a month, and isn't included in the Free plan. Here are the prices on Anthropic's pricing page today, before tax:
Plan | Price | Usage |
|---|---|---|
Pro | $20 a month, or $17 a month billed annually ($200 up front) | The base allowance |
Max | $100 a month | 5x Pro usage |
Ultra | $200 a month | 10x Pro usage each week, no 5-hour limit for verified accounts |
Team, standard seat | $25 per seat a month, or $20 billed annually | For teams of 2 to 150 |
Team, premium seat | $125 per seat a month, or $100 billed annually | For teams of 2 to 150 |
Enterprise | $20 per seat a month billed annually (20-seat minimum), plus usage at API rates | Scales with model and task |
Claude Console | Pre-paid API credits | Pay for what you use |
I'd start on Pro and check /usage through a few real working days before paying more. It shows what counts against your limits, which tells you far more than guessing. If you'd rather pay per use, a Claude Console account bills against API credits instead of a subscription. And if you're still deciding whether Claude is the right assistant at all, our Claude alternatives guide breaks down what replaces each part of it.
How to fix Claude Code install errors on Mac
Most Claude Code install problems on a Mac come down to four error messages, each with a documented fix in Anthropic's troubleshooting guide.
"command not found: claude"
This means the install worked but Terminal doesn't know where to look. First confirm the file is there with ls -la ~/.local/bin/claude. If it is, add its folder to your PATH for Zsh, the macOS default, then open a new window:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrcIf you use Bash on a Mac, use ~/.bash_profile in place of ~/.zshrc in both lines, because Terminal starts Bash as a login shell. The installer also prints the exact fix under "Setup notes" at the end of its output, which is the first place I look.
"syntax error near unexpected token '<'"
The install address returned a web page instead of the script. If the page says "App unavailable in region", Claude Code isn't offered in your country. Otherwise run the command again, or install with brew install --cask claude-code (terminal guide).
A "dyld" error or "built for Mac OS X 13.0"
Your macOS is older than Claude Code supports. Check Apple menu > About This Mac and update to macOS 13 or later.
"Cask 'claude-code' is unavailable" in Homebrew
Your Homebrew index is out of date. Run brew update, then brew install --cask claude-code again. For anything else, run claude doctor: it checks the install and your settings and suggests fixes without starting a session (setup page).
How to update or uninstall Claude Code on Mac
A native install updates itself in the background; run claude update to get a new version immediately. Homebrew users run brew upgrade claude-code. If you'd rather stay a week behind on a version that skipped major regressions, open /config and set Auto-update channel to stable (setup page).
To uninstall a native install, remove the command and its versions:
rm -f ~/.local/bin/claude
rm -rf ~/.local/share/claudeFor Homebrew, run brew uninstall --cask claude-code; for npm, npm uninstall -g @anthropic-ai/claude-code. Your settings and session history live separately in ~/.claude and ~/.claude.json. Deleting them with rm -rf ~/.claude and rm ~/.claude.json is permanent, and Anthropic notes the desktop app and VS Code extension recreate that folder if they're still installed, so remove those first. In Finder, Cmd + Shift + . shows hidden folders like .claude if you want to look before you delete.
Habits that get better results from Claude Code
- Open the right folder first. Claude Code works on the folder you launch it from, so a quick cd saves you from asking it about the wrong project.
- Be specific. "Fix the login bug where people see a blank screen after a wrong password" gets a better result than "fix the bug", as Anthropic's quickstart puts it.
- Keep CLAUDE.md short and current. When I correct the same thing twice, it goes into CLAUDE.md so I never have to say it a third time.
- Run /compact on long sessions instead of letting the conversation sprawl, and /clear when you switch to an unrelated task.
- Use Git, even on small projects. Claude Code can commit for you, and a commit before a big change is the easiest undo there is.
- Check /usage before a large job so a limit doesn't land halfway through it.
Frequently asked questions
Is Claude Code free on Mac?
No. Claude Code needs a Pro, Max, Ultra, Team or Enterprise plan or a Claude Console account; the Free Claude plan doesn't include it. Pro is $20 a month, or $17 a month billed annually, per Anthropic's pricing page.
Does Claude Code work on Apple silicon and Intel Macs?
Yes. Claude Code supports both x64 (Intel) and ARM64 (Apple silicon) processors on macOS 13.0 or later, and the desktop app is a universal build.
Do I need Homebrew or Node.js to install Claude Code?
No. The recommended native installer needs only Terminal: run curl -fsSL https://claude.ai/install.sh | bash. Homebrew and npm (with Node.js 22 or later) are optional alternatives.
Can I use Claude Code without Terminal?
Yes. The Claude desktop app has a Code tab that runs Claude Code with a visual interface, and an extension puts it inside VS Code or Cursor. You'll still find Terminal handy for claude doctor and updates.
Why do I get command not found: claude after installing?
The folder Claude Code installs into, ~/.local/bin, isn't on your PATH yet. Add it to ~/.zshrc with the PATH line from Anthropic's troubleshooting guide, run source ~/.zshrc, and open a new Terminal window.
Where does Claude Code keep its files on a Mac?
The command is at ~/.local/bin/claude and its versions are in ~/.local/share/claude. Your settings and history are in ~/.claude and ~/.claude.json, and project instructions go in a CLAUDE.md file in the project folder.