Module 3 · Page 3 of 9

Install on macOS

Every command on this page runs in Terminal, using Homebrew to install most of the seven tools from the previous page. Follow it top to bottom — some steps depend on the one before it finishing first. (On Windows? Skip to the Windows walkthrough instead.)

Installation instructions

Follow the following step in sequence.

Step 1: Find Your Terminal

A computer terminal is a plain text window where you type direct commands to your computer using a keyboard, instead of clicking pictures, buttons, or icons with a mouse. It is like a direct text-only chat room with the core of your machine.

Press Cmd + Space to open Spotlight, type Terminal, and press Enter. You'll see a prompt that looks something like yourname@MacBook ~ %. ~ is shorthand for your home folder — it shows where you currently are. % marks the end of the prompt — that's where you type.

A macOS Terminal window showing the prompt xlong8@XIAOYANG-LONG-MacBook-Pro ~ % with the cursor ready for input.
A real Terminal window. Yours will show your own username and computer name instead. (The (base) prefix shown here comes from Miniconda, which you haven't installed yet — don't worry if your prompt doesn't have it at this point in the page.)
To do this Do this
Run a command Type it, then press Enter
Cancel whatever is running Ctrl + C
Copy Cmd + C
Paste Cmd + V
Clear the screen Cmd + K
Recall your last command Up arrow

Step 2: Xcode Command Line Tools

This step installs a small set of developer utilities (about 740 MB) — not the full Xcode app (10+ GB). You don't need Xcode itself for this course. Copy and paste the following text into your terminal and click enter.

xcode-select --install

A dialog box will walk you through the rest. Verify once it's done by entering:

xcode-select -p

A file path means it's installed; an error means the install above hasn't finished yet.

Step 3: Homebrew

Homebrew is a very popular tool for downloading software packages on Mac. Once it is installed, you can install other packages like Node.js, VS Code, etc., through a single terminal command, without having to go to their respective official websites.

The install command below also lives on Homebrew's own website, brew.sh:

The Homebrew homepage at brew.sh, showing the tagline 'The Package Manager for Everywhere' and the install command in a terminal-style box: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Homebrew's homepage at brew.sh, with the same install command shown below.

Open your terminal, copy and paste the following command, press enter:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

You will now be prompted to enter your computer password. Keep in mind that nothing will appear on the screen while you type---this is normal and a safety measure. Press enter when you are done.

Additional step for Apple Silicon Macs (M1 or later), Homebrew installs to /opt/homebrew, which isn't on your PATH by default. Run these two lines once, exactly as shown, to fix that:

echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
source ~/.zprofile
Tip Not sure which chip your Mac has? Click the Apple menu in the top-left corner → About This Mac. Look for the line labeled "Chip" — if it says Apple M1, M2, M3, or similar, you're on Apple Silicon and the step above applies to you. If it says Intel, skip it.

Verify:

brew doctor
brew --version

brew doctor should say "Your system is ready to brew."

Step 4: Node.js, Pandoc, VS Code, and Miniconda — all at once

With Homebrew in place, most of the remaining list is one command. Command-line tools install plainly; applications with a window (VS Code, Miniconda) install as --cask:

brew install node pandoc
brew install --cask visual-studio-code miniconda

(If you already installed VS Code in a previous session, you can skip it. Run brew install --cask miniconda instead of the second line above, then verify with code --version.)

Verify each one:

node --version
npm --version
pandoc --version
code --version

(Miniconda's own conda --version check comes later, once it's initialized below — running it now, before that step, won't work yet.)

Step 5: Claude Code

Install it with:

npm install -g @anthropic-ai/claude-code

Verify:

claude --version

Step 6: Finish Python setup

Conda needs a one-time step to hook itself into your shell:

conda init zsh

Close Terminal and reopen it. Your prompt should now start with (base) — that means conda is active. Verify:

conda --version
python --version

Step 7: Confirm everything

In a fresh Terminal window, run all of these. Each should print a version number:

node --version
npm --version
conda --version
python --version
pandoc --version
code --version
claude --version

macOS: frequently asked questions

macOS says an installer is from an "unidentified developer" — what do I do?
Go to System Settings → Privacy & Security and click "Open Anyway" next to the blocked item.

Homebrew is installing very slowly.
This is usually just a slow connection to GitHub. Let it finish rather than restarting partway through — restarting usually makes it slower, not faster.

Terminal asked for my Mac password during an install — is that normal?
Yes. Several of these installers need permission to make system-level changes, so a password prompt partway through is expected, not a sign something went wrong.

A command says "not found" right after I installed it.
Close Terminal and reopen it. Installers update your PATH, but a Terminal window that was already open won't see the change.

Next · Page 5 of 9
Log in to Claude Code
→