How to Set Up Claude Code on Mac and Windows

Claude Code is Anthropic's coding agent. You tell it what you want in plain English, and it reads the files in a folder, edits them and runs commands on your computer. It isn't only for programmers: renaming a pile of files or building a small website works the same way.

By the end of this guide you'll have it installed and signed in, and you'll have watched it build something in a test folder.

What You Need

A paid Claude account. Claude Code needs a Pro, Max, Ultra, Team, Enterprise or Console account, and the free claude.ai plan doesn't include it. Console means pre-paid API credits instead of a subscription.

On claude.com/pricing, Pro is $17 a month billed annually or $20 billed monthly. Max is $100 a month and Ultra is $200. Team seats start at $20 a month on annual billing. Prices change, so check the page before you subscribe.

For your computer: macOS 13 or newer, or Windows 10 (version 1809 or newer), at least 4 GB of RAM and an internet connection. Windows 32-bit isn't supported. You don't need to install anything else first, and you don't need Administrator rights on Windows.

Open a Terminal on Mac

Claude Code runs in a terminal, which is a window where you type commands instead of clicking. Anthropic has a terminal guide for beginners if you want more background.

Press Command + Space to open Spotlight, type Terminal and press Return. A window opens with a blinking cursor.

Open a Terminal on Windows

Press Windows + X and choose Windows PowerShell, or Terminal if that's what the menu shows. Don't pick an entry marked (x86). Each line in the window starts with PS C:\Users\YourName>. That prefix matters, because the Windows install command below only works in PowerShell.

Install on Mac

The recommended method is the native installer. Paste this into Terminal and press Return:

curl -fsSL https://claude.ai/install.sh | bash

Close the Terminal window, open a new one, and check it worked:

claude --version

If you see a version number, you're done.

If you use Homebrew, you can install it that way instead. This command gets the stable channel, which runs about a week behind:

brew install --cask claude-code

If you want new versions immediately, use brew install --cask claude-code@latest instead. Homebrew installs don't update themselves.

There's also an npm route (npm install -g @anthropic-ai/claude-code), which needs Node.js 22 or newer. Skip it unless you already use npm.

If you'd rather not use a terminal at all, the Claude desktop app has a Code tab with Claude Code built in and no separate install. The desktop quickstart covers it. The rest of this guide uses the terminal version.

Install on Windows

In PowerShell, paste:

irm https://claude.ai/install.ps1 | iex

Close PowerShell, open a new window, and run:

claude --version

The program installs to %USERPROFILE%\.local\bin\claude.exe.

There are a few other ways to install on Windows. WinGet works, but it doesn't update itself:

winget install Anthropic.ClaudeCode

If you use CMD instead of PowerShell, the CMD installer is:

curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

If you already use WSL 2, you can run the Mac command inside it instead. Otherwise stay on native Windows.

Git for Windows is optional. Without it, Claude Code runs commands through PowerShell, and with it, through Git Bash. Anthropic's advanced setup page has the full list of install options.

First Run

Make a test folder so Claude has somewhere safe to work. These commands work in both Terminal and PowerShell:

mkdir claude-test
cd claude-test
claude

The first launch opens your browser to sign in with your Claude account. If you have an ANTHROPIC_API_KEY set, it asks whether to use that instead. You can sign in again later with /login.

Try a First Task

Type this at the prompt:

Make a one-page HTML website about my dog. Her name is Luna and she loves the beach.

Claude will write the file into your test folder and tell you what it did. Open the folder, double-click the .html file and it opens in your browser. Then ask for changes in plain English: a bigger heading, a different color, a photo section.

How Approvals Work

Claude Code can change files and run commands, so it has permission modes that control when it stops to ask you. The two to know first are Manual and Auto. Manual lets Claude read files freely and asks before anything else. Auto skips routine prompts and has a second model review each action before it runs.

Current releases start interactive terminal and VS Code sessions in Auto mode, so Claude won't stop before every change. Press Shift+Tab during a session to switch: from Auto, the first press goes to Manual, and further presses step through accept edits and plan mode. The status bar under the prompt shows the current mode.

To start every session in Manual, add this to the file ~/.claude/settings.json (default is the settings name for Manual):

{"permissions": {"defaultMode": "default"}}

Leave bypassPermissions alone. The docs reserve it for isolated containers and virtual machines. The permission modes page explains every mode.

The First Handful of Commands

Commands that start with / work inside a session. The ones to learn first:

  • /help lists everything available.
  • /init creates a CLAUDE.md file, which holds instructions Claude reads at the start of every session in that folder.
  • /model switches the model.
  • /permissions shows and changes what Claude may do.
  • /status shows your current setup.
  • /clear wipes the conversation and starts fresh.
  • /resume goes back to an earlier session.
  • /exit leaves, or press Ctrl+D twice.

From the normal terminal prompt, claude -c continues your last conversation and claude -p "question" answers one question and exits. See the commands reference for the full list, and the quickstart for a guided first session.

Updating and Uninstalling

The native installer updates itself in the background. Restart Claude Code to pick up a new version, or run claude update to apply one right away. Homebrew users run brew upgrade claude-code, and WinGet users run winget upgrade Anthropic.ClaudeCode. Windows updates through WinGet can fail while Claude Code is running, so close it first.

To uninstall the native version on Mac:

rm -f ~/.local/bin/claude
rm -rf ~/.local/share/claude

On Windows, in PowerShell:

Remove-Item -Path "$env:USERPROFILE\.local\bin\claude.exe" -Force
Remove-Item -Path "$env:USERPROFILE\.local\share\claude" -Recurse -Force

For Homebrew, run brew uninstall --cask claude-code. For WinGet, run winget uninstall Anthropic.ClaudeCode.

Those commands leave your settings and history behind. Removing ~/.claude and ~/.claude.json on Mac, or the matching folder and file in %USERPROFILE% on Windows, deletes your conversation history and any connected tools, so only do it if you want a clean slate.

If Something Goes Wrong

Run claude doctor in the terminal, or /doctor inside a session, to check your install. Anthropic's install troubleshooting page covers the rest. The common problems:

  • command not found: claude on Mac. The install folder isn't on your PATH. Open a new terminal first, since that fixes most cases. If it persists with the default zsh shell, run echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc and then source ~/.zshrc.

  • 'claude' is not recognized on Windows. Open a new PowerShell window first. If it persists, run the two lines below, then close PowerShell and open a new window.

    $currentPath = [Environment]::GetEnvironmentVariable('PATH', 'User')
    [Environment]::SetEnvironmentVariable('PATH', "$currentPath;$env:USERPROFILE\.local\bin", 'User')
    
  • irm isn't recognized on Windows. You're in CMD, not PowerShell. Switch to PowerShell or use the CMD installer.

  • A parameter error mentioning -fsSL in PowerShell. You pasted the Mac command. Use the PowerShell one.

  • The installer prints HTML, or gives a 403 error. Your region or network is blocking the script. Use Homebrew, WinGet or npm instead.

  • TLS or SSL errors on older Windows PowerShell. Run [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 and then the installer again.

  • Typing claude on Windows opens the desktop app instead. Update Claude Desktop.

  • npm says "running scripts is disabled on this system". Run Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser, or use the PowerShell installer, which isn't affected.

  • Claude Code says it needs Git for Windows or PowerShell. Install Git for Windows.

  • A Mac older than macOS 13 shows dyld or Symbol not found errors. Update macOS.

The VS Code extension doesn't put claude on your PATH. Install the terminal version too if you want the command.

Where to Go Next

Once the test folder works, point Claude at a real project folder and ask it what the project does.

Checked against the docs on 30 October 2026.