Mac Development Environment Setup

Revision 1.0 • Last Updated November 2026

Homebrew Package Manager

Homebrew is the de facto package manager for macOS. It simplifies the installation and management of development tools and libraries.

1.1 Installation

Run the official installation script from the terminal:

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

The script will prompt for your password and explain what changes it will make before proceeding.

1.2 Path Configuration

Add Homebrew to your PATH. For Apple Silicon Macs (M1/M2/M3):

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

For Intel Macs:

echo 'eval "$(/usr/local/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/usr/local/bin/brew shellenv)"

1.3 Verification

Confirm Homebrew is installed correctly:

brew --version

Expected output: Homebrew 4.x.x

Git Version Control

Git enables version control and collaboration. Modern macOS includes Git via Xcode Command Line Tools.

2.1 Installation

Install Xcode Command Line Tools (includes Git):

xcode-select --install

A software update popup will appear. Click "Install" and accept the license agreement.

2.2 Configuration

Set your identity for commit attribution:

git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"

Set the default branch name:

git config --global init.defaultBranch main

2.3 Verification

Check Git version and configuration:

git --version
git config --global --list

Expected output: git version 2.x.x and your configured name and email

Node.js Runtime

Node.js is a JavaScript runtime built on Chrome's V8 engine. Essential for modern web development and many developer tools.

3.1 Installation

Install Node.js via Homebrew:

brew install node

This installs both Node.js and npm (Node Package Manager).

3.2 Configuration

Set npm to use a global directory you own (avoids permission issues):

mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.zprofile
source ~/.zprofile

3.3 Verification

Confirm Node.js and npm are working:

node --version
npm --version

Expected output: v20.x.x or higher for Node, 10.x.x or higher for npm

SSH Keys

SSH keys provide secure authentication to remote servers and services like GitHub, GitLab, and cloud providers.

4.1 Generation

Generate a new ED25519 SSH key pair:

ssh-keygen -t ed25519 -C "your.email@example.com"

When prompted for a file location, press Enter to accept the default. You may optionally set a passphrase for additional security.

4.2 SSH Agent

Start the SSH agent and add your key:

eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519

4.3 Public Key Export

Copy your public key to the clipboard:

pbcopy < ~/.ssh/id_ed25519.pub

Your public key is now in the clipboard. Add it to GitHub, GitLab, or your preferred git hosting service.

4.4 Verification

Verify SSH key was created:

ls -la ~/.ssh/id_ed25519*

Expected output: Two files listed: id_ed25519 (private) and id_ed25519.pub (public)

Visual Studio Code

VS Code is a lightweight but powerful source code editor with excellent language support and extension ecosystem.

5.1 Installation

Install VS Code via Homebrew Cask:

brew install --cask visual-studio-code

5.2 Command Line Tool

Enable the code command in your terminal:

Open VS Code, press Cmd+Shift+P, type "shell command", and select "Shell Command: Install 'code' command in PATH".

5.3 Recommended Extensions

Install essential extensions from the terminal:

code --install-extension dbaeumer.vscode-eslint
code --install-extension esbenp.prettier-vscode
code --install-extension eamodio.gitlens

5.4 Verification

Confirm VS Code is accessible from the terminal:

code --version

Expected output: Version number (e.g., 1.x.x)