Artifact 2cebb08a53a11f95cd6498a464911a23f9a1bf6b21a58baeec1413396527df06:
- File
docs/manual/tui.md
— part of check-in
[bcb82b941e]
at
2026-11-23 11:55:36
on branch keysource
— Keep the credential store's key in the Keychain or a key file, not behind a passphrase
A new store gets a random 32-byte master key kept in the login Keychain (macOS, /usr/bin/security run as a child with the command on stdin) or the keyring (secret-tool), else ~/.pic/master.key at 0600. The source is recorded in picu_credential_key.source; a passphrase store keeps working as before. pic auth rekey keychain|file|passphrase reseals every sealed row in one transaction, and a typed passphrase is followed once by the offer to stop asking. --passphrase-fd and PIC_PASSPHRASE_COMMAND (setting passphraseCommand) give a passphrase with no terminal. pic remote opens a keychain or file store with no prompt. Every OS service stays in platform.c behind secret_key, secret_keep and secret_drop. (user: dmestas, size: 4668) [annotate] [blame] [check-ins using] [more...]
# 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 the keys and commands, and `/help TOPIC` a topic of this manual. 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](../reference/slash.md) and every key in [the key reference](../reference/keys.md). Colours are covered in [themes](themes.md). ## 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](../reference/settings.md). ## 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. ## 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 - **`/reload`** re-reads the keybindings file, the theme files and the theme setting, along with the instructions, skills, templates and model catalog. - **`/changelog`** shows what changed in pic, newest last. - **`/fork`** opens the "Fork from Message" picker; see [sessions](sessions.md). - **`/login`** lists the providers with what each uses now (a sign-in, a stored key, an environment variable, nothing); choosing one asks for its method, then the key (masked; paste works) or the sign-in, all in place. A store with a passphrase asks for it there too. Esc or Ctrl-C cancels, and a running sign-in stops. **`/logout`** removes a sign-in or key. See [credentials](credentials.md) and [subscription sign-in](sign-in.md).