The Terminal Stack That Fixed My Claude Code Workflow
Here is what a heavy Claude Code workflow actually looks like in practice. One session running Claude Code on the backend. Another session on the frontend. A third doing something else entirely in a different project. Each of those has VS Code open to track changes, a separate terminal window for git, maybe another for running commands. You are not coding. You are managing windows.
This is the specific problem tmux solves — and it does it in a way that nothing else does. Each project gets a persistent session with its own windows for Claude Code, file browsing, and git. Sessions keep running even when you close iTerm. Switch between projects in one keystroke. Run parallel Claude Code sessions across multiple projects without a single extra window anywhere.
This post walks through the full setup: four tools, all terminal-based, that together replace everything you were opening VS Code for.
The Stack
| Tool | Replaces |
|---|---|
| tmux | Multiple iTerm windows, lost sessions, project context switching |
| yazi | VS Code file explorer |
| lazygit | VS Code source control panel |
| Helix | VS Code for quick edits |
Each tool does one thing well. Together they give you one iTerm window, persistent sessions per project, and no reason to leave the terminal.
Prerequisites
You need Homebrew. If it is not installed:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
1. tmux — Session Management
tmux runs sessions in the background independent of iTerm. Close iTerm entirely, reopen it, reattach, and everything is exactly where you left it. Claude Code still running, files still open. This is the part that changes how you work.
Install:
brew install tmux
tmux -V # you want 3.4 or higher
Config at ~/.tmux.conf:
# Easier prefix
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# Clipboard fix for iTerm
set -g set-clipboard on
# Mouse support
set -g mouse on
# Start window numbering at 1
set -g base-index 1
# Better terminal colors
set -g default-terminal "screen-256color"
# Reload config
bind r source-file ~/.tmux.conf \; display "Config reloaded"
Also in iTerm: Preferences > General > Selection > check "Applications in terminal may access clipboard". This fixes copy-paste inside tmux.
The mental model: one session per project, three windows per session.
Session: project_one
Window 1: claude (Claude Code, full screen)
Window 2: yazi (file explorer, full screen)
Window 3: lazygit (git, full screen)
Session: project_two
Window 1: claude
Window 2: yazi
Window 3: lazygit
Session: project_three
...
All sessions run in parallel. Switch between them instantly. Each remembers exactly where you left it.
Essential key commands:
| Action | Keys |
|---|---|
| New session |
t my_project (see alias below) |
| List and switch sessions | Ctrl+a s |
| Detach session | Ctrl+a d |
| New window | Ctrl+a c |
| Rename window | Ctrl+a , |
| Switch window | Ctrl+a 1 / 2 / 3 |
| Split vertically | Ctrl+a % |
| Split horizontally | Ctrl+a " |
| Zoom pane full screen | Ctrl+a z |
| Move between panes | Ctrl+a arrow keys |
One alias to rule them all. Add to ~/.zshrc:
t() { tmux attach -t "$1" 2>/dev/null || tmux new -s "$1"; }
Then source ~/.zshrc. Now t my_project either attaches to that session or creates it. You never think about new vs attach again.
On panes: most of the time you want full screen windows and switch between them. Use panes when you genuinely need two things visible simultaneously — Claude Code output on one side and a file or notes on the other. Ctrl+a z zooms any pane to full screen when you need focus, and back out when you need both.
2. yazi — File Explorer
yazi is a terminal file explorer with instant file preview, syntax highlighting, and image support. It replaces the VS Code explorer panel completely.
Install:
brew install yazi
yazi --version # 0.3 or higher
Config at ~/.config/yazi/yazi.toml:
[mgr]
ratio = [1, 3, 4]
sort_by = "natural"
sort_dir_first = true
linemode = "mtime"
scrolloff = 5
show_hidden = false
show_symlink = true
[preview]
wrap = "yes"
tab_size = 2
A few notes on these choices:
-
ratio = [1, 3, 4]gives more space to the preview panel since that is where you read files -
sort_by = "natural"sorts file2 before file10, which is what you expect -
linemode = "mtime"shows last modified time — useful for seeing what Claude Code just touched -
wrap = "yes"fixes long lines in markdown and text file previews
Key commands:
| Action | Key |
|---|---|
| Navigate | Arrow keys or h j k l
|
| Open file or enter folder | Enter |
| Scroll preview | Ctrl+d / Ctrl+u |
| Quit back to shell | q |
When you quit yazi, your shell stays in whatever directory you navigated to inside it.
3. lazygit — Git UI
lazygit gives you a full terminal git UI: changed files, diffs, staging, commits, branches, stash. It replaces the VS Code source control panel.
Install:
brew install lazygit
Open it from any git project:
lazygit
You get five panels: status, files with diffs, branches, commit history, and stash. Hover a file on the left, the full diff renders on the right instantly.
Key commands:
| Action | Key |
|---|---|
| Stage or unstage file | Space |
| Commit | c |
| Switch between panels | Tab |
| Full keymap | ? |
| Quit | q |
4. Helix — Terminal Editor
Helix is a modern terminal editor with LSP support, syntax highlighting for every language, and sane defaults out of the box. No plugin configuration needed.
The one thing to know upfront: Helix is modal. There is a normal mode for navigation and an insert mode for typing. Press i to enter insert mode, Escape to go back. That is the entire learning curve to get started.
Install:
brew install helix
hx --version
Set as default editor:
echo 'export EDITOR=hx' >> ~/.zshrc
source ~/.zshrc
After this, pressing Enter on any file in yazi opens it in Helix automatically.
Config at ~/.config/helix/config.toml:
theme = "dark_plus"
[editor]
cursorline = true
color-modes = true
bufferline = "multiple"
true-color = true
popup-border = "all"
idle-timeout = 50
completion-timeout = 5
text-width = 80
end-of-line-diagnostics = "hint"
[editor.cursor-shape]
normal = "block"
insert = "bar"
select = "underline"
[editor.soft-wrap]
enable = true
wrap-indicator = ""
[editor.auto-save]
focus-lost = true
[editor.indent-guides]
render = true
character = "╎"
[editor.statusline]
left = ["mode", "spinner", "file-name", "file-modification-indicator"]
center = []
right = ["diagnostics", "selections", "position", "file-type", "version-control"]
[editor.inline-diagnostics]
cursor-line = "warning"
[editor.lsp]
display-inlay-hints = true
Notable choices:
-
theme = "dark_plus"is VS Code's default dark theme ported to Helix. Familiar immediately. -
cursor-shape.insert = "bar"changes the cursor to a bar in insert mode, exactly like VS Code. You always know which mode you are in. -
auto-save.focus-lost = truesaves automatically when you switch away. No more:wanxiety. -
color-modes = truecolors the statusline differently per mode.
Minimum keys to start:
| Action | Key |
|---|---|
| Enter insert mode | i |
| Back to normal mode | Escape |
| Save | :w |
| Quit | :q |
| Open file picker | Space f |
| Try a theme live | :theme <name> |
Putting It Together
Daily workflow once this is set up:
# Get into any project, creating the session if it does not exist
t my_project
# Inside tmux
Ctrl+a 1 # Claude Code window, full screen
Ctrl+a 2 # yazi to browse files, Enter opens in Helix
Ctrl+a 3 # lazygit to review changes, stage, commit
Ctrl+a s # switch to a different project session entirely
Ctrl+a z # zoom any pane to full screen when you need focus
On a large monitor you can open two iTerm windows and attach different sessions in each. Both are live simultaneously. Multi-project, multi-monitor, zero extra windows.
What This Does Not Replace
Claude Code handles the heavy lifting. This stack handles everything around it: browsing, reviewing changes, editing config files, committing. Once the habit is set, VS Code becomes optional.
The setup takes about 20 minutes. The habit takes a few days. Worth it.
Top comments (0)