You just got a Mac. Someone told you that you can build apps, websites, and cool things with code. This guide will get you there — step by step, no experience needed.
The Terminal is your direct line to your computer's brain. Every developer uses it. Let's open it.
✓ Chapter complete
Open Terminal
Terminal is already on your Mac. You just need to find it.
required
💡
Press ⌘ + Space to open Spotlight, type "Terminal", and hit Enter. That's it — you're in.
Terminal
$█
What you should see
A window with a blinking cursor. You might see your username followed by a $ or % sign. That's your prompt — it means the terminal is ready for your commands.
You opened a command-line interface (CLI). Instead of clicking buttons and icons, you type commands. It might feel old-school, but it's actually faster and more powerful than any graphical interface once you get the hang of it. Every app you've ever used was built by someone who typed commands in something just like this.
Run your first command
Let's make sure everything works by asking your Mac who you are.
required
Terminal
$whoami
Expected output
yourusername
This will print your Mac username. If you see text appear, you're doing great.
whoami is a real command that asks your computer "who is the current user?" It's one of the simplest commands. You typed something, the computer answered. That's the whole pattern: you type, it responds. Every command you'll learn works this way.
Chapter 2
Xcode Command Line Tools
Before you can build anything, your Mac needs some basic developer tools. Apple provides these for free.
✓ Chapter complete
Install Xcode Command Line Tools
This installs compilers, Git, and other foundational tools your Mac needs to build software.
required
Terminal
$xcode-select --install
What happens next
A popup window will appear asking you to install the tools. Click "Install" and then "Agree" to the license. This can take 5-10 minutes.
If you see "xcode-select: error: command line tools are already installed" — you're all set! Skip ahead.
⚠️
Be patient. This download can be large (~1-2 GB). Stay connected to Wi-Fi and don't close the terminal while it's working.
Xcode Command Line Tools are like the foundation of a house. They include a C compiler (which turns code into programs your computer can run), Git (for tracking changes to your code), and other essentials. You don't need the full Xcode app (which is huge) — just these tools. Almost everything you install from here on depends on these being here.
Verify the installation
Let's make sure everything installed correctly.
required
Terminal
$xcode-select -p
Expected output
/Library/Developer/CommandLineTools
If you see this path, you're good to go!
Chapter 3
Homebrew — Your Mac's Missing Package Manager
Think of Homebrew as an app store for developer tools. Instead of searching the web and downloading installers, you just type one command.
✓ Chapter complete
Install Homebrew
One command and you'll have access to thousands of developer tools.
==> This script will install:
/opt/homebrew/bin/brew
/opt/homebrew/share/...
It will ask for your password (your Mac login password).
When you type it, nothing will appear on screen — that's normal! Just type it and press Enter.
This takes 2-5 minutes.
🔐
Password tip: When the terminal asks for your password, the cursor won't move and no dots or stars will appear. This is a security feature — just type your password and press Enter.
You just installed Homebrew — the most popular package manager for macOS. A package manager is like an app store that runs in your terminal. Instead of going to a website, downloading a .dmg file, and dragging it to Applications, you'll just type brew install [thing]. It handles downloading, installing, updating, and removing tools for you. Over 90% of Mac developers use it.
Add Homebrew to your PATH
Tell your terminal where to find Homebrew. This step is critical on Apple Silicon Macs.
No output means success! Silence is golden in the terminal.
💡
Heads up: If the Homebrew installer already showed you these exact commands at the end, it means it handled this for you. Run the verify step below to check.
Your terminal needs to know where Homebrew lives on your computer. The PATH is like a list of folders your terminal checks when you type a command. We just added Homebrew's folder to that list. The >> ~/.zprofile part saves it permanently so it works every time you open a new terminal.
Verify Homebrew works
Let's confirm everything is set up correctly.
required
Terminal
$brew --version
Expected output
Homebrew 4.x.x
You should see a version number. If you see "command not found", go back to the previous step.
Chapter 4
Core Developer Tools
Now that you have Homebrew, let's install the big three: Git (version control), Node.js (JavaScript), and Python.
✓ Chapter complete
Install Git
Git tracks every change you make to your code. It's like an infinite undo button for your entire project.
required
Terminal
$brew install git
Expected output
==> Downloading...
==> Installing git
==> Pouring git...
✓ /opt/homebrew/Cellar/git/2.x.x
If it says "already installed" — great, move on!
Git is the most important tool in a developer's toolkit. It tracks every change you make, lets you go back in time, and lets multiple people work on the same project without stepping on each other's toes. Every company, every open-source project, every developer uses Git. You'll use it every day.
Configure Git with your identity
Tell Git who you are so your work is credited to you.
required
Terminal — replace with YOUR name and email
$git config --global user.name "Your Name"
$git config --global user.email "your@email.com"
Important
Replace "Your Name" and "your@email.com" with your actual name and email!
Use the same email you'll use for GitHub (coming in Chapter 7).
Install Node.js
Node.js lets you run JavaScript outside the browser — it powers most modern web development.
required
Terminal
$brew install node
✓ Verify it worked
Run node --version — you should see something like v22.x.x
Node.js is a JavaScript runtime. JavaScript was originally only for web browsers, but Node.js lets you run it anywhere — servers, command-line tools, desktop apps. When you installed Node, you also got npm (Node Package Manager), which is like Homebrew but specifically for JavaScript libraries. Most web frameworks (React, Next.js, Vue) need Node to work.
Verify Python
macOS comes with Python. Let's make sure it's there and up to date.
required
Terminal
$python3 --version
Expected output
Python 3.x.x
If you don't see this, install it: brew install python
Python is one of the most popular programming languages in the world. It's used for AI/ML, data science, web backends, automation, and much more. macOS includes Python 3 via Xcode Command Line Tools. The command python3 (not python) is the correct way to run it on macOS.
Chapter 5
Make Your Terminal Beautiful
You're going to spend a lot of time in the terminal. Let's make it look amazing and work smarter with Oh My Zsh.
✓ Chapter complete
Upgrade Your Terminal with iTerm2
The built-in Terminal app works, but iTerm2 is what most developers actually use. It's free and dramatically better.
recommended
Terminal
$brew install --cask iterm2
After install
Open iTerm2 from your Applications folder (or Spotlight: ⌘ + Space → type "iTerm"). From now on, use iTerm2 instead of Terminal.
💡
Why switch? iTerm2 has split panes (multiple terminals in one window), better search, hotkey windows you can summon from anywhere, autocomplete, paste history, and GPU-accelerated rendering. It's the industry standard terminal for macOS developers.
iTerm2 is a free, open-source terminal emulator for macOS. The built-in Terminal app is fine for basics, but iTerm2 adds features that make a real difference when you're spending hours in the command line: split panes (Cmd+D for vertical, Cmd+Shift+D for horizontal), hotkey window (a terminal that drops down with a keypress), search (Cmd+F to search terminal output), and profiles (different color schemes and settings for different projects). It runs the same shell (zsh) — it's just a better window for it.
Install Oh My Zsh
A framework that makes your terminal colorful, adds autocompletions, and gives you superpowers.
__ __
____ / /_ ____ ___ __ __ ____ _____/ /_
/ __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \
/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / /
\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/
/____/
Your terminal just got a major upgrade! It might ask if you want to set Zsh as your default shell — say yes.
Oh My Zsh is a community-driven framework for managing your Zsh shell configuration. Zsh is the shell (command processor) that macOS uses by default. Oh My Zsh adds: themes (make your prompt look great), plugins (add superpowers like auto-suggestions and syntax highlighting), and aliases (shortcuts for long commands). Over 2 million developers use it.
Install useful plugins
Auto-suggestions and syntax highlighting will change your life in the terminal.
Add these lines to the end of your ~/.zshrc file:
source $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zshsource $(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
Then run: source ~/.zshrc
✨
Auto-suggestions will show previous commands in grey as you type — press the → arrow key to accept. Syntax highlighting colors your commands green when valid and red when there's a typo.
Chapter 6
Your Code Editors
You need a place to write and edit code files. We'll install Cursor as your primary AI-powered editor, plus VS Code as a solid backup.
✓ Chapter complete
Install Cursor (Primary IDE)
Cursor is an AI-first code editor built on VS Code — like VS Code with AI superpowers baked in.
required
Terminal
$brew install --cask cursor
What happens
Homebrew downloads Cursor and installs it in your Applications folder.
Cursor supports all VS Code extensions, themes, and keybindings — so you get the entire VS Code ecosystem plus built-in AI.
Cursor is built on VS Code but adds AI directly into the editing experience — inline code generation, an AI chat panel that understands your entire codebase, and smart autocomplete. It's the fastest way to go from idea to working code. All your VS Code extensions, themes, and settings work in Cursor too.
Install VS Code (backup editor)
The industry-standard editor — great to have as a backup and widely used in tutorials.
recommended
Terminal
$brew install --cask visual-studio-code
Enable terminal commands for your editors
Open files and folders from the terminal with cursor . or code .
recommended
📝
For Cursor:
1. Open Cursor from your Applications folder
2. Press ⌘ + Shift + P to open the Command Palette
3. Type "shell command"
4. Select "Shell Command: Install 'cursor' command in PATH"
📝
For VS Code: Same steps but in VS Code — installs the code command.
✓ Verify it worked
Open a new terminal and run cursor . — Cursor should open with the current folder.
🚀
Want a full breakdown of all the best editors and AI coding tools? Check out the Tools & IDEs page.
Chapter 7
GitHub — Your Code's Home in the Cloud
GitHub is where developers store, share, and collaborate on code. Think of it as Google Drive for code, but way more powerful.
✓ Chapter complete
Create a GitHub account
If you don't have one yet, sign up — it's free.
required
🌐
Go to github.com/signup and create your account. Pick a username you'll be proud of — it becomes part of your developer identity.
💡
Pro tip: Use the same email address you used for git config in Chapter 4. This links your commits to your GitHub profile.
Install the GitHub CLI
The GitHub CLI lets you do GitHub things right from your terminal — no browser needed.
required
Terminal
$brew install gh
Log in to GitHub from your terminal
Connect your terminal to your GitHub account with a browser-based login.
required
Terminal
$gh auth login
Follow these prompts
? What account do you want to log into? GitHub.com? What is your preferred protocol? HTTPS? Authenticate Git with your GitHub credentials? Yes? How would you like to authenticate? Login with a web browser
It will give you a code. Copy it, press Enter, paste it in the browser, and authorize.
✓ Verify it worked
Run gh auth status — you should see your username and "Logged in to github.com".
Chapter 8
SSH Keys — Your Secure Identity
SSH keys let your computer talk to GitHub securely without typing your password every time. Set it up once, forget about it forever.
✓ Chapter complete
Generate your SSH key
Create a unique cryptographic key pair that identifies your computer.
recommended
Terminal — use YOUR email
$ssh-keygen -t ed25519 -C "your@email.com"
What you'll see
It will ask:
Enter file in which to save the key: Just press Enter (use default)
Enter passphrase: Press Enter for no passphrase (or type one for extra security)
Enter same passphrase again: Press Enter
You'll see a "randomart image" — that means it worked!
You just created two files: a private key (stays on your computer, never share it) and a public key (you give this to services like GitHub). It's like a lock and key system — you give GitHub the lock (public key), and only your computer has the key (private key) that opens it. ed25519 is the type of encryption — it's modern and very secure.
Add your SSH key to the agent
Start the SSH agent and add your key so your computer remembers it.
Give GitHub your public key so it knows to trust your computer.
recommended
Terminal — copy your public key
$pbcopy < ~/.ssh/id_ed25519.pub
Your key is now copied! Now add it to GitHub:
1. Go to github.com/settings/keys
2. Click "New SSH Key"
3. Title: My Mac (or whatever you want)
4. Key type: Authentication Key
5. Paste your key (⌘+V) and click "Add SSH Key"
pbcopy is a macOS command that copies text to your clipboard — like pressing ⌘+C, but from the terminal. The < symbol feeds the file contents into pbcopy. So this command copied your public key to your clipboard. The .pub file is safe to share — it's the "lock." Your private key (without .pub) should never leave your computer.
Test your SSH connection
Make sure GitHub recognizes your computer.
recommended
Terminal
$ssh -T git@github.com
Expected output
It might ask "Are you sure you want to continue connecting?" — type yes
Then you should see:
Hi yourusername! You've successfully authenticated, but GitHub does not provide shell access.
That message means it worked perfectly!
Chapter 9
Claude Code — Your AI Pair Programmer
Claude Code is an AI assistant that lives in your terminal. It can write code, fix bugs, create projects, and explain anything — like having a senior developer sitting next to you.
✓ Chapter complete
Install Claude Code
One command to install the most powerful AI coding assistant.
required
Terminal
$npm install -g @anthropic-ai/claude-code
Expected output
added 1 package in Xs
The -g flag means "global" — it installs Claude Code so you can use it from anywhere, not just one folder.
Authenticate Claude Code
Log in so Claude Code knows who you are.
required
Terminal
$claude
What happens
The first time you run claude, it will open a browser window for you to sign in with your Anthropic account.
Follow the prompts to authenticate, and you're all set!
If you don't have an Anthropic account, you'll need to create one at console.anthropic.com
🚀
You now have an AI pair programmer. Just type claude in any project folder and start asking it to do things — "create a website", "fix this bug", "explain this code". It reads your files, understands your project, and writes code for you.
Chapter 10
Build Something!
You've got all the tools. Let's put them together and create your first project — a real GitHub repository with real code.
✓ Chapter complete
Create your first project folder
Make a home for your projects and create your first one.
let's go
Terminal
$mkdir -p ~/projects/my-first-app && cd ~/projects/my-first-app
What this does
mkdir -p creates folders (and any parent folders that don't exist).
~/projects is a "projects" folder in your home directory.
cd moves you into the new folder.
The ~ symbol means your home folder (/Users/yourusername)
Initialize a Git repo and push to GitHub
Create a local Git repo and publish it to GitHub — all in one command.
✓ Created a Git repository
✓ Named the default branch "main"
✓ Created a README file
✓ Made your first commit
✓ Created a public repo on GitHub
✓ Pushed your code to GitHub
Go check github.com/yourusername/my-first-app — your code is live!
Build something with Claude Code
Now for the magic. Let Claude Code build you a website in seconds.
the fun part
Terminal
$claude
Try saying something like
"Build me a personal website with my name, a short bio, and links to my GitHub. Make it look modern and beautiful."
Claude will:
1. Create the HTML, CSS, and JavaScript files
2. Show you what it's doing and why
3. Let you preview the result
Then push it to GitHub:git add . && git commit -m "Add personal website" && git push
🎉
Congratulations! You've gone from unboxing a Mac to building and deploying a project with an AI assistant. You're now part of the developer community. Keep building, keep experimenting, and don't be afraid to break things — that's how everyone learns.
You Did It!
Your Mac is now a fully-equipped development machine. You've installed everything a professional developer uses. The only thing left to do? Build something amazing.