Introduction: The Multi-Window Problem

When using macOS's built-in Terminal to run Claude Code, managing multiple sessions becomes cumbersome. Opening numerous Terminal windows is necessary when working with many concurrent tasks.

Here's a common scenario: We hand a requirement to Claude and switch to other tasks. When we return much later, we might find Claude waiting for confirmation on some operation. For frontend developers, after Claude generates code, launching a preview requires switching to a browser window.

What if there was a macOS terminal application that could satisfy all these needs in one place? Enter cmux.

And if you want to preview and edit files directly within the terminal without constantly switching windows, consider Yazi.

This article explores how these tools can transform your Claude Code workflow into a seamless, integrated experience.

cmux: The All-in-One Terminal Solution

Overview

cmux is a powerful terminal application built on Ghostty that addresses the fragmentation problem in modern development workflows. It combines terminal emulation, web browsing, notifications, and workspace management into a single, cohesive application.

Key Features

Notification System

Notification Ring: When new alerts arrive, a blue ring appears around the pane with highlighted tabs, ensuring you never miss important updates from long-running processes.

Notification Panel: Centralized view of all notifications with one-click navigation to unread items. Perfect for monitoring multiple Claude Code sessions simultaneously.

Built-in Browser

Side-by-Side Browsing: Open a browser directly adjacent to your terminal in a split view. No more Alt-Tab switching between terminal and browser.

Script Control: The browser supports programmatic control via scripts, enabling automated testing workflows and dynamic preview updates.

Tabs and Split Panes

Flexible Layouts: Support for both horizontal and vertical splits. Create complex layouts matching your workflow needs.

Informative Sidebar: Displays branches, pull requests, directories, ports, and notifications—all visible without leaving the terminal.

SSH Workspace

Direct Remote Connection: Use cmux ssh for direct remote connections. The browser routes through the remote network, enabling seamless development on remote servers.

Drag-and-Drop Transfer: Simply drag images to transfer files between local and remote systems.

Claude Teams

Multi-Agent Collaboration: cmux claude-teams enables one-click multi-agent collaboration with native split-pane display. Watch multiple AI agents work together in real-time.

Browser Data Import

Seamless Authentication: Import data from Chrome, Firefox, Arc, and other browsers. Start with existing login sessions immediately—no re-authentication needed.

Custom Commands

Project-Specific Operations: Configure project operations in cmux.json and access them directly from the command palette. Standardize team workflows with shared command configurations.

Scripting Capabilities

Full Automation: CLI + socket API for controlling workspaces, panes, and browser instances. Build custom automation scripts for your specific workflow.

Native macOS Performance

Swift + AppKit: Built using native macOS technologies for fast startup and minimal resource consumption.

GPU Rendering: Based on libghostty for smooth, accelerated display rendering.

Ghostty Compatibility

Seamless Migration: Directly reuse existing Ghostty themes and font configurations. No need to rebuild your terminal aesthetic from scratch.

Comprehensive Shortcuts

Extensive Hotkeys: Rich keyboard shortcuts covering workspaces, splits, browser operations, and more. Keep your hands on the keyboard throughout your workflow.

Configuration

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

Setting Up Your Configuration

Open ~/.config/ghostty/config and add the following configuration:

# === Theme Settings ===
# Automatically switch between light and dark themes based on system
# dark:,light: prefix allows different themes for different modes
theme = dark:iTerm2 Dark Background,light:iTerm2 Light Background

# === Shell Integration ===
# Automatically detect and integrate with your shell
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 configuration, you must reload it through the menu bar operation.

Installation

Install via Homebrew:

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

Comprehensive Keyboard Shortcuts

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

View Management

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

Split Panes

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

Browser Controls

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 and Search

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

Terminal Operations

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

Window Management

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

Session Restoration

When restarting, cmux restores application layout and metadata:

What Gets Restored:

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

What Doesn't Restore:

  • Running processes inside terminal (Claude Code, tmux, vim, etc.)
  • Active command states
  • Unsaved editor content

Notification System

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

Key Benefits:

  • View all pending notifications in one place
  • Quickly jump to latest unread notification
  • Never miss important Claude Code prompts or build failures

Ideal Workflow Scenario

A typical productive layout:

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

This arrangement eliminates window switching entirely. All context remains visible simultaneously.

Yazi: Terminal File Manager Integration

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 an efficient, user-friendly, and customizable file management experience directly within your terminal.

Why Yazi?

Performance: Rust-based implementation ensures blazing-fast file operations even with large directories.

Async I/O: Non-blocking operations mean the UI remains responsive during file operations.

Terminal-Native: No need to leave your terminal for file management tasks.

Highly Customizable: Extensive configuration options for keybindings, themes, and behavior.

Installation

Install Yazi and its dependencies via 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 and audio file previews
  • sevenzip: Archive extraction support
  • jq: JSON processing for plugin support
  • poppler: PDF preview rendering
  • fd: Fast file discovery
  • ripgrep: Content search within files
  • fzf: Fuzzy finding integration
  • zoxide: Smart directory navigation
  • resvg: SVG rendering
  • imagemagick-full: Image manipulation and previews
  • nerd-font: Icon support for enhanced visual presentation

Shell Integration (Optional)

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

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"
}

Save and execute source ~/.zshrc to apply changes.

What This Does: This wrapper function allows you to type y instead of yazi to launch the file manager. Additionally, when you exit Yazi, your shell automatically changes to the directory you were last browsing in—seamless navigation!

Configuration Files

Yazi has three main configuration files:

1. yazi.toml - General Configuration

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

[mgr]
show_hidden = true        # Show hidden files (starting with .)
show_symlink = true       # Show symlink target paths after filenames

2. keymap.toml - Key Binding Configuration

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

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

This configuration executes when pressing <Esc> in input mode: simultaneously closes input and clears filters.

3. theme.toml - Color Scheme Configuration

Customize colors and visual appearance to match your terminal theme.

Comprehensive Keyboard Shortcuts

Navigation

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

Note: Yazi uses Vim-style navigation by default, providing efficient keyboard-driven file browsing.

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
yYank (copy) selected files
xCut selected files
pPaste copied files
PPaste copied files (overwrite if destination exists)
Y or XCancel yank state
dDelete selected files to trash
DPermanently delete selected files
aCreate a file (directories end with /)
rRename selected file
.Toggle hidden file visibility

Copy Paths

Notation: 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

Practical Usage Scenarios

Direct Terminal File Preview: Preview and edit file contents directly within the terminal without switching applications.

Integrated Workflow: Combine cmux terminal with Yazi file manager for a completely keyboard-driven development environment:

  1. Use cmux for Claude Code sessions with split panes
  2. Use Yazi for quick file navigation and preview
  3. Keep everything within the terminal ecosystem
  4. Minimize context switching and maximize flow state

Example Workflow

# Start cmux with your project
cmux

# In one pane, start Claude Code
claude

# In another pane, start development server
npm run dev

# In third pane, open browser preview
# (using cmux's built-in browser)

# When needing to navigate files, use Yazi
y  # or 'yazi'

# Browse to file, press 'o' to open in editor
# Edit, save, and see changes in browser preview

Combining cmux and Yazi for Ultimate Productivity

The Complete Setup

When used together, cmux and Yazi create a comprehensive development environment:

cmux Provides:

  • Multi-pane terminal management
  • Integrated browser for previews
  • Notification system for long-running tasks
  • Workspace organization
  • Claude Code optimization

Yazi Provides:

  • Fast file navigation
  • In-terminal file preview
  • Quick file operations
  • Search and filter capabilities
  • Seamless shell integration

Configuration Synergy

Both tools complement each other perfectly:

  1. Shared Configuration: Both can use similar color schemes and key binding philosophies
  2. Ghostty Compatibility: cmux's Ghostty foundation means consistent terminal behavior
  3. Keyboard-First: Both prioritize keyboard shortcuts over mouse interaction
  4. Performance: Both are optimized for speed and low resource usage

Recommended Workflow

Morning Setup:

  1. Launch cmux
  2. Restore previous workspace (automatic)
  3. Open project directory in Yazi (y)
  4. Start Claude Code in left pane
  5. Start dev server in top-right pane
  6. Open preview in bottom-right browser pane

During Development:

  1. Interact with Claude Code for code generation
  2. Use Yazi to navigate and preview generated files
  3. Monitor dev server output in dedicated pane
  4. Receive notifications for build completions or errors
  5. All within a single application window

End of Day:

  1. cmux automatically saves workspace state
  2. Next day: everything restored exactly as left

Advanced Tips and Tricks

Tip 1: Custom cmux Commands for Common Operations

Create project-specific commands in ~/.config/cmux/cmux.json:

{
  "commands": {
    "dev": "npm run dev",
    "test": "npm test",
    "build": "npm run build",
    "lint": "npm run lint"
  }
}

Access these from the command palette for quick execution.

Tip 2: Yazi Plugins for Enhanced Functionality

Extend Yazi with community plugins:

  • Full preview support for more file types
  • Git integration showing status in file list
  • Cloud storage integration for remote files
  • Custom actions for project-specific operations

Tip 3: Notification Automation

Configure Claude Code to send notifications on specific events:

# In your Claude Code session
# When task completes, trigger notification
echo -e "\a"  # Terminal bell triggers cmux notification

Tip 4: Workspace Templates

Create workspace templates for different project types:

  • Frontend Project: Terminal + Browser + Dev Server
  • Backend Project: Multiple terminal panes + Database viewer
  • Data Science: Terminal + Notebook + Visualization

Conclusion

The combination of cmux and Yazi represents a modern approach to terminal-based development. By integrating terminal emulation, file management, web browsing, and notifications into a cohesive workflow, these tools address the fragmentation that plagues modern development environments.

For Claude Code users specifically, this setup eliminates the constant window switching that disrupts flow state. Everything you need—AI interaction, code preview, file navigation, and build monitoring—exists within a single, keyboard-driven environment.

The learning curve is minimal, especially if you're already familiar with terminal workflows. The productivity gains, however, are substantial. Give this setup a try and experience what focused, uninterrupted development feels like.

Getting Started Checklist

  • [ ] Install cmux via Homebrew
  • [ ] Configure Ghostty-compatible settings
  • [ ] Install Yazi and dependencies
  • [ ] Set up shell integration function
  • [ ] Customize keybindings to your preference
  • [ ] Create your first workspace layout
  • [ ] Try a complete development session

Your future productive self will thank you.


This comprehensive guide was originally published on 2026-04-11 and provides detailed instructions for setting up an optimized terminal environment for AI-assisted programming with Claude Code.