My Ghostty Setup for Claude Code with SAND Keybindings
Source: @dani_avila7 (Daniel San, Head of AI) — 2.1K likes, 5.8K bookmarks, 1M impressions. Part 1 of 3 (Lazygit monitoring and parallel agents with worktrees to follow).
Config gist: https://gist.github.com/davila7/5b07f55a6e65a06c121da9702d10c2e2
Why Ghostty Instead of the VS Code Terminal
The VS Code terminal crashes on long Claude Code sessions. It’s not built for it. Ghostty is a dedicated GPU-accelerated terminal built by Mitchell Hashimoto (HashiCorp co-founder) — it handles sustained, context-heavy sessions without degrading.
For Claude Code work specifically, you need a terminal that doesn’t flinch when you have three instances running and a diff open. VS Code’s embedded terminal is a liability for that use case.
The SAND Keybinding System
SAND is a mnemonic for the four operations you do constantly when managing multiple terminal panes.
S — Split
Create new panes within the current window.
| Action | Ghostty |
|---|---|
| Split right | Cmd+D |
| Split down | Cmd+Shift+D |
A — Across
Move across tabs (windows within a session).
| Action | Ghostty |
|---|---|
| New tab | Cmd+T |
| Previous tab | Cmd+Shift+Left |
| Next tab | Cmd+Shift+Right |
N — Navigate
Jump between open panes without touching the mouse.
| Action | Ghostty |
|---|---|
| Move to pane (directional) | Cmd+Alt+Arrow |
| Equalize pane sizes | Cmd+Shift+E |
| Zoom current pane | Cmd+Shift+F |
D — Destroy
Close what you no longer need.
| Action | Ghostty |
|---|---|
| Close current pane or tab | Cmd+W |
Workflow Layout
The default layout for a Claude Code session:
- Left: Claude Code — the primary work pane
- Right: Lazygit — monitor commits and diffs as Claude works
- Below: Yazi — file browser for quick navigation without leaving the terminal
This setup scales naturally to 2–3 parallel Claude Code instances running on separate git worktrees. Each worktree gets its own Claude + Lazygit pair; Yazi stays shared at the bottom.
SAND in tmux (for the Mac Mini)
We run tmux on the Mac Mini for the always-on channels agent (see 04-tooling/2026-03-29-infrastructure-decisions). The SAND operations map cleanly to tmux — if you’re working remotely into the Mac Mini or want consistent muscle memory between Ghostty and tmux, here’s the translation:
| SAND | Ghostty | tmux default | tmux command |
|---|---|---|---|
| Split right | Cmd+D | Ctrl-b % | split-window -h |
| Split down | Cmd+Shift+D | Ctrl-b " | split-window -v |
| New window | Cmd+T | Ctrl-b c | new-window |
| Prev window | Cmd+Shift+Left | Ctrl-b p | previous-window |
| Next window | Cmd+Shift+Right | Ctrl-b n | next-window |
| Navigate pane | Cmd+Alt+Arrow | Ctrl-b Arrow | select-pane -U/-D/-L/-R |
| Close pane | Cmd+W | Ctrl-b x | kill-pane |
tmux doesn’t have direct equivalents for equalize (Ctrl-b = spreads panes evenly) or zoom (Ctrl-b z toggles fullscreen on the current pane) — close enough.
If you spend meaningful time in the Mac Mini via SSH, consider adding SAND-aligned key bindings to ~/.tmux.conf so the muscle memory transfers.
New Computer Setup Checklist
Use this when configuring a fresh Mac for Claude Code work. Applies to the Mac Mini, a new laptop, or any machine that needs to run the agent reliably.
- Install Ghostty — or configure tmux with SAND-like bindings if it’s a headless/remote machine. Clone the config gist above.
- Install Claude Code —
npm install -g @anthropic-ai/claude-code - Install lazygit and yazi —
brew install lazygit yazi - Set up 1Password CLI — install
op, authenticate with service account token. All MCP secrets pull from here at runtime, never from.envfiles. See 02-sops/mcp-server-setup. - Configure MCP servers — follow the MCP Server Setup SOP. Each server that needs credentials gets a
start.shwrapper that callsopat runtime. - Verify tmux (if headless) — confirm session persistence and LaunchAgent plist if setting up an always-on agent. See 04-tooling/2026-03-29-infrastructure-decisions for the exact Mac Mini configuration.
Connections
- 04-tooling/2026-03-29-infrastructure-decisions — The Mac Mini always-on setup that this checklist feeds into. tmux + LaunchAgent + 4am restart script.
- 02-sops/mcp-server-setup — 1Password wrapper pattern for MCP server credentials. Referenced in step 4 above.
- 06-reference/2026-04-04-last-year-of-localhost — Context for why dedicated always-on terminal infrastructure matters. We’re building exactly what that article describes.
- decisions — Decision log entry on 1Password as the secrets standard.