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.

In the terminal interface: / opens the command menu (/model, /settings, /thinking, /tree, /fork, /compact, /export, /share, /resume and the rest of Pi's commands); Ctrl+L picks a model, Ctrl+P cycles models, Shift+Tab cycles thinking levels, Esc stops a reply. pic --help lists every command.

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, as an aborted one does in Pi), 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).

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 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.

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.

Commands worth knowing