How to Set Up a Mac for Software Development
When I started using Mac computers for web development back in 2017, my setup was much different. Over the years, I’ve added tools and tweaked my process to make it more efficient. Here’s my setup for getting a new Mac ready for (mostly web) development.
Install Homebrew
Homebrew is a package manager for macOS. It lets you easily install software and tools you’ll need for development. To install it, open Terminal and run this command:
1/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Before you install anything with Homebrew, you should always make sure it’s up to date:
1brew update
Install Applications
These are the main tools I use for development, communication and productivity:
Visual Studio Code (VS Code)
A code editor with many extensions to make coding easier.
1brew install --cask visual-studio-code
Firefox
A browser that’s great for testing websites, especially with developer-focused add-ons.
1brew install --cask firefox
Google Chrome
Another must-have browser for testing and debugging web applications.
1brew install --cask google-chrome
Docker
For creating and running applications inside lightweight containers, which mimic real server environments.
1brew install --cask docker
Postman
A tool for testing APIs. You can send requests and check responses without writing extra code.
1brew install --cask postman
Postgres
A powerful database system. Install it if your projects require working with databases.
1brew install postgresql
Slack
Used for team communication. It keeps conversations, files, and updates in one place.
1brew install --cask slack
Obsidian
A note-taking app perfect for organizing your ideas and project plans.
1brew install --cask obsidian
Termius
A terminal app for managing SSH connections. It’s helpful when working with remote servers.
1brew install --cask termius
Onyx
Onyx is a free utility that offers a wide range of cleaning and optimization options.
1brew install --cask onyx
AppCleaner
AppCleaner is a lightweight utility that helps remove all app related files when removing and app.
1brew install --cask appcleaner
Configure My Shell
For a better experience, I use Oh My Zsh, a framework for managing the shell.
To install it, run:
1sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Oh My Zsh comes with tons of plugins, the ones I use are zsh-syntax-highlighting and zsh-autosuggestions.
1brew install zsh-syntax-highlighting
2brew install zsh-
3
4echo "source $(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
5
6echo "source $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
Set Up SSH
SSH keys are essential for securely connecting to remote servers and services like GitHub.
Generate SSH Key
Run this command in Terminal:
1ssh-keygen -t ed25519 -C "your_email@example.com"
Follow the prompts to save your key.
Add Key
Add your SSH key to the agent with this command:
1ssh-add --apple-use-keychain ~/.ssh/id_ed25519
Config File
Create a configuration file to manage your SSH connections.
1touch ~/.ssh/config
Add the following:
1Host *
2 AddKeysToAgent yes
3 UseKeychain yes
4 IdentityFile ~/.ssh/id_ed25519
5
6Host host1
7 HostName example.com
8 User user
9 IdentityFile ~/.ssh/key.pem
Now you can connect using the alias:
1ssh host1
Configure Git
Git is essential for version control.
1. Create a global configuration file:
1touch ~/.gitconfig
2. Add these settings to the file:
1[user]
2 name = Your Name
3 email = your_email@example.com
4[github]
5 user = username
6[push]
7 autoSetupRemote = true
Install Node.js
Many development projects require Node.js. I use nvm to install and manage Node.js:
- Install nvm:
1curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
2. Install the latest version of Node.js:
1nvm install node
3. Restart your terminal and run:
1nvm use node
Add-Ons and Extensions
VS Code
- Python: For writing and debugging Python code.
- GitLens: Makes Git history and changes more visible.
- ESLint: Keeps your JavaScript code clean and error-free.
- Prettier: Formats your code to make it look consistent.
Firefox
- uBlock Origin: Blocks ads and trackers for a cleaner browsing experience.
- Wappalyzer: Shows what technologies a website uses.
- React Developer Tools: Helps debug React applications in the browser.
Google Chrome
- Ghostery: Protects your privacy by blocking trackers.
- Wappalyzer: Same as the Firefox version.
- React Developer Tools: Same as the Firefox version.
Final Thoughts
These are the tools and steps that have been most useful for me over the years as a developer. I wanted to share them and also document the setup for myself. This list will likely evolve as I discover and use more tools and apps. I hope it helps you create your own perfect setup too!
Leave a Comment