0Setup Overview

This guide walks through installing and configuring the essential tools for Mac development. Complete each section in order, checking off steps as you go. Each tool builds on the previous ones, creating a complete development environment.

Before you begin: Ensure you're running macOS 11 (Big Sur) or later, and have administrator access to your Mac. Each section includes verification commands to confirm successful installation.

1Install Homebrew

Homebrew is the package manager for macOS. It simplifies installing and managing development tools, libraries, and applications through the command line.

Installation

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

The installer will prompt for your password and explain what it will install. Follow the on-screen instructions. After installation completes, you may need to add Homebrew to your PATH:

Add Homebrew to PATH (Apple Silicon Macs)
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
Add Homebrew to PATH (Intel Macs)
echo 'eval "$(/usr/local/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/usr/local/bin/brew shellenv)"

Verification

Verify installation
brew --version

Expected output: Homebrew 4.x.x or higher

2Install and Configure Git

Git is the distributed version control system used for tracking changes in source code. It's essential for collaborating on projects and managing your code history.

Installation

Install Git via Homebrew
brew install git

Configuration

Set your identity for Git commits. Use your real name and the email associated with your GitHub account:

Configure user identity
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
Set default branch name
git config --global init.defaultBranch main
Enable credential storage
git config --global credential.helper osxkeychain

Verification

Verify installation and configuration
git --version
git config --global --list

Expected: Git version 2.x or higher, and your name/email listed in config

3Install Node.js and npm

Node.js is a JavaScript runtime built on Chrome's V8 engine. It includes npm (Node Package Manager), which manages JavaScript libraries and tools for your projects.

Installation

Install Node.js via Homebrew
brew install node

This installs both Node.js and npm. The installation may take a few minutes.

Verification

Verify Node.js and npm installation
node --version
npm --version

Expected: Node.js v18.x or higher, npm 9.x or higher

Optional: Update npm

Update npm to latest version
npm install -g npm@latest

4Generate SSH Keys

SSH keys provide a secure way to authenticate with Git hosting services like GitHub, GitLab, and Bitbucket without entering your password each time.

Generate New SSH Key

Generate SSH key with Ed25519 algorithm
ssh-keygen -t ed25519 -C "your.email@example.com"

When prompted, press Enter to accept the default file location (~/.ssh/id_ed25519). Enter a secure passphrase when asked, or press Enter for no passphrase.

Start SSH Agent and Add Key

Start SSH agent in background
eval "$(ssh-agent -s)"
Add SSH key to agent
ssh-add ~/.ssh/id_ed25519

Copy Public Key

Copy public key to clipboard
pbcopy < ~/.ssh/id_ed25519.pub

Your public key is now copied. Add it to your GitHub account at Settings → SSH and GPG keys → New SSH key. Paste the key and give it a descriptive title (e.g., "MacBook Pro").

Verification

Test GitHub SSH connection
ssh -T git@github.com

Expected: "Hi username! You've successfully authenticated..."

5Install VS Code

Visual Studio Code is a lightweight but powerful source code editor. It includes built-in support for JavaScript, TypeScript, Node.js, and has a rich extension ecosystem for other languages.

Installation

Install VS Code via Homebrew
brew install --cask visual-studio-code

Enable Command Line Tool

After installation, launch VS Code and enable the command line tool:

  1. Open VS Code from Applications or Spotlight
  2. Press ⌘ + Shift + P to open Command Palette
  3. Type "shell command" and select Shell Command: Install 'code' command in PATH
  4. Restart your terminal

Verification

Verify code command works
code --version

Expected: Version number (e.g., 1.85.0)

Recommended Extensions

Install these extensions via the command line or through VS Code's Extensions panel:

Install essential extensions
code --install-extension dbaeumer.vscode-eslint
code --install-extension esbenp.prettier-vscode
code --install-extension eamodio.gitlens
code --install-extension ms-vscode.vscode-typescript-next
ESLint Integrates ESLint JavaScript linting
Prettier Code formatter for consistent style
GitLens Supercharges Git capabilities in VS Code
TypeScript Latest TypeScript language features

Setup Complete

You now have a complete Mac development environment with:

  • Homebrew for package management
  • Git for version control
  • Node.js and npm for JavaScript development
  • SSH keys for secure authentication
  • VS Code with essential extensions
Next steps: Create a test project to verify everything works together. Try cloning a repository, installing dependencies with npm, and opening the project in VS Code.
Quick test: Create and run a Node.js project
mkdir test-project && cd test-project
npm init -y
echo "console.log('Setup verified!');" > index.js
node index.js
code .