# Terminal

Patterm draws agent and process terminals itself, so the CLIs you host keep their native interface, colours, mouse support and full-screen modes.

This page covers agent terminals in TUI mode and process terminals. [Integrated](https://patterm.com/docs/agents-and-processes.md#integrated-and-tui-agents) agents use a conversation view instead, and have no terminal.

![An OpenCode agent in TUI mode, drawn by Patterm. OpenCode's own slash-command menu is open above its prompt box, with its status line below.](https://patterm.com/images/docs/terminal-tui-agent.webp)

## Rendering

Terminals are drawn on a canvas with WebGPU, and Patterm falls back to WebGL when WebGPU is not available. You do not need to choose. Patterm supports both the normal screen and the alternate screen that editors, pagers and agent TUIs switch to.

## Fonts and size

Open **Settings › Appearance** and find the **Terminal** section:

| Setting              | What it does                                                                                                                                                          |
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Font**             | Choose a bundled font, **System Mono**, or **Custom**. Custom takes a font family name installed on the device you are using, such as `Iosevka Nerd Font, monospace`. |
| **Font size**        | From 10 to 24 px. The default is 14.                                                                                                                                  |
| **Centre terminals** | Limits terminals to 960 px wide and centres them. Turn it off to use the full width.                                                                                  |

The default font is **JetBrains Mono Nerd Font (installed)**, which uses a Nerd Font on your machine if you have one and otherwise falls back to the bundled JetBrains Mono. The other presets are JetBrains Mono, Geist Mono, Fira Code, Iosevka, IBM Plex Mono, Source Code Pro and Comic Mono. A preview under the settings shows the result.

You can also change the size from the terminal itself. Press Ctrl and `+` to enlarge the text and Ctrl and `-` to shrink it. The change is saved to the same setting.

Changing the font or size resizes running terminals to fit. Patterm has no terminal colour theme setting. Programs choose their own colours.

## Scrollback and the mouse wheel

Scroll with the mouse wheel to move back through a terminal's scrollback. What the wheel does depends on the program:

- Normally it scrolls the scrollback.
- If the program has turned on mouse reporting, the wheel is sent to the program instead.
- In a full-screen program on the alternate screen that asks for it, the wheel sends arrow-key movement.

Patterm does not store raw terminal output by default. Scrollback exists while the terminal does, and a stopped or exited terminal keeps its output until you close it. For a record that outlasts the terminal, use [Conversation history](https://patterm.com/docs/conversation-history.md), which Patterm imports from the CLI's own transcripts.

## Searching

Patterm has no find box inside a terminal. To find something an agent did, open the command palette with Ctrl+K and choose **Search workspace content…**, which searches agents, conversations and history.

## Select and copy

Drag across the terminal to select text. When you release the mouse button, Patterm copies the selection to the clipboard and clears the highlight.

After a copy, a **Save selection to scratchpad** button appears in the bottom right for a few seconds. Use it to keep the copied text in a scratchpad. Choose the cross beside it to dismiss it.

When a program captures the mouse, as many TUIs do, a drag goes to the program. Hold Shift while dragging to select text instead.

## Paste

Paste with Ctrl+V or Shift+Insert. In a browser, the browser's own paste is used. Text is sent to the program as a paste.

If the clipboard holds an image and no text, Patterm sends Ctrl+V to the program, so a CLI that reads images from the clipboard can attach it.

In the browser, you can also drop files onto a terminal. Patterm uploads each one to the server and types its server path, quoted, into the terminal. Uploads are limited to 10 MiB per file and are stored in Patterm's data directory.

## Links

Links that a program marks as hyperlinks, if they use `http` or `https`, are clickable. Hover to see the address, and click to open it in a new window or tab. Plain URLs that a program prints without marking them are not clickable.

If the program has turned on mouse reporting, hold Ctrl (or Cmd) while you click to open a link instead of sending the click to the program. Hold Shift to keep selecting rather than opening it.

## Resize

A terminal fits the space it has. When you resize the window, change the sidebar or panel width, or change the font, Patterm recomputes the grid and tells the program, so full-screen programs redraw to fit.

## Shared terminals in the browser

Only one browser controls a terminal at a time. Others see it live, with a **Viewing shared terminal** notice and a **Take control** button. If the connection drops, Patterm never replays what you typed during the gap. See [One browser controls each terminal](https://patterm.com/docs/browser-and-phone.md#one-browser-controls-each-terminal) and [When the connection drops](https://patterm.com/docs/browser-and-phone.md#when-the-connection-drops).

## Keys

Patterm sends your keystrokes to the program, including Ctrl+letter combinations, Alt-prefixed keys, arrows, Home, End, Page Up, Page Down, Delete and Shift+Tab. A few shortcuts are caught by Patterm first. They use a modifier chord, such as Ctrl+Shift+B, or an extra press, so everyday terminal keys still reach the program. See [Keyboard shortcuts](https://patterm.com/docs/keyboard-shortcuts.md) for the list.

## Related

- [Keyboard shortcuts](https://patterm.com/docs/keyboard-shortcuts.md)
- [Settings](https://patterm.com/docs/settings.md)
- [Browser and phone access](https://patterm.com/docs/browser-and-phone.md)

---

This is one page of the Patterm documentation. The index of every page is at https://patterm.com/llms.txt.
