Sort a messy folder
"Look at my Downloads folder. Move all the PDFs into a folder called 'pdfs', all the images into 'images', and tell me what's left."
A clear, step-by-step tutorial for installing Claude Code on a Mac. Written for people who have never opened the Terminal app before. Five steps, about ten minutes, no prior experience required.
("Hello, World" is the first program every coder writes. This is the human version — same idea, with help.)
Claude Code is Claude that runs in a small Terminal window on your Mac. Same Claude as the chat at claude.ai — but with new abilities. The web chat can answer questions. Claude Code can also read and write files on your machine, run commands, work step-by-step on real tasks across many turns, and remember context. If you've ever wanted Claude to do something, not just describe how to do it, this is the version that does that.
You don't need to be a programmer. People use Claude Code to organize folders, edit documents, clean up photo libraries, manage receipts, write blog posts that span multiple files, automate repeating chores. The Terminal looks intimidating; the experience is just chat.
Each step is one thing to download, click, or paste. Mac is friendlier than Windows here — Terminal is already on your Mac, and Git is too. So this is shorter.
curl -fsSL https://claude.ai/install.sh | bash
Or via Homebrew: brew install --cask claude-code. Jump to the Quick Install section for the walk-through. The five-step Node/npm path below still works and is the gentler walk-through for first-time Terminal users.
Node.js is the engine that runs Claude Code. You install it once and never think about it again.
.pkg). It launches the macOS installer.Time to meet the Terminal. Don't worry — it's just a window where you paste things.
username@your-mac ~ %. Leave this window open for the rest of the steps.Copy the line below, paste it into your Terminal window, press Enter. To paste in Terminal on a Mac, just use Cmd+V the way you would anywhere else.
npm install -g @anthropic-ai/claude-code
What you'll see next, in order:
npm warn lines about deprecated packages. These warnings are normal. Nothing is broken. They scroll past quickly.% prompt comes back on a fresh line. That means the install finished. The result will look something like this:If the prompt comes back without the word error in red anywhere, you're done with this step. If you DO see "error" in red, jump to the troubleshooting section below.
sudo npm install -g @anthropic-ai/claude-code — it'll prompt for your Mac password and install with admin privileges. (See troubleshooting below for cleaner long-term setups.)
Type the word below into Terminal and press Enter:
claude
On your first run, Claude Code shows a few setup screens before the chat opens. Roughly in this order:
After all the setup, the screen settles into something like this:
claude in any Terminal window and you're straight back in.
Claude Code is now waiting for input. Type something normal — not a "prompt," just a sentence — and press Enter:
What can you do that the chat at claude.ai can't?
Claude will reply right in your Terminal. You can keep typing follow-up messages. Now give it a real task that touches your Mac:
Make a folder called "claude-test" on my Desktop, and put a file in it called hello.txt that says "Hello, Claude."
Before Claude Code touches anything — creating a file, running a command, editing your work — it pauses and asks. The screen looks something like this:
Three rules for these prompts:
Pick Yes the first few times so you can see what happens. Switch to your Desktop. The folder and file appear. That's the part the web chat at claude.ai can't do.
claude, all permissions reset.
The path Anthropic now recommends. Native installer, no Node, no npm. Self-updates in the background.
Open Terminal (Cmd+Space, type terminal, Enter). Then paste:
curl -fsSL https://claude.ai/install.sh | bash
Hit Enter. You'll see a few download/install lines. When the % prompt comes back, the install is done.
brew install --cask claude-code instead. Same result. (Homebrew installs don't auto-update — run brew upgrade claude-code periodically.)
In the same Terminal window:
claude
First run opens your browser to sign in. Use the same Anthropic account you'd use at claude.ai. Approve, return to Terminal, and the chat prompt appears. From now on, just type claude in any Terminal window to start.
claude command. Pick the one that feels easier.
Anything that involves files, folders, or repetitive computer chores. A few starting ideas:
"Look at my Downloads folder. Move all the PDFs into a folder called 'pdfs', all the images into 'images', and tell me what's left."
"Open my draft.txt, fix the grammar, tighten the language, and save it as draft-v2.txt."
"Open expenses.csv, group rows by category, add a totals row at the bottom, and save it back."
"Look at the screenshots in my Desktop folder. Move ones from before 2025 into 'old-screenshots', and rename the rest by date."
"Write a 5-chapter outline for my book idea. Put each chapter in its own .md file in a folder called 'book'."
"Every time I save a file in my 'screenshots' folder, rename it from 'Screenshot 2026-04-28...' to today's date and move it into a dated subfolder."
Inside Claude Code, anything that starts with a slash is a command for the program (not a message to Claude). The handful below cover most of what you'll need on day one:
/helpShow every built-in command./clearStart a fresh conversation. Clears the current context so Claude isn't distracted by what you talked about earlier./costShow usage information for the current session./loginSign in again, or switch accounts./exitClose Claude Code. (Or just press Cmd+Q to quit Terminal entirely.)Before you type claude, you can move into a folder you want to work in. That folder becomes Claude's "working directory" — the place it'll create and edit files unless you tell it otherwise. Example:
cd Desktop/my-book-project
claude
Now Claude operates inside that folder. To go back up one level, type cd ... To go to your home folder, just type cd by itself. That's 90% of folder navigation.
cd — type cd (with trailing space), then drag the folder. Press Enter.
Node.js installed but Terminal didn't pick it up. Quit Terminal completely (Cmd+Q) and open it again. New Terminal windows see the new Node.js install; older ones don't. If that doesn't fix it, restart the Mac and try once more.
macOS doesn't let regular users write to /usr/local on some setups. The quick fix:
sudo npm install -g @anthropic-ai/claude-code. It'll prompt for your Mac password and use admin privileges to write the files.sudo again. One-line install on the nvm README.Almost always a network issue. Try these in order:
npm sometimes flakes.claude command works but won't sign inThe browser window from step 4 closed before you finished. Go back to Terminal, type claude again, and try the sign-in flow once more.
Install Node, open Terminal, paste one line, sign in, type a sentence. Welcome to Claude.
Start with Node.js →