A new MacBook Pro needs only a handful of steps before you can write and ship code: Apple's Command Line Tools, a package manager, Git with your identity, an SSH key, an editor on your PATH and, if you use containers, a sensible Docker memory limit. Each step below comes from the tool's own documentation, read on 2026-11-19; commands and version requirements may change, so check the linked page if something fails.
1. Install the Command Line Tools
Apple's documentation says the Command Line Tools for Xcode package is an alternative to full Xcode if you build outside Xcode. It contains the same macOS SDK, man pages and toolchain binaries that ship with Xcode, and installs to /Library/Developer/Command Line Tools. Open Terminal and run:
xcode-select --install
In the dialog that appears, click Install and accept the license. Apple notes that on a fresh macOS install, running a command such as git from the command line also prompts you to install the package. A caution from the same page: xcodebuild and xctrace only come with full Xcode, so install Xcode from the App Store if you build iOS or macOS apps. After a macOS upgrade, check Software Update for a new release of the tools, since an older version may be incompatible.
2. Install Homebrew
Homebrew installs command-line tools and applications across macOS, Linux and WSL, and does not install files outside its prefix. Its installation page lists the requirements for macOS as an Apple Silicon CPU (Intel is a Tier 3 configuration), macOS Sequoia (15) or higher, and the Command Line Tools or Xcode when building formulae from source. On Apple Silicon, casks and bottles can be installed without developer tools.
Formulae build command-line tools and libraries; casks install applications. Copy the one-line installer from brew.sh itself instead of from a blog post, since it runs a script on your machine.
3. Configure Git
The Pro Git book says to set your name and email first, because every commit records them:
git config --global user.name "Your Name"
git config --global user.email [email protected]
git config --global init.defaultBranch main
The last line applies from Git 2.28 onward and replaces the default initial branch name, "master". Settings with --global go to ~/.gitconfig and apply to every repository for your user; omit it inside a repository to override them for that project. To see every setting and the file it comes from, run git config --list --show-origin.
4. Create an SSH key and store it in Keychain
GitHub's documentation recommends generating an Ed25519 key and adding a passphrase:
ssh-keygen -t ed25519 -C "[email protected]"
Accept the default file location unless you already have a key. Then add this to ~/.ssh/config so the key loads automatically and the passphrase is stored in your keychain:
Host github.com
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_ed25519
Finally run ssh-add --apple-use-keychain ~/.ssh/id_ed25519 and add the public key to your GitHub account. GitHub warns to use the default macOS ssh-add, not one installed by Homebrew or MacPorts. Never share the private key, only the .pub file.
5. Put VS Code on your PATH
After installing VS Code, open the Command Palette (Cmd+Shift+P), search "shell command" and run the command that installs code in PATH. Restart the terminal, then code . opens the current folder. VS Code's page also gives a manual line to append to ~/.zprofile for zsh. Its "after installation" section points to installing Git, Node.js and language runtimes next.
6. Decide how much Docker you need
Docker Desktop requires at least 4 GB of RAM, and its VM memory limit defaults to 50 percent of the host's memory. On a 16 GB MacBook Pro that is 8 GB; on 24 GB it is 12 GB. You can lower the limit in Settings, and Resource saver turns the VM off when it is idle. If you are weighing memory sizes before buying, a related guide covers how to test whether 16GB or 24GB is enough on the M5 MacBook Air.
Quick checklist
xcode-select --install- Homebrew from brew.sh
- Git name, email and default branch
- Ed25519 SSH key, Keychain entry, public key on GitHub
codeon PATH- Docker Desktop only if you need containers
Language runtimes such as Node.js, Python or Java are not covered here because none of the sources above prescribes one; choose them from each project's own documentation.
Take this further with Oakgen Agent
Look up current official docs with web search and write a command-by-command checklist with verification steps, exportable as md, docx or pdf.
Coming soon: Running the setup commands on your Mac for you is not available in Agent; it writes the checklist and you run the commands yourself.
Looking for a recap of one specific YouTube video? The YouTube Summarizer does that today.
Open this task in Oakgen Agent
The prompt is filled in for you. Nothing is sent until you press send.
Frequently asked questions
Do I need to install Xcode to program on a Mac?
Not necessarily. Apple's documentation says the Command Line Tools for Xcode package is an alternative to a full Xcode installation if you work outside Xcode. It contains the same macOS SDK, man pages and toolchain binaries, and you can install it with xcode-select --install. Commands such as xcodebuild and xctrace only ship with full Xcode.
How do I install Homebrew on a new Mac?
Homebrew's documentation lists the requirements as an Apple Silicon CPU (Intel is Tier 3), macOS Sequoia (15) or higher, and the Command Line Tools or Xcode when building formulae from source. On Apple Silicon, casks and bottles can be installed without developer tools. Copy the install command from brew.sh rather than from a third-party page.
How do I set up Git on macOS?
Set your identity once with git config --global user.name and git config --global user.email, since every commit records them. From Git 2.28 you can also run git config --global init.defaultBranch main. The Pro Git book explains that --global writes to ~/.gitconfig and affects every repository for your user, and git config --list --show-origin shows where each setting comes from.
How do I stop being asked for my SSH passphrase on a Mac?
GitHub's documentation says to add AddKeysToAgent yes, UseKeychain yes and your IdentityFile path under Host github.com in ~/.ssh/config, then run ssh-add --apple-use-keychain on the private key. It also says to use the default macOS ssh-add rather than one installed by Homebrew or MacPorts.
How do I open VS Code from the terminal on a Mac?
Open the Command Palette with Cmd+Shift+P, run the Shell Command that installs the code command in PATH, and restart the terminal. After that, code . opens the current folder. The VS Code documentation also gives a manual PATH line for zsh and bash.
Sources
- Apple Developer Documentation, Installing the command-line tools (read 2026-11-19)
- Homebrew Documentation, Installation (read 2026-11-19)
- Homebrew, brew.sh (read 2026-11-19)
- Git, Pro Git book: First-Time Git Setup (read 2026-11-19)
- GitHub Docs, Generating a new SSH key and adding it to the ssh-agent (read 2026-11-19)
- Visual Studio Code Docs, Installing Visual Studio Code on macOS (read 2026-11-19)
- Docker Docs, Install Docker Desktop on Mac and Settings (read 2026-11-19)


