Introduction: The Claude Code Terminal Challenge

Running Claude Code with macOS's built-in Terminal requires opening many Terminal windows when managing大量 sessions.

Most of the time, after handing requirements to Claude, we switch to do other things. When we return much later, we might see Claude asking whether we agree to some operation.

If you're a frontend developer, after Claude generates code, you still need to switch to browser window to start preview.

Here's a macOS terminal tool that meets all your needs—cmux.

If you also want to preview and edit files directly in the terminal without switching windows back and forth, try Yazi.

cmux: The Ultimate Terminal for AI Development

Features Overview

cmux provides a comprehensive set of features designed for modern development workflows:

Visual Notifications:

  • Notification Ring: Blue ring appears around pane when new alerts arrive, with highlighted tabs
  • Notification Panel: Centralized view of all notifications, one-click jump to unread

Integrated Browser:

  • Split-screen browser right next to terminal
  • Script-controlled browser automation
  • Perfect for previewing generated code

Tabs and Split Panes:

  • Support for horizontal and vertical splits
  • Sidebar displays branches, PRs, directories, ports, and notifications
  • Organize complex workflows efficiently

SSH Workspace:

  • cmux ssh for direct remote connections
  • Browser routes through remote network
  • Drag-and-drop file transfer

Claude Teams:

  • cmux claude-teams for one-click multi-agent collaboration
  • Native split-screen display for team workflows

Browser Data Import:

  • Support for Chrome, Firefox, Arc, and more
  • Login state preserved on first launch

Custom Commands:

  • Configure project operations in cmux.json
  • Access directly from command palette

Scripting Capabilities:

  • CLI + socket API for controlling workspaces, panes, and browser
  • Automate complex workflows

Native macOS:

  • Built with Swift + AppKit
  • Fast startup, low resource usage

Ghostty Compatibility:

  • Directly reuse existing themes and font configurations
  • Seamless migration from Ghostty

GPU Rendering:

  • Based on libghostty for smoother display
  • Hardware-accelerated performance

Rich Keyboard Shortcuts:

  • Comprehensive shortcuts covering workspaces, splits, browser operations, and more

Configuration

cmux reads configuration from Ghostty configuration files. If you've used Ghostty before, these options will be familiar.

Open ~/.config/ghostty/config configuration file and copy the following:

# === Theme Settings ===
# Follow system for automatic light/dark theme switching
theme = dark:iTerm2 Dark Background,light:iTerm2 Light Background

# === Shell Integration ===
shell-integration = detect

# === Font Settings ===
font-size = 12
font-thicken = true
adjust-cell-height = 2

# === Window Settings ===
window-theme = system
window-save-state = always
background-opacity = 0.8
macos-titlebar-style = transparent

# === Mouse Settings ===
copy-on-select = clipboard
mouse-shift-capture = true
mouse-hide-while-typing = true
cursor-style = bar
cursor-style-blink = true
cursor-opacity = 0.85

# === Buffer ===
scrollback-limit = 8388608

# === Quick Terminal ===
quick-terminal-position = top
quick-terminal-screen = mouse
quick-terminal-autohide = true
quick-terminal-animation-duration = 0.2

# === Security Settings ===
clipboard-paste-protection = true
clipboard-paste-bracketed-safe = true

Important: After modifying, be sure to reload configuration (via menu bar operation).

Installation

Install via Homebrew:

brew tap manaflow-ai/cmux
brew install --cask cmux

Keyboard Shortcuts Reference

Workspace Management

ShortcutAction
⌘ NNew workspace
⌘ 1–8Jump to workspace 1–8
⌘ 9Jump to last workspace
⌃ ⌘ ]Next workspace
⌃ ⌘ [Previous workspace
⌘ ⇧ WClose workspace
⌘ ⇧ RRename workspace
⌘ BToggle sidebar

Interface Management

ShortcutAction
⌘ TNew interface
⌘ ⇧ ]Next interface
⌘ ⇧ [Previous interface
⌃ TabNext interface
⌃ ⇧ TabPrevious interface
⌃ 1–8Jump to interface 1–8
⌃ 9Jump to last interface
⌘ WClose interface

Split Panes

ShortcutAction
⌘ DSplit right
⌘ ⇧ DSplit down
⌥ ⌘ ← → ↑ ↓Switch focus by direction
⌘ ⇧ HFlash focused pane

Browser

Browser developer tools shortcuts follow Safari defaults, customizable in Settings → Keyboard Shortcuts.

ShortcutAction
⌘ ⇧ LOpen browser in split
⌘ LFocus address bar
⌘ [Back
⌘ ]Forward
⌘ RRefresh page
⌥ ⌘ IToggle developer tools (Safari default)
⌥ ⌘ CShow JavaScript console (Safari default)

Notifications

ShortcutAction
⌘ IShow notification panel
⌘ ⇧ UJump to latest unread

Find & Search

ShortcutAction
⌘ FFind
⌘ G / ⌘ ⇧ GFind next / previous
⌘ ⇧ FHide find bar
⌘ EFind using selected text

Terminal Operations

ShortcutAction
⌘ KClear scrollback buffer
⌘ CCopy (when text selected)
⌘ VPaste
⌘ + / ⌘ -Increase / decrease font size
⌘ 0Reset font size

Window Management

ShortcutAction
⌘ ⇧ NNew window
⌘ ,Settings
⌘ ⇧ ,Reload configuration
⌘ QQuit

Session Restoration

After restart, cmux restores application layout and metadata:

What Gets Restored:

  • Window/workspace/pane layout
  • Working directories
  • Terminal scrollback buffer (best effort)
  • Browser URLs and navigation history

What Doesn't Get Restored:

  • Processes running in terminal (like Claude Code / tmux / vim)
  • Active application state

Notifications

cmux supports desktop notifications, letting AI agents and scripts remind you when attention is needed.

View all pending notifications in one place, quickly jump to latest unread notification.

Typical Usage Scenario

Layout Example:

  • Left: Claude Code session
  • Top Right: npm run dev development server
  • Bottom Right: Web browser for preview

This setup allows you to:

  1. Give Claude a task
  2. Watch development server output
  3. Preview changes in browser
  4. All without switching windows!

Yazi: Terminal File Manager

Introduction

Yazi (meaning "duck" in Chinese) is a terminal file manager written in Rust, based on non-blocking asynchronous I/O. It aims to provide efficient, user-friendly, and customizable file management experience.

Installation

Install with Homebrew:

brew install yazi ffmpeg-full sevenzip jq poppler fd ripgrep fzf zoxide resvg imagemagick-full font-symbols-only-nerd-font
brew link ffmpeg-full imagemagick-full -f --overwrite

Dependencies Explained:

  • ffmpeg-full: Video/audio preview support
  • sevenzip: Archive handling
  • jq: JSON processing
  • poppler: PDF preview
  • fd: Fast file searching
  • ripgrep: Content searching
  • fzf: Fuzzy finding
  • zoxide: Smart directory jumping
  • resvg: SVG rendering
  • imagemagick-full: Image processing
  • nerd-font: Icon support

Integration (Optional)

Open ~/.zshrc and append the following to the end of the file (optional):

function y() {
  local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd
  command yazi "$@" --cwd-file="$tmp"
  IFS= read -r -d '' cwd < "$tmp"
  [ "$cwd" != "$PWD" ] && [ -d "$cwd" ] && builtin cd -- "$cwd"
  rm -f -- "$tmp"
}

After saving, execute source ~/.zshrc to take effect.

Then you can type y instead of yazi in terminal to launch Yazi.

What This Does: The function changes directory to Yazi's last visited directory after exiting, providing seamless navigation integration.

Configuration

Yazi has three configuration files:

  1. yazi.toml: General configuration
  2. keymap.toml: Key binding configuration
  3. theme.toml: Color scheme configuration

Basic Configuration

Create file ~/.config/yazi/yazi.toml:

[mgr]
show_hidden = true      # Show hidden files
show_symlink = true     # Show symlink target path after filename

Keymap Configuration

Create file ~/.config/yazi/keymap.toml:

[[input.prepend_keymap]]
on = "<Esc>"
run = ["close", "mgr:escape --filter"]
desc = "Close input and cancel the filter"

This executes closing input and clearing filter when pressing key in input mode.

Keyboard Shortcuts

Navigation

BindingAlternateAction
kMove cursor up
jMove cursor down
lEnter hovered directory
hLeave current directory, enter parent

File Operations

BindingAction
oOpen selected file
OOpen selected file interactively
EnterOpen selected file
Shift+EnterOpen selected file interactively (not supported in some terminals)
TabShow file information
yCopy selected files
xCut selected files
pPaste copied files
PPaste copied files (overwrite if exists at destination)
Y or XCancel yank state
dDelete selected files to trash
DPermanently delete selected files
aCreate file (directories end with /)
rRename selected file
.Toggle hidden file visibility

Copy Paths

c⇒d means press c key first, then press d key.

BindingAction
c⇒cCopy file path
c⇒dCopy directory path
c⇒fCopy filename
c⇒nCopy filename (without extension)

Filter Files

BindingAction
fFilter files

Find Files

BindingAction
/Find next file
?Find previous file
nGo to next found
NGo to previous found

Search Files

BindingAction
sSearch files by name using fd
SSearch files by content using ripgrep
Ctrl+sCancel ongoing search

Usage Scenario

With Yazi, you can directly preview and edit file contents within the terminal.

Typical Workflow:

  1. Launch Yazi with y command
  2. Navigate to project directory
  3. Preview files with Tab
  4. Open files for editing with Enter
  5. Make changes and save
  6. Return to Claude Code session

All without leaving the terminal environment!

Putting It All Together: The Ultimate Claude Code Setup

Recommended Configuration

Combine cmux and Yazi for maximum productivity:

  1. cmux as Main Terminal: Use for Claude Code sessions with split panes
  2. Yazi for File Management: Quick file browsing and editing
  3. Integrated Browser: Preview changes without context switching

Example Workflow

Frontend Development:

┌─────────────────────────────────────────────────────────┐
│  cmux Window                                             │
│  ┌─────────────┬─────────────────────────────────────┐  │
│  │             │                                     │  │
│  │  Claude     │         Browser                     │  │
│  │  Code       │    (Preview)                        │  │
│  │             │                                     │  │
│  ├─────────────┴─────────────────────────────────────┤  │
│  │  Development Server (npm run dev)                  │  │
│  └───────────────────────────────────────────────────┘  │
└─────────────────────────────────────────────────────────┘

Backend Development:

┌─────────────────────────────────────────────────────────┐
│  cmux Window                                             │
│  ┌─────────────┬─────────────┬─────────────────────┐   │
│  │             │             │                     │   │
│  │  Claude     │   Yazi      │   Database CLI      │   │
│  │  Code       │  (Files)    │                     │   │
│  │             │             │                     │   │
│  └─────────────┴─────────────┴─────────────────────┘   │
└─────────────────────────────────────────────────────────┘

Tips for Best Experience

  1. Customize cmux.json: Add project-specific commands for quick access
  2. Use Notifications: Let Claude notify you when tasks complete
  3. Leverage SSH: Connect to remote development environments seamlessly
  4. Configure Yazi Themes: Match your terminal aesthetic
  5. Master Shortcuts: Muscle memory for common operations boosts speed

Conclusion

The combination of cmux and Yazi provides a powerful terminal environment optimized for AI-assisted development:

cmux Benefits:

  • All-in-one workspace for Claude Code, development servers, and browsers
  • Notification system keeps you informed without constant checking
  • Split panes eliminate window switching
  • Native macOS performance

Yazi Benefits:

  • Fast, Rust-powered file management
  • Rich preview capabilities
  • Keyboard-driven efficiency
  • Seamless terminal integration

Together, they create a development environment where you can:

  • Give Claude complex tasks
  • Monitor progress in real-time
  • Preview and test changes instantly
  • Manage files without leaving the terminal
  • Stay in flow state longer

This setup is particularly valuable for:

  • Frontend developers needing browser preview
  • Full-stack developers managing multiple services
  • Anyone working extensively with Claude Code or similar AI tools

The initial setup takes about 15 minutes, but the productivity gains are immediate and compounding. Give it a try!


Resources: