Introduction: The Pain of Multi-Terminal Switching
After using Claude Code intensively in the terminal for a while, you'll quickly encounter a real problem:
Scenario: Developing frontend and backend features simultaneouslyβone terminal running Claude Code, another viewing logs, plus constantly managing files and committing code... Switching between multiple terminal windows is both tedious and unintuitive, with no way to see the real-time status of each terminal.
My previous solution was tmux. But tmux is essentially a tool from the last century: too many commands to remember, and the interface isn't visually appealingβit feels like using an antique.
Until I saw a tweet from Boris, the creator of Claude Code, who was using Ghostty. I tried it, then discovered Yazi and Lazygit. This combination completely transformed my terminal workflow.
Today we'll discuss this Terminal Power Trio:
- π₯οΈ Ghostty: Modern terminal emulator with native support for tabs and split panes
- π Yazi: Lightning-fast file manager written in Rust with file preview capabilities
- π Lazygit: Visual Git TUI that replaces tedious git commands with keyboard shortcuts
Part 1: Ghostty - Bringing Terminals into the Modern Era
1.1 Why Ghostty?
Ghostty is a next-generation terminal emulator developed by Mitchell Hashimoto, founder of HashiCorp. Its core selling points:
- Native UI: macOS uses Swift + AppKit, Linux uses GTK4βthe interface is truly native to the system
- GPU-accelerated rendering: Metal on macOS, OpenGL on Linuxβincredibly smooth
- Works out of the box: Almost no configuration needed for a great experience
- Built-in split panes: No tmux requiredβnative support for tabs and splits
Official download: https://ghostty.org/download
1.2 Core Operations
Tab Management:
| Operation | macOS | Linux |
|---|---|---|
| New tab | Cmd + T |
Ctrl + Shift + T |
| Switch tabs | Cmd + 1~9 |
Ctrl + 1~9 |
| Close tab | Cmd + W |
Ctrl + Shift + W |
Split Pane Operations:
| Operation | macOS | Linux |
|---|---|---|
| Split right | Cmd + D |
Ctrl + Shift + E |
| Split down | Cmd + Shift + D |
Ctrl + Shift + O |
| Switch between splits | Cmd + Shift + [/] |
Ctrl + Shift + [/] |
| Move focus (arrow keys) | Cmd + Option + Arrow |
Ctrl + Shift + Arrow |
| Maximize current split | Cmd + Shift + Enter |
Ctrl + Shift + Enter |
1.3 My Typical Layout
When developing with Claude Code, I typically arrange splits like this:
βββββββββββββββββββββββ¬βββββββββββββββββββ
β β β
β Claude Code β Yazi β
β (Main Dev Chat) β (File Browser) β
β β β
βββββββββββββββββββββββ΄βββββββββββββββββββ€
β Lazygit β
β (Git Operations) β
ββββββββββββββββββββββββββββββββββββββββββ
- Top left: Claude Code main workspace
- Top right: Yazi file manager, always ready to browse directory structure
- Bottom: Lazygit, always monitoring Git status and ready to commit
Part 2: Yazi - Lightning-Fast File Manager
2.1 Why Yazi?
Yazi (GitHub: sxyazi/yazi) is an asynchronous terminal file manager written in Rust. ya means "duck" in Chinese π¦.
Compared to veteran file managers like ranger and nnn, Yazi's biggest advantage is speedβasynchronous I/O combined with Rust's performance means opening large directories feels instant.
Official Release download: https://github.com/sxyazi/yazi/releases
2.2 Core Features
1. Three-Column Miller Columns Layout
Yazi uses a three-column layout similar to Ranger: parent directory on the left, current directory in the middle, preview on the right.
2. Powerful File Preview
Supports previewing a wide variety of file types:
- Text files, code files (with syntax highlighting)
- Images (requires terminal with image protocol support; Ghostty supports Kitty image protocol)
- Videos (thumbnails)
- PDF, Office documents
- Archive contents
3. Asynchronous Task System
When copying or moving large files, operations run asynchronously in the background. You can view progress in real-time and cancel tasks without freezing the interface.
4. Search Capabilities
- Search by filename: Integrated
fd - Search by content: Integrated
rg(ripgrep) - Real-time incremental search: Results appear as you type
5. Plugin Ecosystem
Yazi has an active plugin ecosystem for extending themes, preview types, custom keybindings, and more.
2.3 Basic Keybindings
| Operation | Keybinding |
|---|---|
| Enter directory / Open file |
l or β or Enter
|
| Go to parent directory |
h or β
|
| Move up / down |
k / j
|
| Go to top / bottom |
gg / G
|
| Select file | Space |
| Select all | v |
| Copy | y |
| Cut | x |
| Paste | p |
| Delete (move to trash) | d |
| Permanent delete | D |
| New file |
a (add / at end for directory) |
| Rename | r |
| Bulk rename | R |
| Search filename | f |
| Search file content |
S (requires rg) |
| Jump (zoxide) | z |
| Toggle hidden files | . |
| New tab | t |
| Quit | q |
2.4 Tips for Using with Ghostty
Ghostty supports the Kitty image protocol, so with Yazi you can preview images directly in the terminal without opening an external viewer:
# After installing yazi, set up a shell function to cd to yazi's current directory on exit
# Add to ~/.zshrc or ~/.bashrc:
function y() {
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")"
yazi "$@" --cwd-file="$tmp"
if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
builtin cd -- "$cwd"
fi
rm -f -- "$tmp"
}
This way, using the y command to launch Yazi will automatically switch your terminal to the directory you were last in when you exit Yazi.
Part 3: Lazygit - Visual Git Operations
3.1 Why Lazygit?
Lazygit (GitHub: jesseduffield/lazygit) is a terminal UI (TUI) for Git that replaces tedious git command-line operations with visual keyboard interactions.
For Claude Code users, Lazygit is particularly valuable: AI automatically modifies many files, and Lazygit lets you see all changes at a glance and precisely control which changes to commit.
Official Release download: https://github.com/jesseduffield/lazygit/releases (Choose the version for your system)
3.2 Interface Components
Lazygit's interface consists of 6 panels:
| Panel | Keybinding | Description |
|---|---|---|
| Status | 1 |
Current repository overview, recent repository list |
| Files | 2 |
List of modified files |
| Branches | 3 |
List of local and remote branches |
| Commits | 4 |
Commit history of current branch |
| Stash | 5 |
Stash management |
| Preview | β | Preview area, follows currently selected content |
3.3 Core Operation Tips
Daily Commit Workflow (Most Common):
| Operation | Keybinding |
|---|---|
| Stage / Unstage single file | Space |
| Stage all files | a |
| Commit staged changes | c |
| Amend last commit message |
A (Amend) |
| Push to remote |
P (uppercase) |
| Pull latest code |
p (lowercase) |
Branch Management:
| Operation | Keybinding |
|---|---|
| Create new branch |
n (in Branches panel) |
| Switch branch |
Space (in Branches panel) |
| Delete branch | d |
| Merge branch | M |
Useful Tips:
| Operation | Keybinding |
|---|---|
| Undo last git operation | z |
| Redo (reverse of undo) | Z |
| Stash changes | s |
| Discard file changes |
d (in Files panel) |
| View all keybindings | ? |
| Quit | q |
β οΈ Note:
P(Push) andp(Pull) are case-sensitive. These are the two operations beginners most commonly confuseβmake sure to remember them clearly.
3.4 Workflow with Claude Code
After Claude Code completes a batch of modifications, my standard workflow is:
- Switch to the split pane with Lazygit
- In the Files panel, review each of Claude's modifications one by one. Press
Enterto view the diff in the preview area - After confirming each file is correct, press
Spaceto stage it - Press
cto enter commit message and commit - Press
Pto push to remote
The entire process requires no git commandsβeverything is visual.
Part 4: The Power Trio Working Together
4.1 Actual Screenshot
As shown, all three tools run simultaneously in Ghostty's split panes: Claude Code is having a development conversation on the left, Yazi is browsing file structure on the right, and Lazygit is monitoring Git status at the bottom.
4.2 Comparison with tmux
| Dimension | tmux | Ghostty + Yazi + Lazygit |
|---|---|---|
| Interface aesthetics | β οΈ Text-only, dated | β Native UI, modern feel |
| Learning curve | β οΈ Many commands, prefix keys hard to remember | β Each tool focused on single responsibility |
| File management | β No built-in capability | β Yazi's powerful preview |
| Git operations | β No built-in capability | β Lazygit visualization |
| Configuration complexity | β οΈ Requires .tmux.conf
|
β Works out of the box |
| Remote servers | β Preferred for SSH environments | β οΈ Requires local installation |
Note: If you need to work on remote servers, tmux remains irreplaceable. The power trio is better suited for local development scenarios.
Conclusion
The Terminal Power Trio makes multi-task development intuitive and efficient:
- Ghostty: Replaces system terminal, native split panes make multi-tasking clear at a glance
-
Yazi: Replaces
ls+cd+cat, file management and preview in one go -
Lazygit: Replaces
git add/commit/push, visual Git operations with precise control
For developers who use Claude Code intensively, this combination is particularly valuable: AI's batch modifications require precise human review, and Lazygit's file-level diff view gives you clear control over every line change before committing.
If this article was helpful, feel free to like, bookmark, and share! If you have any questions or suggestions, please leave a comment. Let's learn and grow together!
Also welcome to visit my personal homepage to discover more valuable resources

Top comments (0)