Repository navigation
Terminal
English | 한국어
Terminal tabs are drawn by the Ghostty engine.^readme The shell starts in the tab's working folder, and when you cd, the tab's working folder follows. The status bar shows it on the right.
-
⌘Topens a new terminal. It starts in the folder set by New tab folder in Settings (the workspace root by default). - In the Files panel, right-click a folder → Open terminal here.
- When the shell ends (
exit), the tab closes. If it exits abnormally, Notifications record the exit code. - A tab with a running program closes only on the second try. A shell waiting at its prompt does not count, even while prompt helpers run in the background. To turn this off, go to Settings → Terminal → Confirm close while running.
Terminals keep running when you are not looking at them. Agents read background terminals with cozzle tab read.
A terminal tab is named after the program running in it, in the tab strip, in the left sidebar and in cozzle tab list.^workspace For example, starting Claude Code names the tab Claude Code. When the program exits and the shell is back, the tab is named Terminal again.
The name is chosen in this order:
- The name you gave the tab (double-click the tab, or
cozzle tab rename). - A known program:
claude→ Claude Code,codex→ Codex,vim→ Vim,nvim→ Neovim,ssh web1→ ssh web1, and package runners in short form, such as npm run dev, pnpm dev, cargo run or python manage.py runserver. Programs started throughnodeorpythonare named after their script. - The title the program set (OSC 0 or 2), unless it is a folder path.
- The program's file name, such as htop.
- Terminal while the shell is at its prompt.
Right-click in a terminal to open its menu. It opens even while a program that uses the mouse, such as Claude Code or Vim, is running.^term-link
- If nothing is selected, the right-click first selects the word under the pointer, so Copy copies it. A word is a run of characters without spaces, quotes or brackets, so a path like
src/app.rsis one word. - Shift-right-click sends the click to a program that uses the mouse, as a plain right-click. When no such program is running, it opens the menu.
| Item | Key | What it does |
|---|---|---|
| Copy | ⌘C |
Copies the selection. Dimmed when nothing is selected. |
| Paste | ⌘V |
Same as ⌘V: text is pasted (multi-line text asks first), an image sends Ctrl+V so Claude Code or Codex can read it (nothing is sent to a plain shell), files paste as quoted paths. |
| Select All | ⌘A |
Selects the screen. |
| Clear | ⌘K |
Sends form feed, which clears the screen in most shells. |
| Find… | ⌘F |
Opens the find bar. |
| Split Right / Split Down | Opens a new terminal in the same folder beside or below this one. | |
| New Terminal Tab Here | Opens a new terminal tab in the same folder. | |
| Copy Working Directory Path, Show in Finder | ||
| Rename Tab | F2 |
|
| Close Tab | ⌘W |
Right-click a web address to put Open in cozzle Browser, Open in Default Browser and Copy Link Address at the top of the menu.
Click a web address, including a link a program marks with OSC 8, to get those three items as a small menu. ⌘-click opens it in the default browser at once. Both work while a program that uses the mouse, such as Claude Code or Vim, is running, and the click on the address does not reach that program.^term-link
On macOS and Linux, cozzle terminals set BROWSER to a cozzle helper, so a program that opens a link through $BROWSER (Claude Code does, for example) shows the same menu instead of opening the default browser directly. The same address opened again within 1.5 seconds shows the menu only once.
A trackpad scrolls by how far your fingers move, one line per character cell height. A mouse wheel scrolls three lines per notch. A program that uses the mouse gets one wheel step per line, so Claude Code and Vim scroll at the same speed as the shell.^term-scroll
To scroll faster or slower, set terminalScrollMultiplier in a settings file, for example "terminalScrollMultiplier": 1.5. The default is 1, and the range is 0.1 to 10. A project's .cozzle/settings.json can set it too. There is no row for it in Settings.
Press ⌘F (Ctrl+Shift+F outside macOS) to show the find bar at the top right of the terminal. It searches the scrollback too, not only the screen.^term-find
- Type the text. Matches are highlighted, with a count such as
3/12. - Press Enter or
⌘Gfor the next match, and⇧Enteror⇧⌘Gfor the previous one. If a match is off screen, the terminal scrolls to it. - Press
⌥⌘Cto turn case-sensitive matching on or off. - Press Esc to close the bar. Focus returns to the terminal.
When the bar opens, cozzle collects the scrollback one screen at a time. With a long scrollback, you may briefly see "Searching…".
On macOS, cozzle turns common line editing keys into control characters that the shell understands.^shortcuts
| Key | Action | Sends |
|---|---|---|
⌘← |
Start of line | Ctrl+A |
⌘→ |
End of line | Ctrl+E |
⌘⌫ |
Delete everything before the cursor | Ctrl+U |
⌥← |
Back one word | Esc b |
⌥→ |
Forward one word | Esc f |
⌥⌫ |
Delete the previous word | Ctrl+W |
On Windows and Linux, Ctrl+← and Ctrl+→ move by word. Other Ctrl combinations (Ctrl+W, Ctrl+L and so on) go straight to the shell. That is why cozzle shortcuts outside macOS use Ctrl+Shift combinations.
| Action | macOS | Windows and Linux |
|---|---|---|
| Copy | ⌘C |
Ctrl+Shift+C |
| Paste | ⌘V |
Ctrl+Shift+V |
| Select all | ⌘A |
Ctrl+Shift+A |
| Clear screen | ⌘K |
Ctrl+Shift+K |
| Find | ⌘F |
Ctrl+Shift+F |
| Larger or smaller text |
⌘=·⌘-
|
Ctrl+=·Ctrl+-
|
| Page up or down |
Shift+PageUp·Shift+PageDown
|
Same |
| Top or bottom |
Shift+Home·Shift+End
|
Same |
| One line up or down |
Shift+↑·Shift+↓
|
Same |
Input methods: ⌥1…⌥0 switch workspaces even while a Korean or other composing input method is on (but not in the middle of composing). When ⌫ removes the last letter being composed, it does not also delete the character before it.^key-route
⌘0 goes to the 10th tab, so it does not reset the text size. A size changed with the keys applies only to that terminal. Set the saved default size in Settings.
Clicking a web address (http, https) opens a menu: Open in cozzle browser, Open in default browser, Copy address. ⌘-click opens it in the default browser right away. Dragging to select text over an address does not open the menu, and while a program uses the mouse (vim, tmux) a plain click goes to the program.
Context menu: Copy (when text is selected), Paste, Select all, Clear screen, Copy working folder path, Show in Finder.
Change these in Settings → Terminal. Font, appearance and behavior apply to open terminals at once. Shell and scrollback apply to new tabs.^settings
| Group | Items |
|---|---|
| Font | Font (installed monospace fonts), size, weight, line height |
| Appearance | Color theme (dark, light, black), cursor shape, cursor blink |
| Behavior | Copy on select, confirm multi-line paste, confirm close while running, bell |
| Shell | Shell and shell arguments, new tab folder, scrollback |
If you already set up Ghostty on your Mac, cozzle terminals can use its font and colors. Go to Settings → Terminal → Use Ghostty settings. It is on by default when a Ghostty config file exists, and it is an all-projects setting.^ghostty
cozzle reads, in Ghostty's order, config.ghostty and config in $XDG_CONFIG_HOME/ghostty/ (default ~/.config/ghostty/) and then in ~/Library/Application Support/com.mitchellh.ghostty/, plus files added with config-file. cozzle only reads these files. It never runs anything from them and ignores keys it does not use, such as command and keybind. Files outside your home folder and the Ghostty app are not read.
| Ghostty key | cozzle row |
|---|---|
font-family (first installed one; the rest are fallbacks), font-size
|
Font, size |
adjust-cell-height |
Line height |
theme (also light:A,dark:B), background, foreground, palette, cursor-color, selection-background, selection-foreground
|
Color theme |
cursor-style, cursor-style-blink
|
Cursor shape, cursor blink |
copy-on-select |
Copy on select |
window-padding-x (or -y), window-padding-balance
|
No row; used as the terminal padding |
- A value you set in cozzle, for all projects or for this project, wins over Ghostty. Rows filled from Ghostty show a blue dot and Ghostty.
- Themes are found in
~/.config/ghostty/themes/and in the installed Ghostty app.light:anddark:follow the macOS appearance. - The row under the switch shows the file that was read. cozzle reads it again when the file changes, or when you click Reload.
- If the Ghostty font is not installed, cozzle uses the next installed Ghostty font or the default font, and shows the missing font name.
-
font-thickenandbackground-opacityare not used.
cozzle runs terminal shells in a terminal host, a small background process (cozzle-cli pty-host). When cozzle restarts for an update or after a crash, the shells and the programs in them keep running, and cozzle reattaches each tab to its terminal. The screen comes back from the output the host kept, and full-screen programs redraw.^host
- The host keeps the last 2 MB of each terminal's output in memory only. It never writes terminal output to disk.
- When you quit cozzle (
⌘Q, menu or the window close button) while an agent is working or waiting for your answer, or a tab without an agent runs a program (a dev server, a build), cozzle lists those tabs and asks: End All and Quit, Keep Running in Background or Cancel. Agents sitting at their prompt and idle shells do not count. With nothing to lose it quits right away. Quitting from the Dock or logging out does not ask. Confirm close while running off also skips the question. - End All and Quit closes all terminals and the host ends. Keep Running in Background leaves the shells running in the host, as for an update, and the next cozzle reattaches. Tabs whose shells end while cozzle quits stay in the saved session. If the question cannot appear within 2 seconds (the window is stuck) and there is no unsaved text, cozzle quits.
- The host also ends when its last terminal closes.
- The host listens on a socket in a folder only you can open (
$XDG_RUNTIME_DIR/cozzleor~/Library/Caches/cozzle/pty, mode 0700) and accepts only connections that present the token in that folder (mode 0600). It uses no network. Both sides also check that the other end of the socket runs as you. If the folder is not private, or its path is too long for a socket, cozzle runs terminals inside the app instead. - If a terminal ended while cozzle was closed, cozzle opens a new shell in that tab with the last lines of the old screen and the restore steps from Getting started → Updating cozzle.
- To run terminals inside the app instead, set
"persistentTerminals": falsein~/.config/cozzle/settings.json.
Only cozzle terminals get:
-
The
cozzlecommand and the environment variablesCOZZLE_ADDR,COZZLE_TOKEN,COZZLE_PID(the app process),COZZLE_TAB,COZZLE_CLIandCOZZLE_WORKSPACE(the workspace root), plusCOZZLE_TERM(the terminal's number in the terminal host) in persistent terminals. See cozzle CLI. -
When the shell is zsh, bash or sh, the
claudeandcodexshell functions. They add the guide and permission options when an agent starts. See AI agents. -
After your shell startup files run, cozzle's command folder (
COZZLE_BIN) goes back to the front ofPATH, even when your startup files put other folders first. Your startup files are not changed. -
Outside a real tmux, in persistent terminals,
TMUX,TMUX_PANEandCLAUDE_CODE_TMUX_TRUECOLOR, and atmuxcommand that opens agent team teammates as tabs. See AI agents. Because they are set after your startup files, a startup file that starts tmux whenTMUXis empty still does.
When the shell starts, cozzle types these lines and function definitions and clears the screen with clear. Each definition line starts with a space so that it stays out of the shell history.
cozzle · MIT License · Repository · Open an issue · Report a vulnerability