
How to Set up a Mac for Development
Last Updated: 9/23/2025
I have to set up a MacBook Pro fairly often - when starting a new job and when buying a new personal computer. I created this article back in 2015 when I got my first Mac and have been updating it ever since with whatever I need as my job evolves. I'm primarily a full-stack web developer, so most of my needs will revolve around JavaScript/Node.js.
Currently, this article has been updated to work for macOS 15 Sequoia.
Getting Started
The setup assistant will launch once you turn the computer on. Enter your language, time zone, Apple ID, and so on. The first thing you should do is update macOS to get the latest security updates and patches, then you can move on to the dev setup.
Here's what we'll do in this article:
- Install Homebrew, a package manager for macOS
- Install git
- Install iTerm2 (terminal), Chrome/Firefox (browser), Visual Studio Code (IDE), Postgres/psql (database), Docker, and other applications
- Install zsh and Oh My Zsh
- Set up zsh shortcuts
- Install Node Version Manager and npm (Node.js)
- Set up Git
- Set up SSH keys
- Change macOS default settings
- Set up VSCode
- Add browser extensions
Homebrew
Homebrew is a package manager that allows you to install almost any app from the command line.
Install Homebrew
Run this command to install Homebrew package manager.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Update Homebrew
Use brew update
to make sure everything is up to date.
brew update
Applications
You can use Homebrew to install more applications. Here are some of the applications I always install.
Note, do not install Node.js through Homebrew . Use nvm (instructions further along in this article).
Application | Purpose |
---|---|
Visual Studio Code | text editor |
Google Chrome | web browser |
Firefox | web browser |
Rectangle | window resizing |
iTerm2 | terminal |
Docker | development |
Discord | communication |
Slack | communication |
Spotify | music |
Postgres | database |
Postman | API tool |
Obsidian | Notes |
Todoist | Todos |
git | Version control |
Install Git
First, install git, which is a shell program, using brew install
.
brew install git
Install GUI Applications
Then use brew install --cask
to install any GUI applications.
Remove any of the apps on this list that you don't want, or that you already have installed.
You can also install them all individually, but if you use a \
at the end of each line you can do it all it one command.
brew install --cask \
visual-studio-code \
google-chrome \
firefox \
rectangle \
iterm2 \
docker \
discord \
slack \
spotify \
postgres \
obsidian \
todoist
zsh and Oh My Zsh
Catalina comes with zsh as the default shell. Install Oh My Zsh for sensible defaults.
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
How to set up zsh shortcuts
You can add shortcuts to your shell by going to ~/.zshrc
and using the alias
keyword.
Node.js
Use Node Version Manager (nvm) to install Node.js. This allows you to easily switch between Node versions, which is essential. (Installation through Homebrew is not supported). Node Version Manager also comes with an npm installation.
Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
Install the latest version of Node.
nvm install node
Restart terminal and run the final command.
nvm use node
Confirm that you are using the latest version of Node and npm.
node -v
npm -v
Update nvm
Run this command to update nvm when required.
nvm install node --reinstall-packages-from=node
Manage Node Versions
Use nvm install
to install a different version of Node.
nvm install xx.xx
Use nvm use
to use a different version of Node in your current terminal (this will only apply to the currently open terminal).
nvm use xx.xx
Use nvm alias default
to set the default, so all terminal windows open with the version you specify.
nvm alias default xx.xx
Git
You should now have git installed from the brew install git
command from the Homebrew section.
Configure Git
The first thing you should do with Git is set your global configuration.
First, make a github config file.
touch ~/.gitconfig
Input your config and create some aliases.
[user]
name = Your Name
email = your_email@example.com
[github]
user = your_github_username
[alias]
a = add
cm = commit -m
s = status
p = push
co = checkout
fp = fetch --prune --all
l = log --oneline --decorate --graph
[push]
autoSetupRemote = true
With the above aliases, I can run git s
instead of git status
, for example. It will also automatically set up your remote, so you can do git push
on a branch without specifying the upstream origin.
SSH
Generate an SSH key
You can generate an SSH key.
ssh-keygen -t ed25519 -C "your_email@example.com"
Start ssh-agent.
eval "$(ssh-agent -s)"
Add your key.
ssh-add --apple-use-keychain ~/.ssh/id_ed25519
Configure SSH
Simplify the process of sshing into other boxes with your SSH config file. Create ~/.ssh/config
if it does not already exist.
Add the following contents, changing the variables for any hosts that you connect to. Using the below will be the same as running ssh -i ~/.ssh/key.pem user@example.com
.
Host *
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_ed25519
Host myssh
HostName example.com
User user
IdentityFile ~/.ssh/key.pem
Now just run the alias to connect.
ssh myssh
macOS Settings
I don't like a lot of the Apple defaults so here are the things I always change.
Sidebar
To get the Home folder in the finder, press CMD + SHIFT + H
and drag the home folder to the sidebar.
General
- Make Google Chrome default browser
Dock
- Automatically hide and show Dock
- Show indicators for open applications
Keyboard
- Key Repeat -> Fast
- Delay Until Repeat -> Short
- Disable "Correct spelling automatically"
- Disable "Capitalize words automatically"
- Disable "Add period with double-space"
- Disable "Use smart quotes and dashes"
Security and Privacy
- Allow apps downloaded from App Store and identified developers
- Turn FileVault On (makes sure SSD is securely encrypted)
Sharing
- Change computer name
- Make sure all file sharing is disabled
Users & Groups
- Add "Rectangle" to Login items
- Add any other applications to Login items
Defaults
Here are a few more commands to change some defaults.
# Show Library folder
chflags nohidden ~/Library
# Show hidden files
defaults write com.apple.finder AppleShowAllFiles YES
# Show path bar
defaults write com.apple.finder ShowPathbar -bool true
# Show status bar
defaults write com.apple.finder ShowStatusBar -bool true
# Prevent left and right swipe through history in Chrome
defaults write com.google.Chrome AppleEnableSwipeNavigateWithScrolls -bool false
Application Settings
Chrome
- Install uBlock Origin Lite
- Install React DevTools
- Install Redux DevTools
- Settings -> Set theme to "Dark"
- Import your bookmarks
Visual Studio Code
If you've logged into VS Code have previous settings you want to move over, you can use "Backup and Sync Settings".
Use code
to open VSCode
Press CMD + SHIFT + P
and click "Install code command in PATH".
Now you can use code {file}
to open any file in VSCode.
Additional Settings
I have my keyboard shortcuts and settings JSON saved in this Dotfiles repo.
Extensions
- Install GitLens
- Install Highlight Matching Tag
- Install ESLint
- Install Prettier
- Install Jest
- Install Jest Runner
Rectangle
- Full Screen:
CMD + SHIFT + '
(prevents messing with other commands) - Left Half:
CMD + OPTION + LEFT
- Right Half:
CMD + OPTION + RIGHT
iTerm2
For some reason, iTerm2 does not let you use ā„
+ ā
and ā
to tab through words in the terminal by default. I found this article to fix it: Use ā„ā and ā„ā to jump forwards / backwards
- Go to Profiles -> Keys:
- Change
ā„ā
via "Send Escape Sequence" withb
- Change
ā„ā
via "Send Escape Sequence" withf
- Change
Conclusion
That sums it up for my current preferences on setting up a MacBook Pro. I hope it helped speed up your process or gave you ideas for the next time you're setting one up.
Comments