The Ultimate MacBook Pro M1 Developer Setup Guide
Overview
Setting up a new development machine correctly saves hours of frustration later. This guide explores the transition to a
Prerequisites
To follow this guide, you should have basic familiarity with the command line and the
Key Libraries & Tools
- Homebrew: The essential package manager for macOS.
- iTerm2: A powerful terminal replacement for the default Mac console.
- Oh My Zsh: A framework for managing Zsh configurations and themes.
- Pyenv: A tool to manage and switch between multiple Python versions.
- Docker: Containerization platform for deploying cloud-native applications.
- Rectangle: An open-source window management tool for macOS.

Code Walkthrough
1. Initializing Homebrew and Shell
First, install brew command is recognized.
# Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Add to path (replace <user> with your username)
echo 'eval "(/opt/homebrew/bin/brew shellenv)"' >> /Users/<user>/.zprofile
eval "(/opt/homebrew/bin/brew shellenv)"
2. Managing Python Environments
Avoid using the system-provided Python. Instead, use
# Install pyenv via brew
brew install pyenv
# Install a specific Python version
pyenv install 3.10.1
# Set the global version
pyenv global 3.10.1
3. VS Code Automation
In settings.json to handle these tasks on save.
{
"python.formatting.provider": "black",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
},
"vim.smartRelativeLine": true
}
Syntax Notes
When configuring .zshrc or .zprofile. For "vim.smartRelativeLine": true is a notable convention for
Practical Examples
Using
Tips & Gotchas
- Caps Lock Swap: Map
Caps LocktoEscapein System Preferences. It is a game-changer forVimusers who need to exit Insert Mode constantly. - Apple Silicon Docker: Always ensure you download the "Apple Chip" version of Docker. The Intel version will run via Rosetta 2 but suffers from significant performance degradation.
- Path Issues: If
brewcommands fail after installation, double-check that you executed the path configuration commands in your shell profile.