02

Lesson 2 of 12

Installing Homebrew & Core Tools

Install Homebrew — the Mac package manager — then use it to install Git, the GitHub CLI, and other developer essentials in one go.

~15 min·Mac
02 / 12Installing Homebrew & Core Tools

First: open your terminal

Press ⌘ + Space, type Terminal, and press Enter. This opens the built-in macOS terminal. We'll upgrade to Ghostty later — for now the default is fine.

Step 1: Install Xcode Command Line Tools

Before anything else, your Mac needs the basic developer toolchain. Run:

xcode-select --install

A pop-up will appear. Click Install and wait for it to finish (a few minutes). This gives your Mac the compilers and system libraries many other tools depend on.

Step 2: Install Homebrew

Homebrew describes itself as "the missing package manager for macOS." Paste this into your terminal and press Enter:

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

It will ask for your Mac password (you won't see the characters as you type — that's normal). The install takes 2–5 minutes.

Apple Silicon Macs (M1/M2/M3/M4)

If you have a newer Mac with an Apple chip, after Homebrew installs run this to add it to your PATH:

echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile && eval "$(/opt/homebrew/bin/brew shellenv)"

Verify it worked:

brew --version

Step 3: Install core developer tools

Now use Homebrew to install everything you need in one command:

brew update
brew install git gh jq ripgrep

What each one does:

  • git — version control (tracks changes to your code)
  • gh — the official GitHub CLI (create repos, manage PRs from the terminal)
  • jq — processes JSON data (used by Claude Code's statusline and scripts)
  • ripgrep (rg) — a super-fast code search tool

Step 4: Install Bun

Bun is a fast JavaScript runtime and package manager. It replaces npm/yarn for this setup:

curl -fsSL https://bun.sh/install | bash

After it installs, close and reopen your terminal window, then verify:

bun --version

Step 5: Verify everything

Run each of these and confirm you get a version number back:

git --version
gh --version
jq --version
bun --version

If any of them fail, re-run the install step for that tool.

Keeping tools up to date

To update all your Homebrew tools at once, run brew update && brew upgrade. Do this every few weeks to stay current.

In the next lesson we'll install Ghostty — a much better terminal than the default Mac one.

Knowledge Check

Answer all questions to mark this lesson complete.

Q1What is Homebrew?

Q2What command verifies that a tool is installed correctly?

What is Vibe Coding?
Setting Up Ghostty Terminal