The Challenge: Managing Multiple Claude Code Sessions

When running Claude Code on macOS's built-in Terminal, launching multiple sessions requires opening numerous Terminal windows. This quickly becomes unwieldy and inefficient.

Most of the time, after handing requirements to Claude, you switch to other tasks. When you return much later, you might find Claude waiting for your approval on certain operations.

For frontend developers, after Claude generates code, launching the preview requires switching to a browser window — yet another context switch.

Fortunately, a macOS terminal powerhouse exists that satisfies all these requirements: cmux.

If you also want to preview and edit files directly within the terminal without constantly switching windows, consider pairing it with Yazi.

Introducing cmux

Core Features

cmux brings a comprehensive suite of productivity features to your terminal workflow:

Notification System:

  • Notification Ring: Blue ring appears around panes with new alerts, tabs highlight
  • Notification Panel: Centralized view of all notifications, one-click jump to unread items

Built-in Browser:

  • Split-screen browser alongside terminal
  • Script-controlled browser automation
  • No need to switch between terminal and browser windows

Tabs and Split Screens:

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

SSH Workspace:

  • Direct remote connection via cmux ssh
  • Browser routes through remote network
  • Drag-and-drop file transfer

Claude Teams:

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

Browser Data Import:

  • Support for Chrome, Firefox, Arc, and other browsers
  • Login state preserved immediately on launch

Custom Commands:

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

Scripting Capabilities:

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

Native macOS Performance:

  • Built with Swift + AppKit
  • Fast startup, low resource usage
  • Feels like a native macOS application

Ghostty Compatibility:

  • Directly reuse existing themes and font configurations
  • Smooth transition for Ghostty users

GPU Rendering:

  • Based on libghostty
  • Smoother display performance
  • Better handling of graphics-intensive content

Rich Keyboard Shortcuts:

  • Comprehensive shortcut coverage for workspaces, splits, browser operations
  • Customizable to match your workflow preferences

Configuration

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

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

# === Theme Settings ===
# Automatically switch between light and dark themes based on system
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 Settings ===
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 the configuration, be sure to reload it (via menu bar operation).

Installation

Install cmux using Homebrew:

# First tap the repository (if needed)
# brew tap manaflow-ai/cmux

# Install cmux
brew install --cask cmux

Comprehensive Keyboard Shortcuts

Workspace Shortcuts

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

Interface Shortcuts

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

Split Pane Shortcuts

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

Browser Shortcuts

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

ShortcutOperation
⌘ ⇧ LOpen browser in split
⌘ LFocus address bar
⌘ [Go back
⌘ ]Go forward
⌘ RRefresh page
⌥ ⌘ IToggle developer tools (Safari default)
⌥ ⌘ CShow JavaScript console (Safari default)

Notification Shortcuts

ShortcutOperation
⌘ IShow notification panel
⌘ ⇧ UJump to latest unread

Find Shortcuts

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

Terminal Shortcuts

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

Window Shortcuts

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

Session Restoration

After restart, cmux restores application layout and metadata:

Restored:

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

Not Restored:

  • Processes running inside terminal (Claude Code, tmux, vim, etc.)
  • Active command state

Notification System

cmux supports desktop notifications, allowing AI agents and scripts to alert you when attention is needed.

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

Typical Workflow Scenario

A productive setup might look like:

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

This arrangement eliminates constant window switching and keeps all relevant context visible simultaneously.

Yazi: Terminal File Manager

Introduction

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

Installation

Install Yazi and its dependencies:

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

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 apply changes.

Now you can type y instead of yazi to launch Yazi from the terminal.

Configuration Files

Yazi has three main 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 both close input and clear filter when pressing <Esc> in input mode.

Navigation Shortcuts

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

File Operation Shortcuts

BindingAction
oOpen selected file
OInteractively open selected file
EnterOpen selected file
Shift+EnterInteractively open selected file (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 Path Shortcuts

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)

File Filtering

BindingAction
fFilter files

File Finding

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

File Searching

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

Use Case: In-Terminal File Preview and Editing

With Yazi, you can preview and edit file contents directly within the terminal, eliminating the need to switch between terminal and other applications.

Putting It All Together: The Ultimate Developer Workflow

Combining cmux and Yazi creates a powerful terminal-based development environment:

  1. cmux provides the workspace management, split screens, notifications, and integrated browser
  2. Yazi handles file management, preview, and quick navigation
  3. Claude Code runs in dedicated panes with full context visibility
  4. Notifications keep you informed without constant monitoring

This setup minimizes context switching, maximizes screen real estate utilization, and creates a streamlined workflow for modern AI-assisted development.

Recommended Setup Steps

  1. Install cmux via Homebrew
  2. Configure Ghostty settings in ~/.config/ghostty/config
  3. Install Yazi and dependencies
  4. Set up Yazi integration in ~/.zshrc
  5. Create your first workspace with Claude Code, dev server, and browser panes
  6. Customize keyboard shortcuts to match your preferences
  7. Explore notification features for AI agent alerts

The result: a terminal environment that rivals dedicated IDEs while maintaining the flexibility and power of command-line tools.

Conclusion

Modern terminal tools like cmux and Yazi have evolved far beyond simple text interfaces. They now provide sophisticated features that rival graphical applications while maintaining the efficiency and scriptability that make terminals powerful.

For developers working with AI coding assistants like Claude Code, these tools eliminate the friction of managing multiple windows and constant context switching. The integrated browser, notification system, and split-screen capabilities create a cohesive environment where you can see everything relevant to your task simultaneously.

Whether you're managing multiple Claude sessions, monitoring development servers, or navigating complex project structures, cmux and Yazi provide the tools to work more efficiently without leaving your terminal.

Give them a try — your workflow will thank you!