How to install Claude Code: two simple ways
A clear, beginner-friendly guide to getting Claude Code running on Mac or Windows. Pick the desktop app or the command line, both covered step by step.

Claude Code is Anthropic's coding agent. It reads your files, makes changes, and runs tasks for you. Before it can do any of that, you have to install it. This guide shows two ways to do that, on both Mac and Windows. Pick whichever fits you.
There are two options:
- The desktop app. A normal program with a window and buttons. No terminal. The easiest place to start.
- The command line. You run Claude Code by typing in a terminal. A little more setup, and more control once you get going.
Both run the same Claude Code underneath. You can start with the app and move to the command line later.
What you need first
One thing matters most: Claude Code needs a paid Claude plan. The free Claude.ai plan does not include it. A Pro or Max subscription works, and so does a Claude Console account if you would rather pay as you go.
Then check that your computer meets the basics.
On a Mac:
- macOS 13 or newer
- 4 GB of RAM or more
That is it. You do not need to install anything else first.
On Windows:
- Windows 10 (version 1809 or newer), Windows 11, or Windows Server 2019 or newer
- 4 GB of RAM or more
- Git for Windows. The desktop app will not open its Code tab without it, so on Windows this one is not optional. The command line runs without Git but uses it for some tasks, so it is worth installing either way.
You do not need Node.js for the desktop app or the native command-line installer, and you no longer need WSL. The one exception is the npm install path further down: that one needs Node.js 18 or newer.
Option 1: The desktop app
If you have never touched a terminal, start here. The desktop app is a normal program with a window.
On a Mac there are no prerequisites. Download the app and open it, nothing else to install first. On Windows, install Git for Windows first. The Code tab will not work until it is there. Download it, run the installer with the default options, then close and reopen the desktop app so it picks up Git.
- Go to claude.ai and download the desktop app for your computer.
- Install it the way you install any app, then open it and sign in with your Claude account.
- Click the Code tab at the top of the window.
- Choose a folder on your computer to work in.
- Type what you want done, and Claude Code gets to work.
That is the whole setup. No commands to memorise. The steps are the same on Mac and Windows, except that on Windows you install Git for Windows first.
Option 2: The command line
The command line means typing instructions into a terminal instead of clicking buttons. It takes one extra step to set up and gives you more control once you are comfortable. The steps are different on Mac and Windows, so follow the section for your computer.
On a Mac
You do not need to install anything first.
- Open the Terminal app: press Cmd and Space, type "Terminal", and press Enter.
- Paste this command and press Enter:
curl -fsSL https://claude.ai/install.sh | bash - Wait for it to finish.
- Check it worked by running
claude --version. If you see a version number, you are installed.
Prefer the npm route? If you already have Node.js 18 or newer, you can run npm install -g @anthropic-ai/claude-code instead. That is the only Mac method that needs Node.js. If npm means nothing to you, use the steps above.
On Windows
- Install Git for Windows first.
- Open PowerShell: press the Start button, type "PowerShell", and press Enter.
- Paste this command and press Enter:
irm https://claude.ai/install.ps1 | iex - Wait for it to finish.
- Check it worked by running
claude --version. If you see a version number, you are installed.
Prefer the npm route? If you already have Node.js 18 or newer, you can run npm install -g @anthropic-ai/claude-code instead. That is the only Windows method that needs Node.js. If npm means nothing to you, use the steps above.
The first time you open it
However you installed it, the first run is the same.
In the desktop app, you sign in when you open it. On the command line, type claude and press Enter. Your browser opens so you can sign in to your Claude account. Approve it, come back to the terminal, and you are ready.
From here you point Claude Code at a folder and tell it what you want in plain English.
If something goes wrong
Installs fail in a handful of predictable ways. Find the section for your computer, then match your error to the fix.
On a Mac
- "zsh: command not found: claude." The install worked, but your terminal does not know where it put the program yet. First, close the terminal, open a fresh one, and run
claude --versionagain. If it still fails, add the install folder to your PATH by pasting these two lines:
Then runecho 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc source ~/.zshrcclaude --versionagain. - "dyld: cannot load" or "Abort trap: 6" during install. Your macOS version is too old. Claude Code needs macOS 13 or newer. Open the Apple menu, choose About This Mac to check your version, and update if you are behind.
- "Your plan does not include Claude Code." You are on the free plan. Claude Code needs Pro, Max, Team, or a Console (pay as you go) account.
- The login page does not open. Press
cto copy the sign-in link, then paste it into your browser yourself. - Want a full health check? Run
claude doctor. It inspects your setup and tells you what, if anything, is wrong.
On Windows
This is where most people lose an afternoon. Match your error to the fix.
- "irm is not recognized." You are in Command Prompt, not PowerShell. Open PowerShell from the Start menu and run
irm https://claude.ai/install.ps1 | iexthere. Or stay in Command Prompt and use its own installer:curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd - "The token '&&' is not a valid statement separator." The opposite mix-up: you are in PowerShell but ran the Command Prompt command. Use the PowerShell one instead:
irm https://claude.ai/install.ps1 | iex - "'bash' is not recognized." You ran the Mac command on Windows. Use the PowerShell command above.
- The installer finished, but "claude" is still not found. This is the big one, the "path not found" loop. The installer puts
claude.exein%USERPROFILE%\.local\bin, and Windows is not looking there yet. Add that folder to your PATH. In PowerShell, paste this, then close and reopen the terminal:
Open a new window and run$currentPath = [Environment]::GetEnvironmentVariable('PATH', 'User') [Environment]::SetEnvironmentVariable('PATH', "$currentPath;$env:USERPROFILE\.local\bin", 'User')claude --version. That one step ends the loop most people get stuck in. - "The process cannot access the file ... because it is being used by another process." A previous attempt is still running, or your antivirus is scanning the half-downloaded file. Close any other PowerShell windows, then clear the downloads folder and install again:
Remove-Item -Recurse -Force "$env:USERPROFILE\.claude\downloads" irm https://claude.ai/install.ps1 | iex - "Claude Code does not support 32-bit Windows." You opened the wrong PowerShell. Windows lists two: use plain Windows PowerShell, not the one labelled (x86). Close the x86 window, open the normal one, and install again.
- Typing "claude" opens the desktop app instead of the command line. An old version of the desktop app registered itself ahead of the CLI. Update the desktop app to the latest version and the clash goes away.
- "syntax error near unexpected token" or a 403 error. The download was blocked or routed wrong, usually by a company network or firewall. Wait a few minutes and retry, or install with WinGet, which avoids the download script:
winget install Anthropic.ClaudeCode - Git Bash not found, even though you installed Git. Tell Claude Code where Git is. Run
where.exe gitin PowerShell to find the path, then add this to your settings.json, changing the path to match yours:{ "env": { "CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\bash.exe" } } - "Your plan does not include Claude Code." You are on the free plan. Claude Code needs Pro, Max, Team, or a Console (pay as you go) account.
- The login page does not open. Press
cto copy the sign-in link, then paste it into your browser yourself. - Want a full health check? Run
claude doctor. It inspects your setup and tells you what, if anything, is wrong.
If none of this helps, run claude doctor for an automatic diagnosis, or check the issues page at github.com/anthropics/claude-code/issues with your error text.
Which one should you pick
If you want the simplest start, use the desktop app. If you want more control and plan to live in the terminal, use the command line. You are not locked in either way. Many people open the app first, get comfortable, and pick up the command line afterward.
Installing is the short part. The real value starts the moment you point Claude Code at a real task.