A single command, short, that opens an iTerm2 window split
into two panes — a normal shell on one side and Claude Code on the other,
both opened in your current directory:
┌──────────────┬───────────────────────────────┐
│ shell (30%) │ Claude Code (70%) │
│ │ • light, claude.ai-style │
│ your normal │ background │
│ dark prompt │ • dark, readable text │
│ │ │
└──────────────┴───────────────────────────────┘
short→ side-by-side: shell 30% left, Claude 70% rightshort --h→ stacked: shell 30% top, Claude 70% bottom
The Claude pane gets a light, claude.ai-style warm-white background; the shell pane keeps your existing Default profile look exactly.
Claude Code auto-detects light vs. dark from the terminal background at startup. This setup gives the Claude pane a light background from the very first frame (via a dedicated iTerm2 profile), so Claude picks its light theme — crisp dark text on warm white — automatically. No Claude config change required.
- macOS
- iTerm2 (the split/scripting features use iTerm2's AppleScript dictionary; macOS Terminal.app won't work)
- Claude Code on your
PATH(claude) - zsh (the default shell on modern macOS)
git clone <this-repo> claude-code-iterm-split
cd claude-code-iterm-split
./install.shThe installer:
- Copies
short-paneand a generatedshort.scptinto~/bin. - Reads your real Default profile colors and bakes them into the shell pane, so it matches your normal terminal (not hardcoded to anyone else's).
- Installs the light "Claude" profile into iTerm2's
DynamicProfiles. - Adds the
shortfunction to your~/.zshrc(inside clearly marked begin/end markers, so re-running stays clean).
Then, as the installer prints:
- Quit and reopen iTerm2 once so it loads the new "Claude" profile.
source ~/.zshrc
Now cd into any project and run short.
| Piece | What it does |
|---|---|
~/.zshrc short() |
Base64-encodes $PWD (space-safe) and calls the AppleScript. |
~/bin/short.scpt |
Opens the iTerm2 window, splits it, sizes the panes 30/70, and runs the per-pane helper. |
~/bin/short-pane |
Per-pane script: decodes the dir, cds into it, and (right pane) launches claude. Runs as a login shell so claude is on PATH. |
iterm/Claude.json |
A light iTerm2 profile that inherits your Default profile and overrides only the colors. |
A couple of non-obvious details that make it smooth:
- The directory is passed base64-encoded because iTerm runs a pane's start
command via
execvp(no shell), so spaces in a path would otherwise be split into separate arguments and breakcd. - The Claude profile uses
"Dynamic Profile Parent Name": "Default"so it inherits your font, transparency, padding, etc. — only the background / foreground / cursor colors are overridden. (A standalone profile would reset all those to iTerm defaults and look "blurry/wrong".)
Claude pane background / colors — edit
~/Library/Application Support/iTerm2/DynamicProfiles/claude-short.json.
Color components are 0.0–1.0. The default is a warm white #FAF8F2 with a
terracotta cursor. Save the file and iTerm reloads it automatically.
Split ratio — edit ~/bin/short.scpt and change * 0.3 (the shell pane's
share) to taste, e.g. * 0.25 for a narrower shell.
Force Claude's theme (optional) — auto-detection is enough, but if you want
to pin it, set "theme": "light" (or "dark") in ~/.claude/settings.json.
Default profile not named "Default"? — edit the
"Dynamic Profile Parent Name" value in claude-short.json to match your
profile's name.
./uninstall.shRemoves ~/bin/short.scpt, ~/bin/short-pane, the iTerm profile, and the
short() block from ~/.zshrc.
MIT — see LICENSE.