Set Up a New Mac for Development

Install Xcode Command Line Tools and Homebrew, then use Homebrew to pull in the rest of your developer toolkit.

beginner12 minmacosUpdated August 2026
#macos#homebrew#xcode#developer-setup

Requirements

  • Admin access on your Mac
  • Terminal (Applications → Utilities → Terminal)
0/4 steps · 0%
01

Install Xcode Command Line Tools

These provide git, make, a C compiler, and other tools that Homebrew and most dev tooling expect to exist.

bash
$ xcode-select --install

A dialog will pop up — click Install and wait for it to finish (it can take several minutes).

Note

If you get "command line tools are already installed", you're already set — move on to Step 2.

02

Install Homebrew

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

Important

On Apple Silicon Macs, the installer prints a command to add Homebrew to your PATH — copy and run it (it appends a line to ~/.zprofile). Without it, your shell won't find brew.

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

Verify Homebrew

bash
$ brew doctor

Expected output

Your system is ready to brew.

Warnings here are usually informational — only act on lines that say something is actually broken.

04

Install your core toolkit

Install whatever your projects actually need. A common baseline:

bash
$ brew install git node python

Success

Your Mac now has a compiler toolchain, a package manager, and the runtimes most projects need.

Troubleshooting

On Apple Silicon, Homebrew installs to `/opt/homebrew`, which isn't on PATH by default — the installer's PATH step was skipped or the terminal wasn't restarted.

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