Complete configuration guide to optimize iTerm2 for Claude Code workflows, Terraform development, and terminal productivity.
- Font Installation
- Color Scheme Setup
- Status Bar Configuration
- Shell Integration
- Keyboard Shortcuts
- Profile Setup
- Performance Settings
- Quick Tips
Install one of these monospace fonts with excellent ligature support:
1. JetBrains Mono (Recommended)
brew install --cask font-jetbrains-mono2. Fira Code
brew install --cask font-fira-code3. Cascadia Code
brew install --cask font-cascadia-code- Open iTerm2 → Preferences → Profiles → Text
- Set Font: JetBrains Mono (or your choice)
- Set Size: 13-14 (adjust for your display)
- Enable Use ligatures (improves code readability)
- Enable Anti-aliased
- Set weight: Regular for main text, Bold for bold
Choose a color scheme optimized for long coding sessions:
1. Gruvbox Dark (Recommended)
# Download and import
curl -L https://raw.githubusercontent.com/mbadolato/iTerm2-Color-Schemes/master/schemes/Gruvbox%20Dark.itermcolors -o /tmp/Gruvbox-Dark.itermcolors
open /tmp/Gruvbox-Dark.itermcolors2. Tokyo Night
curl -L https://raw.githubusercontent.com/mbadolato/iTerm2-Color-Schemes/master/schemes/Tokyo%20Night.itermcolors -o /tmp/Tokyo-Night.itermcolors
open /tmp/Tokyo-Night.itermcolors3. Dracula
curl -L https://raw.githubusercontent.com/mbadolato/iTerm2-Color-Schemes/master/schemes/Dracula.itermcolors -o /tmp/Dracula.itermcolors
open /tmp/Dracula.itermcolorsPreferences → Profiles → Colors
- Minimum contrast: 3-4 (readable but not harsh)
- Enable Smart Cursor Color
- Enable Use bright colors for bold text
Add useful information to your terminal status bar.
- Preferences → Profiles → Session
- Enable Status bar enabled
- Click Configure Status Bar
- Drag these components to the Active Components area:
- Current Directory (shows working directory)
- CPU Utilization (monitor performance)
- Memory Utilization (track resource usage)
- git state (if in a git repo)
- Clock (optional, useful for time tracking)
[Current Directory] | [git state] | CPU: 23% | MEM: 45% | 14:23
Enable iTerm2's shell integration for command tracking and better navigation.
curl -L https://iterm2.com/shell_integration/zsh -o ~/.iterm2_shell_integration.zsh# iTerm2 shell integration (enables command tracking, badges, marks)
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
# Custom window title showing current directory
if [ $ITERM_SESSION_ID ]; then
# Show directory name in tab title
precmd() {
echo -ne "\033]0;${PWD##*/}\007"
}
fiPreferences → Profiles → Terminal
- Enable Show mark indicators (left margin)
- Enable Automatically log session input
- Set Semantic History: Open with default app
Split Panes
⌘+D- Split vertically (side-by-side comparison)⌘+Shift+D- Split horizontally (stacked view)⌘+]- Next pane⌘+[- Previous pane⌘+Option+Arrow- Navigate split panes⌘+Shift+Enter- Maximize active pane
Navigation
⌘+Shift+H- Paste history (repeat commands)⌘+;- Autocomplete from history⌘+Shift+/- Find cursor (when lost in output)⌘+Option+B- Instant Replay (rewind terminal output)⌘+Shift+A- Select output of last command
Selection
⌥+Click- Move cursor to click position- Triple-click - Select full wrapped lines
⌘+/- Highlight cursor
Preferences → Keys → Key Bindings
Add these useful bindings:
⌘+K→ Send Text:clear\n(clear screen)⌘+Shift+K→ Clear Buffer (nuclear clear)⌘+T→ New Tab with Current Profile
-
Preferences → Profiles → General
-
Click + to create new profile
-
Configure:
- Name: "Terraform Infrastructure"
- Command:
/bin/zsh --login - Working Directory:
/Users/[username]/[your-terraform-repo] - Badge: "🏗️ TF" (visual indicator)
-
Window Tab
- Columns: 140+ (wider windows for Claude's output)
- Rows: 40+ (more context visible)
- Transparency: 5-10% (optional, helps with reference)
- Blur: Light (if using transparency)
- Enable Keep background colors opaque
-
Session Tab
- Enable Automatically log session input to:
~/terraform-logs/session-{date}-{time}.log
- Enable Automatically log session input to:
Save custom layouts for common workflows:
1. Planning Layout (3 panes)
+----------------+--------+
| | Vault |
| Main | AWS |
| (tg plan) | Logs |
| | |
+----------------+--------+
| File Explorer |
+-------------------------+
2. DNS Work Layout (2 panes)
+----------------+--------+
| DNS Directory | CF API |
| (tg apply) | Logs |
+----------------+--------+
3. Debugging Layout (4 quadrants)
+-------------+-------------+
| Main | State |
| (commands) | (terraform) |
+-------------+-------------+
| Logs | Docs |
| (errors) | (reference) |
+-------------+-------------+
To Save: Window → Save Window Arrangement → Name it (e.g., "TF Planning") To Load: Window → Restore Window Arrangement → Select saved layout
Preferences → Advanced (search for these):
-
"Number of scrollback lines" → 10000
- Balances history with performance
-
"Use Metal renderer" → Yes
- Better GPU acceleration
-
"GPU Rendering" → Yes (if available)
- Significant performance boost
-
"Instant Replay memory" → 4-8 MB
- Useful for reviewing Claude's output
-
"Amount to dim inactive split panes" → 0.15
- Visual separation without distraction
Preferences → General → Selection
- Enable Copy to pasteboard on selection (QuickCopy)
- Enable Applications in terminal may access clipboard
- Enable Triple-click selects full wrapped lines
- Enable Include trailing newline when copying
⌘+Shift+O- Open quickly (search all sessions)⌘+Option+E- Expose all tabs⌘+Shift+I- Broadcast input to all panes in tab⌘+F- Find in terminal (with regex support)
- Use wide windows (140+ columns) for better code display
- Enable status bar to track git state during operations
- Save window arrangements for common Claude workflows
- Use split panes to compare "before" and "after" states
- Enable session logging for audit trails
- Keep a dedicated "Terraform" profile
- Use
vault-aws-envfunction before terraform commands - Split panes: main (terraform), side (logs/state)
- Enable badges to identify which workspace you're in
If ligatures don't work:
- Restart iTerm2 after font installation
- Check font name exactly matches (case-sensitive)
- Try different font variant (Regular vs Normal)
If terminal feels slow:
- Reduce scrollback lines to 5000
- Disable transparency and blur
- Clear session history: Edit → Clear to Start of Session
- Check background processes with
toporhtop
If colors look wrong:
- Check Minimum Contrast isn't too high
- Disable "Use bright colors for bold text"
- Try a different color preset
- Verify terminal reports as
xterm-256color:echo $TERM
- Install and configure one of the recommended fonts
- Import a color scheme
- Set up shell integration
- Create a Terraform profile
- Configure status bar
- Save your first window arrangement
- Run the
benchmark-shell.shscript to measure improvements
Resources
Created for Claude Code - Optimized terminal setup for AI-assisted development workflows.