Ghostty-based macOS terminal with vertical tabs and notifications for AI coding agents https://cmux.com
Find a file
Lawrence Chen c51f0f15c4
Fix minimal mode toggle not updating titlebar state (#2218)
* Fix minimal mode toggle not properly updating titlebar state

UpdateTitlebarAccessoryController only re-evaluated titlebar accessories
on window focus events (didBecomeKey/didBecomeMain), not when the
presentation mode actually changed. This caused:

1. Switching to minimal: accessories weren't immediately removed
2. Switching back to standard: accessories were never re-attached
   (removeAccessoryIfPresent cleared attachedWindows, but no event
   triggered re-attachment)
3. Repeated toggling left the window in inconsistent states

Add a UserDefaults observer that detects presentation mode changes and
re-evaluates all windows. When switching to minimal, accessories are
removed; when switching to standard, fresh accessories are created and
attached. Also handle the fullscreen edge case where re-attached
accessories must be hidden to avoid doubling with SwiftUI overlay
controls.

* Hide window toolbar in minimal mode to eliminate titlebar gap

The NSToolbar (attached by WindowToolbarController) creates a non-zero
titlebar area even in minimal mode, leaving an empty gap above the
Bonsplit tab bar. In minimal mode there's no need for the toolbar (it
shows a "Cmd:" text that's hidden anyway with titleVisibility=.hidden).

Hide the toolbar when switching to minimal mode and restore it when
switching back to standard. Also set initial visibility on attachment
based on the current mode.

* Apply ignoresSafeArea to contentAndSidebarLayout in minimal mode

The titlebar gap persisted because intermediate SwiftUI views still
respected the window's safe area even though MainWindowHostingView
zeroes safeAreaInsets. Apply .ignoresSafeArea(.container, edges: .top)
directly to the contentAndSidebarLayout when in minimal mode so the
entire content (sidebar + terminal) extends into the titlebar area.

* Remove toolbar entirely in minimal mode instead of just hiding

toolbar.isVisible=false still reserves titlebar space. Remove the
toolbar entirely (window.toolbar=nil) when switching to minimal mode
and re-attach it when switching back to standard. Skip toolbar
attachment entirely when launching in minimal mode.

* Add BonsplitTabDragUITests.swift to cmuxUITests target

The test file existed on disk but was missing from the Xcode project,
causing all BonsplitTabDrag UI tests (including minimal mode tests) to
silently report 0 tests on CI.

* Use negative titlebar padding in minimal mode to extend content into titlebar

The native titlebar area (28.5pt for traffic lights) persists even
without a toolbar and despite .ignoresSafeArea() modifiers. Use
negative padding (-titlebarPadding) in minimal mode to pull the
terminal content up into the titlebar area. The sidebar's internal
trafficLightPadding spacer keeps sidebar content properly offset
below the traffic lights.

* Add window drag handle to Bonsplit top strip in minimal mode

In minimal mode, the custom titlebar (which provides the window drag
handle) is hidden. Add a WindowDragHandleView to the top strip overlay
so users can drag-to-move the window from the Bonsplit tab bar area.
The TitlebarDoubleClickMonitorView is kept as a background for
double-click-to-zoom.

* Use native titlebar drag in minimal mode instead of WindowDragHandleView

WindowDragHandleView defers to interactive siblings (Bonsplit tab bar),
so it never captures hits. Instead, set window.isMovable=true in
minimal mode so the native titlebar area handles drag-to-move and
double-click-to-zoom. Remove the non-functional overlay from
WorkspaceContentView.

* Enable isMovableByWindowBackground in minimal mode for window dragging

window.isMovable alone doesn't work because the Bonsplit tab bar
captures all hits before the native titlebar drag engages. Use
isMovableByWindowBackground=true so any area that doesn't handle
mouse events becomes a drag handle. Also capture
workspacePresentationMode in the WindowAccessor closure so the
window properties update when toggling modes.

* Add debug logging for minimal mode window drag diagnosis

* Intercept double-click in minimal mode tab bar to zoom instead of new tab

Bonsplit's EmptyTabBarDoubleClickMonitorView creates a new tab on
double-click in the tab bar empty space. In minimal mode, intercept
these double-clicks with a higher-priority local event monitor and
perform the standard macOS titlebar action (zoom/minimize based on
System Settings) instead. Only intercepts in the top 30pt strip and
only when minimal mode is active.

* Fix double-click monitor ordering and coordinate calculation

NSEvent local monitors are called LIFO (last installed first). Install
the minimal-mode double-click interceptor with a 0.5s delay so it's
added after Bonsplit's EmptyTabBarDoubleClickMonitorView monitors,
ensuring it runs first and can consume the event. Also fix the
distance-from-top calculation to use window frame height instead of
contentLayoutRect height, since the tab bar is in the titlebar area.

* Remove unnecessary delay from double-click monitor installation

* Show split buttons on hover only in minimal mode, fix sidebar controls re-attachment

Two fixes:
1. Add splitButtonsOnHover to BonsplitConfiguration.Appearance. In
   minimal mode, the Bonsplit split buttons (terminal, browser, split
   right/down) fade in only when hovering the tab bar. Revert to
   always-visible when switching back to standard mode.
2. Delay titlebar accessory re-attachment when switching to standard
   mode so the toolbar is re-added first. Without this, the accessory
   attaches before the toolbar exists, causing the sidebar controls
   to not appear in the titlebar.

* Fix splitButtonsOnHover via onChange instead of body eval, add debug logs

* Update bonsplit submodule for splitButtonsOnHover

* Remove debug logs, verified splitButtonsOnHover and accessory re-attachment on macmini

* Read presentationMode directly in TabBarView via @AppStorage

The @Observable configuration propagation wasn't reliably triggering
re-renders in TabBarView. Read the workspacePresentationMode directly
via @AppStorage in TabBarView instead, which SwiftUI reactively
updates when UserDefaults changes. Remove the syncSplitButtonsOnHover
workaround from WorkspaceContentView.

* Fix tab drag, double-click zone, and sidebar controls re-attachment

- Revert isMovableByWindowBackground to false; it breaks Bonsplit tab
  reordering. Keep isMovable=true in minimal mode so the sidebar area
  (which has WindowDragHandleView) is draggable.
- Increase double-click intercept zone from 30pt to 40pt to cover the
  full tab bar height (33pt).
- Use asyncAfter(0.1s) for titlebar accessory re-attachment when
  switching to standard mode, giving the toolbar time to re-attach.

* Add debug logging for titlebar accessory re-attachment diagnosis

* Fix crash and sidebar controls re-attachment

Remove debug logging that crashed when accessing window properties
during iteration. Increase deferred re-attachment delay to 0.3s to
give the WindowAccessor callback time to set the window identifier
and toolbar before attachIfNeeded checks isMainTerminalWindow.

* Keep titlebar accessories attached in minimal mode instead of removing

The remove/re-add cycle was fragile: re-attachment depended on window
identifiers being set, toolbar being re-added, and timing delays.
Instead, keep TitlebarControlsAccessoryViewController always attached
and let its own UserDefaults observer handle visibility. It already
hides itself (view.isHidden=true, preferredContentSize=.zero) in
minimal mode and shows itself in standard mode. No timing hacks needed.

* Force titlebar accessory layout after toolbar re-addition

* Use both self.isHidden and view.alphaValue/isHidden for accessory visibility

self.isHidden alone doesn't reliably hide the accessory when the
toolbar is nil on macOS 26. Add view.alphaValue=0 and view.isHidden
as visual fallbacks. Crucially, don't zero preferredContentSize or
frames so fittingSize returns valid values when switching back.

* Set window.isMovable=false always to fix sidebar button clicks

window.isMovable=true in minimal mode blocks clicks on the sidebar
controls because the native titlebar drag intercepts mouse events in
the overlapping area. The sidebar's WindowDragHandleView already
handles drag-to-move via performDrag with withTemporaryWindowMovableEnabled,
so native isMovable isn't needed.

* Add drag-to-move from empty bonsplit tab bar space in minimal mode

* Use overlay for tab bar drag, smart hitTest passes through tabs/buttons

* Add double-click zoom/minimize to tab bar drag view

* Add leading padding for traffic lights when sidebar collapsed in minimal mode

* Add traffic light inset to tab bar when sidebar collapsed in minimal mode

* Fix accessory space and double-click in minimal mode

- Zero preferredContentSize in minimal mode (so accessory takes no
  space) but seed hostingView with cached size before querying
  fittingSize when switching back (so size can be restored).
- Skip EmptyTabBarDoubleClickMonitorView in minimal mode so
  DraggableTabBarView handles double-click for zoom instead.
- Remove redundant ContentView double-click monitor.

* Auto-detect traffic light inset in TabBarView via GeometryReader

Instead of propagating sidebar state through config, the tab bar
detects its own position relative to the window. If in minimal mode
and the tab bar's leading edge is near the window edge (< 20pt, no
sidebar), add 72pt spacer for traffic light clearance.

* Increase traffic light spacer to 80pt

* Fix tab click passthrough in minimal mode drag overlay

* Check full window for interactive hits in drag overlay

* Fix drag overlay capturing all clicks via reentrancy guard in hitTest

* Distinguish interactive controls from hosting views in drag hitTest

* Walk ancestor chain for button detection in drag overlay hitTest

* Replace overlay with background drag view per ensemble recommendation

* Only add traffic light inset for top-left pane

* Use GeometryReader for traffic light inset, check screen position

* Fix operator precedence in traffic light inset check

* Use window frame for traffic light inset detection

* Set tabBarLeadingInset from ContentView via onChange handlers

Replace unreliable coordinate-based detection with direct state from
ContentView, which knows both sidebar visibility and minimal mode.
Syncs on appear, sidebar toggle, and mode toggle.

* Use allPaneIds.first for top-left pane detection, no hierarchy threading needed

* Update bonsplit submodule to merged main

---------

Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
2026-03-27 20:25:51 -07:00
.claude/commands Add contributor credits to release skills (#319) 2026-02-22 16:18:44 -08:00
.github Switch release builds to macOS Tahoe runner (#2233) 2026-03-26 21:09:59 -07:00
AppIcon.icon Regenerate app icons from Icon Composer (#1005) 2026-03-06 04:30:54 -08:00
Assets.xcassets Regenerate app icons from Icon Composer (#1005) 2026-03-06 04:30:54 -08:00
CLI Improve cmux omo error when opencode is not installed (#2230) 2026-03-26 19:28:22 -07:00
cmuxTests Revert "Fix Intel second-surface config inheritance crash (#2179)" (#2267) 2026-03-27 20:07:12 -07:00
cmuxUITests Fix UI regression test self capture 2026-03-25 17:51:15 -07:00
daemon/remote Fix SSH remote CLI and loopback proxy follow-ups 2026-03-17 01:58:50 -07:00
design Regenerate app icons from Icon Composer (#1005) 2026-03-06 04:30:54 -08:00
docs docs: Add localized assets for Korean README (#1811) 2026-03-26 21:24:36 -07:00
ghostty@bc9be90a21 Merge origin/main into feat-cmux-themes-command 2026-03-13 17:22:12 -07:00
GhosttyTabs.xcodeproj Fix minimal mode toggle not updating titlebar state (#2218) 2026-03-27 20:25:51 -07:00
homebrew-cmux@a5f372ecfa Fix CI: remove broken tests for deleted function, fix review comments 2026-03-15 21:08:02 -07:00
node_modules Update app and tooling 2026-01-29 17:36:26 -08:00
Resources feat(i18n): add Ukrainian (uk) localization (#2226) 2026-03-26 21:27:36 -07:00
scripts Fix nightly SSH remote daemon checksum mismatch (#2225) 2026-03-26 17:24:37 -07:00
skills Document browser navigation verification loop (#974) 2026-03-05 20:57:18 -08:00
Sources Fix minimal mode toggle not updating titlebar state (#2218) 2026-03-27 20:25:51 -07:00
tests Fix nightly SSH remote daemon checksum mismatch (#2225) 2026-03-26 17:24:37 -07:00
tests_v2 Add cmux omo command for oh-my-openagent integration (#2087) 2026-03-26 16:07:59 -07:00
vendor Fix minimal mode toggle not updating titlebar state (#2218) 2026-03-27 20:25:51 -07:00
web feat(i18n): add Ukrainian (uk) localization (#2226) 2026-03-26 21:27:36 -07:00
.gitignore Add homepage wall of love, FAQ, blog post, footer redesign, and SEO improvements 2026-02-21 06:16:38 -08:00
.gitkeep chore: update release skill metadata 2026-02-21 04:21:11 -08:00
.gitmodules Fix frozen terminals after split churn (#12) 2026-02-13 16:45:31 -08:00
.vercelignore Add Vercel ignore 2026-01-29 17:50:35 -08:00
AGENTS.md agents 2026-01-22 03:18:02 -08:00
bun.lock Update app and tooling 2026-01-29 17:36:26 -08:00
CHANGELOG.md Add configurable sidebar tint color with light/dark mode support (#1465) 2026-03-15 15:48:57 -07:00
CLAUDE.md reload.sh: default to build-only, add --launch flag (#2097) 2026-03-24 21:45:48 -07:00
cmux-Bridging-Header.h Rename to cmux and add About panel 2026-01-26 03:05:03 -08:00
cmux.entitlements fix: remove restricted web-browser entitlement (#1727) 2026-03-18 02:32:58 -07:00
CONTRIBUTING.md reload.sh: default to build-only, add --launch flag (#2097) 2026-03-24 21:45:48 -07:00
ghostty.h Update ghostty to v1.3.0 (#1142) 2026-03-09 21:32:54 -07:00
LICENSE Add dual licensing (AGPL + commercial) (#2021) 2026-03-23 18:53:39 -07:00
package.json Add nightly update channel workflow and adopt AGPL licensing 2026-02-14 02:43:03 -08:00
Package.resolved Initial commit: macOS terminal app with vertical tabs using libghostty 2026-01-22 01:16:24 -08:00
Package.swift Rename to cmux and add About panel 2026-01-26 03:05:03 -08:00
PROJECTS.md Reversion all 1.x.x to 0.x.x for pre-launch versioning 2026-02-17 18:31:05 -08:00
README.ar.md feat(i18n): add Ukrainian (uk) localization (#2226) 2026-03-26 21:27:36 -07:00
README.bs.md feat(i18n): add Ukrainian (uk) localization (#2226) 2026-03-26 21:27:36 -07:00
README.da.md feat(i18n): add Ukrainian (uk) localization (#2226) 2026-03-26 21:27:36 -07:00
README.de.md feat(i18n): add Ukrainian (uk) localization (#2226) 2026-03-26 21:27:36 -07:00
README.es.md feat(i18n): add Ukrainian (uk) localization (#2226) 2026-03-26 21:27:36 -07:00
README.fr.md feat(i18n): add Ukrainian (uk) localization (#2226) 2026-03-26 21:27:36 -07:00
README.it.md feat(i18n): add Ukrainian (uk) localization (#2226) 2026-03-26 21:27:36 -07:00
README.ja.md feat(i18n): add Ukrainian (uk) localization (#2226) 2026-03-26 21:27:36 -07:00
README.km.md feat(i18n): add Ukrainian (uk) localization (#2226) 2026-03-26 21:27:36 -07:00
README.ko.md feat(i18n): add Ukrainian (uk) localization (#2226) 2026-03-26 21:27:36 -07:00
README.md feat(i18n): add Ukrainian (uk) localization (#2226) 2026-03-26 21:27:36 -07:00
README.no.md feat(i18n): add Ukrainian (uk) localization (#2226) 2026-03-26 21:27:36 -07:00
README.pl.md feat(i18n): add Ukrainian (uk) localization (#2226) 2026-03-26 21:27:36 -07:00
README.pt-BR.md feat(i18n): add Ukrainian (uk) localization (#2226) 2026-03-26 21:27:36 -07:00
README.ru.md feat(i18n): add Ukrainian (uk) localization (#2226) 2026-03-26 21:27:36 -07:00
README.th.md feat(i18n): add Ukrainian (uk) localization (#2226) 2026-03-26 21:27:36 -07:00
README.tr.md feat(i18n): add Ukrainian (uk) localization (#2226) 2026-03-26 21:27:36 -07:00
README.uk.md feat(i18n): add Ukrainian (uk) localization (#2226) 2026-03-26 21:27:36 -07:00
README.vi.md feat(i18n): add Ukrainian (uk) localization (#2226) 2026-03-26 21:27:36 -07:00
README.zh-CN.md feat(i18n): add Ukrainian (uk) localization (#2226) 2026-03-26 21:27:36 -07:00
README.zh-TW.md feat(i18n): add Ukrainian (uk) localization (#2226) 2026-03-26 21:27:36 -07:00
THIRD_PARTY_LICENSES.md add third-party licenses and update bonsplit submodule 2026-02-14 20:33:40 -08:00
TODO.md Reapply "Merge pull request #239 from manaflow-ai/issue-151-ssh-remote-port-proxying" 2026-03-12 15:54:26 -07:00

cmux

A Ghostty-based macOS terminal with vertical tabs and notifications for AI coding agents

Download cmux for macOS

English | 日本語 | Tiếng Việt | 简体中文 | 繁體中文 | 한국어 | Deutsch | Español | Français | Italiano | Dansk | Polski | Русский | Bosanski | العربية | Norsk | Português (Brasil) | ไทย | Türkçe | ភាសាខ្មែរ | Українська

X / Twitter Discord

cmux screenshot

▶ Demo video · The Zen of cmux

Features

Notification rings

Panes get a blue ring and tabs light up when coding agents need your attention
Notification rings

Notification panel

See all pending notifications in one place, jump to the most recent unread
Sidebar notification badge

In-app browser

Split a browser alongside your terminal with a scriptable API ported from agent-browser
Built-in browser

Vertical + horizontal tabs

Sidebar shows git branch, linked PR status/number, working directory, listening ports, and latest notification text. Split horizontally and vertically.
Vertical tabs and split panes
  • Scriptable — CLI and socket API to create workspaces, split panes, send keystrokes, and automate the browser
  • Native macOS app — Built with Swift and AppKit, not Electron. Fast startup, low memory.
  • Ghostty compatible — Reads your existing ~/.config/ghostty/config for themes, fonts, and colors
  • GPU-accelerated — Powered by libghostty for smooth rendering

Install

Download cmux for macOS

Open the .dmg and drag cmux to your Applications folder. cmux auto-updates via Sparkle, so you only need to download once.

Homebrew

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

To update later:

brew upgrade --cask cmux

On first launch, macOS may ask you to confirm opening an app from an identified developer. Click Open to proceed.

Why cmux?

I run a lot of Claude Code and Codex sessions in parallel. I was using Ghostty with a bunch of split panes, and relying on native macOS notifications to know when an agent needed me. But Claude Code's notification body is always just "Claude is waiting for your input" with no context, and with enough tabs open I couldn't even read the titles anymore.

I tried a few coding orchestrators but most of them were Electron/Tauri apps and the performance bugged me. I also just prefer the terminal since GUI orchestrators lock you into their workflow. So I built cmux as a native macOS app in Swift/AppKit. It uses libghostty for terminal rendering and reads your existing Ghostty config for themes, fonts, and colors.

The main additions are the sidebar and notification system. The sidebar has vertical tabs that show git branch, linked PR status/number, working directory, listening ports, and the latest notification text for each workspace. The notification system picks up terminal sequences (OSC 9/99/777) and has a CLI (cmux notify) you can wire into agent hooks for Claude Code, OpenCode, etc. When an agent is waiting, its pane gets a blue ring and the tab lights up in the sidebar, so I can tell which one needs me across splits and tabs. Cmd+Shift+U jumps to the most recent unread.

The in-app browser has a scriptable API ported from agent-browser. Agents can snapshot the accessibility tree, get element refs, click, fill forms, and evaluate JS. You can split a browser pane next to your terminal and have Claude Code interact with your dev server directly.

Everything is scriptable through the CLI and socket API — create workspaces/tabs, split panes, send keystrokes, open URLs in the browser.

The Zen of cmux

cmux is not prescriptive about how developers hold their tools. It's a terminal and browser with a CLI, and the rest is up to you.

cmux is a primitive, not a solution. It gives you a terminal, a browser, notifications, workspaces, splits, tabs, and a CLI to control all of it. cmux doesn't force you into an opinionated way to use coding agents. What you build with the primitives is yours.

The best developers have always built their own tools. Nobody has figured out the best way to work with agents yet, and the teams building closed products definitely haven't either. The developers closest to their own codebases will figure it out first.

Give a million developers composable primitives and they'll collectively find the most efficient workflows faster than any product team could design top-down.

Documentation

For more info on how to configure cmux, head over to our docs.

Keyboard Shortcuts

Workspaces

Shortcut Action
⌘ N New workspace
⌘ 18 Jump to workspace 18
⌘ 9 Jump to last workspace
⌃ ⌘ ] Next workspace
⌃ ⌘ [ Previous workspace
⌘ ⇧ W Close workspace
⌘ ⇧ R Rename workspace
⌘ B Toggle sidebar

Surfaces

Shortcut Action
⌘ T New surface
⌘ ⇧ ] Next surface
⌘ ⇧ [ Previous surface
⌃ Tab Next surface
⌃ ⇧ Tab Previous surface
⌃ 18 Jump to surface 18
⌃ 9 Jump to last surface
⌘ W Close surface

Split Panes

Shortcut Action
⌘ D Split right
⌘ ⇧ D Split down
⌥ ⌘ ← → ↑ ↓ Focus pane directionally
⌘ ⇧ H Flash focused panel

Browser

Browser developer-tool shortcuts follow Safari defaults and are customizable in Settings → Keyboard Shortcuts.

Shortcut Action
⌘ ⇧ L Open browser in split
⌘ L Focus address bar
⌘ [ Back
⌘ ] Forward
⌘ R Reload page
⌥ ⌘ I Toggle Developer Tools (Safari default)
⌥ ⌘ C Show JavaScript Console (Safari default)

Notifications

Shortcut Action
⌘ I Show notifications panel
⌘ ⇧ U Jump to latest unread

Find

Shortcut Action
⌘ F Find
⌘ G / ⌘ ⇧ G Find next / previous
⌘ ⇧ F Hide find bar
⌘ E Use selection for find

Terminal

Shortcut Action
⌘ K Clear scrollback
⌘ C Copy (with selection)
⌘ V Paste
⌘ + / ⌘ - Increase / decrease font size
⌘ 0 Reset font size

Window

Shortcut Action
⌘ ⇧ N New window
⌘ , Settings
⌘ ⇧ , Reload configuration
⌘ Q Quit

Nightly Builds

Download cmux NIGHTLY

cmux NIGHTLY is a separate app with its own bundle ID, so it runs alongside the stable version. Built automatically from the latest main commit and auto-updates via its own Sparkle feed.

Report nightly bugs on GitHub Issues or in #nightly-bugs on Discord.

Session restore (current behavior)

On relaunch, cmux currently restores app layout and metadata only:

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

cmux does not restore live process state inside terminal apps. For example, active Claude Code/tmux/vim sessions are not resumed after restart yet.

Star History

Star History Chart

Contributing

Ways to get involved:

Community

Founder's Edition

cmux is free, open source, and always will be. If you'd like to support development and get early access to what's coming next:

Get Founder's Edition

  • Prioritized feature requests/bug fixes
  • Early access: cmux AI that gives you context on every workspace, tab and panel
  • Early access: iOS app with terminals synced between desktop and phone
  • Early access: Cloud VMs
  • Early access: Voice mode
  • My personal iMessage/WhatsApp

License

cmux is open source under AGPL-3.0-or-later.

If your organization cannot comply with AGPL, a commercial license is available. Contact founders@manaflow.com for details.