Skip to content
pi-c The terminal interface
Login

The terminal interface

pic in a terminal (or pic tui) opens the terminal interface; pic tui -c continues the latest conversation and pic tui --session ID that one; pic -r opens with the conversation picker.

In the terminal interface: / opens the command menu (/model, /settings, /thinking, /tree, /fork, /compact, /export, /share, /resume and the rest of Pi's commands); Alt+P picks a model (Ctrl+L redraws the screen), Ctrl+P cycles models, Shift+Tab cycles thinking levels, Esc stops a reply. /help shows a short card of the keys and commands, /help keys every key, and /help TOPIC a topic of this manual. A long answer such as /hotkeys or /help keys is shown from its first line in fullscreen.

When the conversation pic tui -c (or /resume) continues has a request a crash cut off, it says so: Enter finishes it there, Esc drops it (journaled as a cancel; its prompt stays in the context, marked as interrupted), and a new message drops it too. A request always finishes with the model and thinking level it was admitted with, whoever runs it (pic run [--session ID] from a shell does the same).

A conversation another pic is running (a second terminal, an editor, a phone) can be opened here too: /resume marks it ● running in another pic. Its request shows as it runs, the reply as it streams, and the status line says Running in another pic… (type to steer, esc to stop): a line you type steers it and Esc stops it, through the inbox. If that pic dies before the request ends, this one says so, and Enter resumes the request here.

The command menu shows five rows at a time, scrolling with the selection, and (selected/total) under them when more commands match, as Pi's does. /resume lists conversations most recent first, each by its title, with a fork under the conversation it came from (├─ and └─ branches, as in Pi's session selector), and (selected/total) under a list longer than twelve. An edit's diff in the transcript carries Pi's line numbers: -12 old line, +12 new line, taken from the file as it was before the edit.

Every slash command is in the slash command reference and every key in the key reference. Colours are covered in themes.

Fullscreen and regular

The terminal interface draws fullscreen by default; --tui-mode regular (setting tuiMode) draws inline in the scrollback instead. The fullscreen* settings choose what fullscreen leaves behind on exit, the scrollbar, copy on select and the mouse wheel's step; see settings. With TERM=dumb pic always draws inline.

Filters and pickers

Every picker, the settings panel and the search boxes filter alike: the same fuzzy matcher (sn5 finds claude-sonnet-5; words in any order), and the same editing keys. Backspace takes a character, Ctrl+W a word and Ctrl+U the whole filter; Home and End jump to the first and last row. Esc closes a picker; the settings panel clears its filter first. A hint longer than the window wraps rather than being cut.

The mouse

In fullscreen pic takes the mouse: the wheel scrolls the transcript, a drag selects and copies, and a click opens a link (links).

A click on the model at the right end of the footer opens the model picker, on the thinking level the thinking selector, and on key NAME the key list of /auth, all while a reply streams too; a click on /rc opens /rc.

A right click hands the mouse back to the terminal until you press a key or come back to the window: the terminal's own menu (Ghostty's splits), its selection and its Cmd-click work as they do anywhere else. The status row says so while it lasts. To leave the mouse to the terminal for the whole session, use /mouse or Alt+M (they turn it back on, too); pic settings mouse off keeps it that way. Without the mouse, PageUp, PageDown and the other scroll keys move the transcript, and pic turns off the terminal's alternate scroll mode so the wheel does not walk through your prompt history; it is put back when pic exits.

Copying

A drag in the transcript copies its text when you let go and says "Copied!"; Ctrl+X copies the last reply whole. The copy is pic's, not the terminal's, so the terminal's own Cmd-C has nothing selected:

pic puts the terminal back when it exits, crashes or is suspended with Ctrl+Z. Only a kill -9 leaves no chance to: if the terminal is left on a blank screen, or clicks print strange characters, type reset and press Enter.

After you scroll up, a small ↓ button shows at the right end of the transcript's last row. Click it (when your terminal passes the mouse to pic), or type or press Enter, and the view follows the latest message again. Ctrl+End does too, and so does Ctrl+Shift+Down on a Mac keyboard, which has no End key; /hotkeys lists them.

Links in replies, and URLs and file paths in replies and tool output, are clickable: Cmd-click on macOS, Ctrl-click elsewhere. pic marks them with OSC 8 hyperlinks without changing the text, so a URL that pic wraps over several lines stays one link. A markdown link to a path, and a path such as src/foo.c:42 that names a file in the workspace, open the file through a file:/// URL; the line number is left out, since terminals hand the URL to the system's opener, which takes no line.

In fullscreen pic reports the mouse to itself, so a terminal's own Cmd-click needs Shift too (Shift+Cmd-click in Ghostty). A plain click on a link opens it instead, with open on macOS or xdg-open elsewhere, as Claude Code's fullscreen does; like Ghostty, it will not open a file the opener would run (an executable, an app, a script). Over ssh that opener would run on the wrong machine, so a click copies the link to your clipboard and hands the mouse to your terminal until the next key: Cmd-click (Ctrl-click on Linux) the link again and your terminal opens it on your computer. A file link names a file on the remote machine, so a click there copies its path instead. Under mosh, which passes the copy (from mosh 1.4) but not the link itself, paste the address. Regular mode leaves the mouse to the terminal.

Links are on unless the terminal is known to print the sequence or drop it: TERM dumb or linux, Apple's Terminal, and GNU screen show the link's address after its text instead. Inside tmux they are on from tmux 3.4, which passes them on when the outer terminal has the hyperlinks feature (set -as terminal-features '*:hyperlinks'). The hyperlinks setting (auto, on, off, also in /settings) overrides the guess.

Apple's Terminal drops OSC 8 and leaves the text under it dead, so there pic prints each link's address (a markdown link's after its text) and Terminal opens a URL you Cmd-double-click; a single Cmd-click does nothing in Terminal. It cannot open a file path, or an address pic wrapped over two lines. With the mouse on (/mouse) pic still knows every link, paths included: a click opens it, and a Cmd-double-click opens it once.

When a reply is ready

When a reply finishes (or a request fails) and pic is waiting for you, it rings the terminal's bell and asks for a desktop notification ("pic: reply ready"), so the dock icon bounces or a notification appears while you are in another window. It does this only when the terminal has reported that the window lost focus, or, in a terminal that never reports focus, after a turn of 10 seconds or more. Nothing is sent after Esc stops a reply. Ghostty, iTerm2, kitty and WezTerm show the notification; foot and VTE terminals get theirs in the form they understand; Terminal.app and others ring the bell only. pic settings notifyWhenDone false turns it off.

When a newer pic is installed

New builds of pic arrive often. The terminal interface looks at its own file every half minute while it is idle, and when a newer pic has been installed over it, a green line above the footer says ✔ Update installed · /restart to update. It stays until you restart.

/restart starts the new pic on the same conversation, as pic tui --session ID would: your draft is still in the editor, and a credential store that asks for a passphrase does not ask again. When a reply is running the line says restarting after this reply, and pic restarts once it has finished. The conversation is in the journal, so nothing is lost either way. On a system where pic cannot tell which file it was started from, nothing is shown and /restart says so. What changed is in /changelog once you are back.

Transcript search (fullscreen)

Pi's tui.altScreen.search (Ctrl+F, or Ctrl+Shift+F in a terminal that reports Shift on a Ctrl chord, such as Kitty, WezTerm, Ghostty or iTerm2 with CSI u on; both can be rebound) opens Pi's box at the top right (40% wide, at least 32 columns). The query matches case-insensitively over the whole transcript as one text, whitespace and line breaks as single spaces, including the reply being written; every match is highlighted with the theme's searchMatchBg/searchMatchText (underlined, the current one bold and reversed), the box shows i/n or No matches, and the viewport scrolls so the current match is a third of the way down. The first match at or after the top of the view is selected as you type; searchNext (Enter, Ctrl+G) and searchPrevious (Shift+Enter, Shift+Ctrl+G) wrap; searchClose (Esc) closes it, and so does the open key again. While it is open it has the keyboard (PageUp/PageDown and the other scroll keys still scroll). Differences from Pi: the query is edited at its end only (Backspace, Ctrl+W, Ctrl+U, paste), the box's arrows are not clickable, and case folding covers ASCII, Latin, Greek and Cyrillic.

Prompt history

Up and Ctrl+R walk back through what you typed: in a new conversation, the prompts of this folder's earlier conversations; in a resumed one, its own. Ctrl+C and Esc Esc empty the editor, but what was in it goes onto the history, so Up brings the cleared draft back.

Commands worth knowing