Mac Terminal Setup for Development.

I want to share the configuration of my development environment on MacOS, because the right setup can boost your productivity and enjoyment of each working session. Without even realising it, many developers type the same commands again and again thinking there's no other way. But a properly configured environment will transform your workflow, so here I document the entire process of setting up a Mac for development.

Starting from... the terminal.

MacOS Terminal

I must say, the standard MacOS terminal is fine. Fast, flawless, it just delivers. But too many times I found myself reaching for features that simply weren't there.

For example, I often edit files while keeping an eye on development logs, or have multiple active sessions to run commands on different machines. And continously jumping from one tab to another not only becomes daunting, but interrupts the workflow.

A modern, feature-rich terminal environment definitely makes you more productive with things like split panes, autocomplete, global search and a personalized set of keyboard shortcuts.

Terminal alternatives: tmux, Zellij and more

Before showing my setup, I want to quickly recap the alternatives, because there are many, and mine is not perfect for every usecase.

There are 3 main players on the field...

There's a cool comparison page if you want to dig deeper into these alternatives. Of course there are more... for every usecase there's a developer in a room, wearing sweatpants, coding his own app and calling it "the best ever created".

iTerm2: my choice

As a Mac user I went with iTerm2, which is what most MacOS developers end up using. It has been maintained forever, and the feature list is enormous.

iTerm2 logo

The following configuration works on both Intel and Apple Silicon Macs. It'll probably take you 10-15 minutes for completion.

At the end I will show you how to make it faster and consume less RAM, since by default it consumes 2/3x more than Terminal app.

What we need

Homebrew: package manager for macOS (and Linux). It lets you install, update, and remove command-line tools and apps from the terminal with a single command.

Oh My Zsh: Zsh is the default shell on macOS, and Oh My Zsh adds a configuration layer to add plugins, themes and helper functions. It lives under ~/.zshrc file

Powerlevel10k: my theme of choice

Installation & Quick Setup

# 1. Backup existing configuration
cp ~/.zshrc ~/.zshrc.bkp 2>/dev/null || echo "No existing ~/.zshrc"

# 2. Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# 3. Install iTerm2
brew install --cask iterm2

# 4. Install Oh My Zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

# 5. Install Powerlevel10k theme
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
sed -i '' 's/ZSH_THEME="robbyrussell"/ZSH_THEME="powerlevel10k\/powerlevel10k"/' ~/.zshrc

# 6. Restart terminal or reload configuration
source ~/.zshrc

At this point, open up iTerm2 and you'll go through the Powerlevel10k configuration wizard that will help you set things up. Follow it till the end and select what resonates most with you.

iTerm2 Shortcuts

After completing the setup, you'll have these powerful shortcuts available:

iTerm2 Features that I love

Split panes of course were the reason I switched from the Mac Terminal, but also by default text is copied to the clipboard immediately upon being selected. Claude Code power users will love this! By double or triple clicking it'll automatically select the word or the entire line.

The profile system is where iTerm2 really shines. You can set up different profiles for SSH connections, local development, production access, each with their own color schemes, environment variables or startup commands. They can even activate automatically when you access a specific host/folder. Cool uh?

iTerm2 profiles

How to improve iTerm2 performances

You may be surprised that iTerm2 uses significantly more memory than Terminal.app. No joke, 130MB for a single idle tab, versus 40-50MB for Terminal.app with similar content. The reason is that iTerm2 uses a software renderer to draw the terminal content, which is more flexible and allows for features like transparency, blur, and anti-aliasing. It also keeps history snapshots for the "Step Back in Time" feature.

To reduce CPU usage and memory consumption I recommend:

That's it! I hope you found this guide useful. If you have any questions or suggestions, feel free to reach out!