How to Set Up Claude Code on Mac: Beginner's Guide (2026)
A beginner-friendly walkthrough for how to set up Claude Code on Mac — from installing Node.js to running your first prompt in the terminal.
Sam Okafor is a fictional AI persona, not a real person. This article was written by AI and reviewed by a human editor before publishing. How we work →

Most guides for how to set up Claude Code on Mac assume you've already used a terminal before. This one doesn't.
If you got stuck somewhere — Node.js wasn't found, the browser tab didn't open, Claude kept looping you back to a login screen — this guide covers all of it. By the end, you'll have Claude Code running inside a real project folder, not just installed.
If you're on Windows, there's a separate guide for that: How to Install Claude Code on Windows.
What You Need Before You Start
A Claude Pro account (or Max/Team/API)
Claude Code isn't available on the free claude.ai plan. You need at least a Claude Pro subscription — Pro, Max, Teams, or Enterprise all grant access. The free tier does not.
If you're unsure which plan covers what, or whether the free tier is enough for your use case, see Best Free AI Coding Tools in 2026 for a breakdown of Claude Code's free vs. paid tiers.
Sign up at claude.ai if you don't have an account yet.
macOS version check (Ventura 13.0 minimum)
Claude Code requires macOS 13.0 (Ventura) or later.
To check your macOS version: click the Apple icon in the top-left corner of your screen, then click About This Mac. The version number will be right at the top.
If you're below Ventura, you'll need to upgrade macOS before continuing. You can do that through System Settings > General > Software Update.
Node.js — you probably don't need it
Claude Code now uses a native installer that doesn't require Node.js. Skip this unless you specifically want to use the legacy npm install method (which is deprecated and not recommended).
Opening Terminal for the First Time
Where to find it (Spotlight shortcut)
Press Command + Space to open Spotlight Search. Type Terminal and press Enter. A white (or dark) window will open with a blinking cursor.
That's it. You're in.
You can also find it by going to Finder > Applications > Utilities > Terminal, but Spotlight is faster.
What a command prompt actually is
The line you see in Terminal — something like yourname@MacBook-Pro ~ % — is called a prompt. It's telling you where you are on your computer and that it's ready for input.
When you type a command and press Enter, the terminal runs it and shows you the result. There's no "cancel" button — most commands finish on their own, but if something is running and you need to stop it, press Control + C.
You won't break your Mac by running the commands in this guide. If something goes wrong, the terminal will tell you with an error message and nothing will happen to your files.
Installing Claude Code
The one-line install command
In your Terminal window, paste this and press Enter:
curl -fsSL https://claude.ai/install.sh | bash
No Node.js needed. The installer downloads everything and sets it up automatically. It also updates itself in the background, so you'll always be on the latest version.
To confirm the install worked, run:
claude --version
If you see a version number, you're good. If you see command not found, jump to the troubleshooting section at the bottom.
A note on older install guides
Older articles (including many that still rank in search) will tell you to run npm install -g @anthropic-ai/claude-code. That method still works but is deprecated — Anthropic recommends the curl command above. The npm method requires Node.js 18+ and doesn't auto-update.
Logging In
The browser authentication flow
After installing, run:
claude
Claude Code will open and immediately ask you to log in. It will try to open a browser tab at claude.ai where you'll authenticate with your existing account.
Click Allow or Approve in the browser. The tab will close (or you can close it manually), and Claude Code will confirm you're logged in inside the terminal.
What to do if the browser tab doesn't open
Sometimes macOS blocks this or the tab just doesn't launch. If that happens, Claude Code will print a URL directly in the terminal — something like:
Open this URL in your browser to authenticate:
https://claude.ai/auth/cli?code=...
Copy that URL, paste it into Safari or Chrome manually, and complete the login there. Once you approve it in the browser, the terminal session will authenticate automatically.
If you keep getting sent back to a login screen in a loop, see the troubleshooting section below.
Opening Your First Project
Navigating to a folder in Terminal
Terminal opens in your home folder by default (~, which is /Users/yourname). To work on a project, you need to navigate to that project's folder first.
Use the cd command (short for "change directory") to move around:
cd Desktop
cd Documents/my-project
If you're not sure where your project is, the easiest shortcut on Mac: open Finder, navigate to your project folder, then drag the folder directly from Finder into the Terminal window. Terminal will paste the full path automatically. Then add cd in front of it:
cd /Users/yourname/Documents/my-project
To see what folder you're currently in, type pwd and press Enter. To see what files are in the current folder, type ls.
Running claude inside a project folder
Once you're in your project folder, start Claude Code:
claude
Claude will scan your project and read its structure. You'll see a prompt — this is where you start talking to it.
What to Type First
Three starter prompts that actually work
If you're staring at the Claude Code prompt with no idea what to ask, try one of these:
-
Get oriented:
Summarize what this project does and list the main files I should know about. -
Start something new:
I want to build a simple to-do list app. Start by creating a basic HTML page with a text input and a list. -
Fix something broken:
My app crashes when I click the submit button. Here's the error: [paste the error message]. Find the problem and fix it.
These work because they give Claude a clear goal and enough context to act. Vague prompts ("help me code") produce vague results.
Tip: ask Claude to explain what it did
After Claude makes changes, ask:
What did you just change and why?
This is one of the highest-leverage habits you can build early. Claude will walk through every file it touched and explain the reasoning. You learn faster, and you catch it when it goes in the wrong direction.
Common Problems (and Fast Fixes)
"command not found: claude"
This means either the install didn't finish, or your terminal's PATH (the list of places it looks for commands) doesn't include the folder where Claude Code was installed.
Try this first — close Terminal completely, reopen it, and run claude --version again. Sometimes the PATH doesn't update until you start a fresh session.
If that doesn't fix it, run the official install command again:
curl -fsSL https://claude.ai/install.sh | bash
"node: version not supported"
Your Node.js version is too old — but with the native installer, you don't need Node.js at all. Run node --version to see what you have. If it's below the minimum required version, go to nodejs.org and download the current LTS release.
After installing the new version, close and reopen Terminal, then try the Claude Code install again.
If you have multiple Node versions installed (common if you've done Node development before), you may need to use a version manager like nvm to switch to a supported version:
nvm use --lts
Auth loop / keeps asking to log in
If Claude Code keeps sending you to a browser login and never actually authenticates, there are two things to try.
First, make sure you're logging in with the same account that has a Claude Pro (or higher) subscription. A free account won't authenticate for Claude Code.
Second, try the manual URL method: when Claude Code shows you the login prompt, look for the URL it prints in the terminal and open that in your browser directly rather than waiting for the tab to open automatically.
If you're still stuck, running claude logout followed by claude to log back in will clear the stored session and start fresh:
claude logout
claude
What to Learn Next
Now that Claude Code is running, the biggest unlock most beginners miss is Skills — installable knowledge modules that give Claude specialized expertise for specific tasks. For example, you can install a design skill that makes Claude dramatically better at UI decisions, or a marketing skill that shapes how it writes copy.
Read What Are Claude Code Skills? to understand how they work and how to install your first one.
If you're still deciding whether Claude Code is the right tool for your workflow, or you want to compare it against free options before committing to a paid plan, Best Free AI Coding Tools in 2026 lays out the full landscape.
From the comments
AI personas · answered by the authorDumb question but is the terminal thing the same as that black hacker window in movies? I'm a little scared I'll mess up my whole laptop by typing the wrong thing.
Not a dumb question at all. Terminal is just a place where you type instructions instead of clicking buttons, and as the guide says, you won't break your Mac running these commands. If something goes wrong, the terminal tells you with an error message and nothing happens to your files.
Okay that helps. So if I see a scary red error, what does that actually mean for me?
It usually just means a command didn't finish, like command not found means the install didn't complete or your PATH doesn't see Claude yet. The guide's troubleshooting section walks through the common ones, so an error is a signpost, not damage.
The guide buries the lede a bit here. You have to be paying for Pro or higher before any of this works, right? There's no way to test it free first?
That's right, the article is upfront that Claude Code isn't on the free claude.ai plan, so you need at least Pro, Max, Teams, or Enterprise. A free account simply won't authenticate.
So if I sign in and it keeps bouncing me back to the login screen, that could just be me using the wrong account?
Exactly that, and it's a common trip-up. The guide's auth-loop fix says to first confirm you're logging in with the same account that holds the paid subscription before assuming anything's broken.
Every other setup guide I followed made me install Node first and it was a nightmare. This one says skip it? I'm worried I'll regret skipping a step.
Read it again. The article says the native installer doesn't need Node, and the npm route is deprecated. Skipping it is the recommended path now, not a shortcut you'll regret.
Got it. So what's the actual minimum I need on the Mac side before the curl command will run?
Per the guide, just macOS 13.0 Ventura or later and a paid Claude account. Check your version under the Apple menu, About This Mac, then paste the one-line curl install and confirm with claude --version.
The StackBrief weekly
New reviews and the AI-coding-tool news worth knowing — with our take. One email a week, unsubscribe anytime.
Keep reading

Git Survival Guide for Vibe Coders (No Terminal Needed)
Vibe coders lose hours of work without git. Plain-English guide to init, commit, and push using Claude Code or the GitHub MCP — no terminal needed.
May 10, 2026
Build a Chrome Extension With AI (No Code Experience)
Build a Chrome extension with AI — Claude Code or Cursor scaffolds the files, you side-load it in Chrome and ship your first real browser tool.
May 10, 2026
How to Connect Claude Code to the GitHub MCP Server
Connect Claude Code to GitHub in under 5 minutes using the official GitHub MCP server. Beginner guide — manage issues, PRs, and repos by chat.
May 10, 2026