Install
- 1Drag
Cockpit.appinto/Applications. - 2Open it. The Setup screen appears on first launch.
- 3Work down the Setup rows: choose your terminals, allow the permissions, and install the Claude Code hook.
- 4Restart any Claude Code sessions that are already running so they pick up the hook.
Left-click the menu-bar icon to show the widget. Right-click it for Tidy All, Focus Mode, Setup and Quit. The widget has three columns side by side: Arrange, Place and Look.
Permissions and why
| Permission | Needed for | Why |
|---|---|---|
| Automation → Terminal | Terminal windows | To list, move, resize, refont, focus and minimise Terminal windows through AppleScript. |
| Automation → Ghostty | Ghostty windows | To list Ghostty windows and terminals, focus them and set font size. |
| Accessibility | Ghostty, Focus mode | Ghostty windows are moved, resized and minimised through the Accessibility API. |
How it works
Setup → Install copies a small helper, cockpit-hook, to ~/Library/Application Support/Cockpit/bin/ and adds 7 entries to ~/.claude/settings.json. Before it changes that file it saves a backup next to it (settings.json.cockpit-backup-YYYYMMDD-HHmmss). Your other settings and hooks are kept, but the order of keys in the file may change.
| Claude Code event | Session becomes |
|---|---|
| SessionStart | ready |
| UserPromptSubmit | working |
| PreToolUse (AskUserQuestion, ExitPlanMode) | needs you |
| PostToolUse | working again, only if it was needs you |
| Notification (except idle reminders) | needs you |
| Stop | ready |
| SessionEnd | removed |
The hook writes one small JSON file per terminal tab to sessions/, and the app reads those files. The hook never prints anything, always exits 0 and finishes within milliseconds. Its errors go to hook.log in the same folder.
Everything stays on your Mac.
Files Cockpit owns
~/Library/Application Support/Cockpit/ bin/cockpit-hook the hook helper sessions/*.json one per live Claude session config.json tint on/off and colours focus-hidden.json windows Focus mode minimised workspaces.json your workspaces logos/ workspace images (copied in) session-prefs.json titles, workspace moves, order, pins hook.log
Preferences are stored under the com.cockpit.app defaults domain.
Workspaces
A workspace is a name, an icon (an image, an SF Symbol or a coloured monogram), folders, patterns, environment variables and a command. Add and edit them under Setup → Workspaces.
How a session finds its workspace
A session goes to the first workspace that matches, checked in this order:
- 1You moved it there yourself: drag it, use Move to, or rename it to a workspace's name (
nonemeans no workspace). - 2One of the workspace's patterns matches the session's title. Patterns are case-insensitive regular expressions.
- 3The Claude process has every environment variable the workspace sets, with the same values.
- 4The session's folder is inside one of the workspace's folders. The longest folder wins.
- 5A pattern matches the session's folder. Your home folder itself never matches.
Anything left over goes under No workspace, at the bottom.
New terminal
The + buttons open a window in the app picked under Open new sessions in. It starts in the workspace's first folder, with its environment variables, and runs its command (claude by default). The new row is filed under that workspace straight away.
The session list
The toolbar has these toggles:
- Group by workspace
- Show all terminals: adds plain shells, not just Claude sessions.
- Keep on top: the widget stays open, and can be dragged, when you click elsewhere.
- +: opens a new terminal.
Inside each group, rows sort as needs you, then working, then ready, then plain shells. Dragging a row changes the order among rows with the same state. Dropping a row on another group moves it to that workspace.
Click a group's name to bring all its windows forward. Windows you minimised yourself stay minimised; only windows Focus hid come back.
Row buttons
- Rename: the title is kept per Claude session. Typing a workspace name moves the row to that workspace instead.
- Pin: Tidy won't move the window and Focus won't hide it.
- Close: click twice. It closes only that Ghostty terminal or that Terminal window. Cockpit won't close a Terminal window that has other tabs, because Terminal can't close a single tab by script.
Moving sessions between Ghostty and Terminal
The ⇄ menu in the session list has Move all sessions to Ghostty and Move all sessions to Terminal. Right-click a row for Move to Ghostty/Terminal when it's ready to move just that one.
For each one, in turn:
- 1Cockpit looks at its state file again. If it's no longer ready, it goes back to waiting.
- 2It opens a new window in the other app, in the session's folder, with its workspace's environment, running
claude --resume <session id>. Flags like--modeland--permission-modeare kept. A prompt from the original command line is never sent again. - 3It waits up to 60 seconds for the resumed session to report in through the hook. If it doesn't, the move fails and the old window stays open.
- 4If the old session started a new turn in the meantime, the move fails and both windows stay open. Otherwise the old Claude process is asked to quit; if it hasn't after 10 seconds, both windows stay open.
- 5The old window or terminal closes. Its workspace, list position and pin carry over to the new one.
A session waits, with the reason shown, while it is working or needs you, while its window is minimised, while its Terminal window has other tabs, and (for Move all) while it's the window you're typing in. Click the progress line for each session's status, or Stop to drop everything still waiting.
Focus mode
Focus mode minimises windows whose sessions are all busy working, and brings each one back when it needs you or is done. Pinned windows are never hidden. When you quit Cockpit, every window Focus hid is put back.
Hotkey
Tidy All is bound to ⌃ ⌥ ⌘ T. If another app already owns that combination, Cockpit tries ⌃⌥T, then ⌥⌘T, then ⌃⌥⌘J. The widget footer and the Setup screen show which one is active.
Look
Look sets a theme (Classic, See Through, Midnight, Graphite, Paper, Dusk), Ghostty's opacity, and hides tab and scroll bars.
Ghostty
Cockpit only writes lines inside one marked block at the end of your Ghostty config (# cockpit begin … # cockpit end): background, foreground, cursor-color, background-opacity, background-blur-radius and scrollbar. Your own lines are never edited; the block wins because Ghostty reads keys last-wins. A symlinked config is followed and the link is kept.
Before the first edit, a copy is saved as config.cockpit-backup next to the real file. A running Ghostty is told to reload, then status tints are repainted. Cockpit never creates a Ghostty config on a Mac without Ghostty.
Terminal
Open, non-minimised tabs get the theme's background, text and cursor colours through AppleScript. Terminal can't change transparency live, so translucency stays a Terminal profile setting. Hiding tab and scroll bars hides the tab bar on single-tab windows and shows scroll bars only while scrolling; showing them reverses both. The title bar can't be hidden.
Uninstall
- 1Setup → Uninstall hook. This removes only Cockpit's entries from
~/.claude/settings.json. - 2Quit Cockpit.
- 3Delete
Cockpit.app. - 4Delete
~/Library/Application Support/Cockpit. - 5Run
defaults delete com.cockpit.app.
Notes
- Status tint works in Ghostty and Terminal.
- Ghostty sessions are matched by folder, or, when several share a folder, by briefly setting a unique tab title (put back at once).
- Sessions already running when Cockpit starts appear within 3 seconds. Their state is read from the session transcript until the hook takes over.
- iTerm and other terminals are not supported yet.