Mac Dev Setup

Build your development environment step by step

1

Install Homebrew

Homebrew is the package manager for macOS. It lets you install development tools from the command line.

Run this command
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Verify installation
brew --version

Expected output: Homebrew 4.x.x

2

Install and Configure Git

Git is version control. You'll use it to track changes in your code and collaborate with others.

Install Git
brew install git
Set your name
git config --global user.name "Your Name"
Set your email
git config --global user.email "you@example.com"
Set default branch name
git config --global init.defaultBranch main
Verify configuration
git config --list

Expected: Your name, email, and init.defaultbranch=main

3

Install Node.js via nvm

Node Version Manager (nvm) lets you install and switch between multiple Node.js versions. Install nvm first, then use it to install Node.js.

Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
Important

Close and reopen your terminal, or run this to reload your shell:

source ~/.zshrc
Install Node.js LTS
nvm install --lts
Verify installation
node --version && npm --version

Expected: Node version (v20.x.x) and npm version (10.x.x)

4

Generate SSH Keys

SSH keys let you authenticate to GitHub and GitLab without typing your password every time. Generate a key pair, then add the public key to your account.

Generate SSH key
ssh-keygen -t ed25519 -C "you@example.com"

Press Enter to accept the default file location. Enter a passphrase when prompted (or press Enter for no passphrase).

Start SSH agent
eval "$(ssh-agent -s)"
Add key to agent
ssh-add ~/.ssh/id_ed25519
Copy public key to clipboard
pbcopy < ~/.ssh/id_ed25519.pub

Your public key is now in your clipboard. Go to GitHub Settings → SSH Keys → New SSH Key and paste it.

5

Install VS Code

Visual Studio Code is a powerful code editor. Install it via Homebrew, then add essential extensions.

Install VS Code
brew install --cask visual-studio-code
Add code command to PATH

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

Verify installation
code --version

Expected: VS Code version number (1.x.x)

Recommended extensions
  • ESLint — JavaScript linting
  • Prettier — Code formatting
  • GitLens — Enhanced Git integration
  • Live Server — Local development server
  • Path Intellisense — Autocomplete file paths

Install from the Extensions panel (Cmd+Shift+X) or via command line with code --install-extension [extension-id]