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.
Developer Mac Setup Guide
Essential tools for macOS development—from package manager to editor
0Setup Overview
1Install Homebrew
Homebrew is the package manager for macOS. It simplifies installing and managing development tools, libraries, and applications through the command line.
Installation
/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:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
echo 'eval "$(/usr/local/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/usr/local/bin/brew shellenv)"
Verification
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
brew install git
Configuration
Set your identity for Git commits. Use your real name and the email associated with your GitHub account:
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
git config --global init.defaultBranch main
git config --global credential.helper osxkeychain
Verification
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
brew install node
This installs both Node.js and npm. The installation may take a few minutes.
Verification
node --version
npm --version
Expected: Node.js v18.x or higher, npm 9.x or higher
Optional: Update npm
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
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
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
Copy Public Key
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
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
brew install --cask visual-studio-code
Enable Command Line Tool
After installation, launch VS Code and enable the command line tool:
- Open VS Code from Applications or Spotlight
- Press ⌘ + Shift + P to open Command Palette
- Type "shell command" and select Shell Command: Install 'code' command in PATH
- Restart your terminal
Verification
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:
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
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
mkdir test-project && cd test-project
npm init -y
echo "console.log('Setup verified!');" > index.js
node index.js
code .