1. Getting started
-
Install and launch from your project root:
pip install pairwit && pairwit -
Put a provider key in
.env(project) or~/.pairwit/.env(global). Moonshot default:MOONSHOT_API_KEY. -
Optional:
/initscaffolds.pairwit.md— project notes injected into every session./reload-contextre-reads it.
2. The desk
Pairwit is a three-zone terminal desk, not a browser IDE. Top to bottom / left to right:
- Header — product title, model · provider, menu, Files / Editor toggles, and a live stats strip (tokens, cost, turns, open file).
-
Files pane (optional) — project tree. Toggle with header
Files or
Ctrl+B. - Chat — transcript, tool cards, prompt. Always the main column.
-
Editor pane (optional) — tabs, syntax-highlighted buffers, find.
Open a file from the tree, then use header Editor or
Ctrl+E.
Plan mode shows a slim banner under the header so you always know analysis will not mutate by accident.
3. Panes & resizing
Between Files ↔ Chat and Chat ↔ Editor sits a vertical grip marked
┊.
- Drag the grip horizontally to grow or shrink that side pane. Chat keeps a minimum width so the transcript stays readable.
- Double-click the grip to reset that pane to its default width (you’ll see a brief “Pane width reset” notice).
- Hover / drag highlights the grip in accent blue so you can find it in a dense terminal.
-
Close Files with
Ctrl+Bor the header toggle. Close the whole editor pane withCtrl+Ewhen focused there (or the header Editor button). Close one tab withCtrl+W.
Tip
Mouse support depends on your terminal (iTerm2, Kitty, WezTerm, Windows Terminal, etc.). If drag feels dead, try another emulator or enable mouse reporting.
4. Plan / Build
Press Tab (or use the menu) to flip modes. Header subtitle shows
Plan when active.
- Plan — read, reason, propose. Mutating tools stay gated so you can explore without writing the repo.
- Build — full agent loop. Writes and shell still go through approvals unless you’ve allowed them.
Typical flow: Plan the change → review the proposal in chat → switch to Build → approve concrete edits.
5. Chat
- Type in the prompt and press Enter to send.
-
Type
@(or/mention) for a fuzzy file picker — mentions expand into file context for the model. -
Ctrl+Oor/attachattaches a file;/detachclears attachments. - Up / Down in the prompt recalls prior messages from this session.
-
EscorCtrl+Ccancels a running turn.Ctrl+Cwhen idle quits Pairwit. Ctrl+Lclears the chat (unsaved editor buffers still block clear)./undo//redorevert or restore the last turn.
6. File tree
- Open with
Ctrl+Bor header Files. - Click a file to open it in the editor pane.
-
Right-click a node for a context menu. Keyboard on the cursor node:
nnew file,rrename,ddelete. - Vendor / junk directories are filtered from the tree by default.
- Source names are tinted lightly by language for scanability.
7. Editor
- Multi-tab buffers with syntax highlighting. Dirty tabs show a marker; the stats bar shows the active file name.
-
Ctrl+Ssave ·Ctrl+Shift+Ssave as ·Ctrl+Nnew file ·Ctrl+Ffind ·Ctrl+Wclose tab ·Ctrl+Eclose / focus the pane. -
Select a region, then
Ctrl+Shift+L(or the selection bar) to add those lines to the chat prompt as an@path:linesreference. - Delete the file open in the editor from the menu when you intend to remove it from disk (confirm prompts apply).
8. Approvals
Mutating tools — bash, write_file,
edit_file — pause the loop until you decide. Set
PAIRWIT_ASK_TOOLS=0 only if you want auto-allow (not recommended for
shared or sensitive repos).
- Once — allow this call only (
1/y). -
Session — allow this tool for the rest of this Pairwit run
(
2). -
Always — persist an allow rule to
.pairwit.permissions(3). - Deny — block and continue (
n/Esc).
Rules live in project .pairwit.permissions
(allow: / deny: / ask:) or
~/.pairwit/permissions.json.
9. Sessions
- Each run saves under the project’s Pairwit session directory as JSON. Stats and messages restore on resume.
/sessions— pick a past session (newest first)./resume— load the latest session for this project.- Starting Pairwit again in the same project can pick up the last session so you don’t lose the thread.
10. Providers & models
-
/provider— Moonshot, OpenAI, Anthropic, OpenRouter, DeepSeek, Ollama, or custom. Missing keys get a clear message instead of a silent fail. /model— switch model for the active provider.-
Header subtitle always shows
model · provider(plus Plan when active).
11. Slash commands
/helpIn-app help card/modelPick model/providerSwitch provider/mention@ file picker/sessionsLoad a past session/resumeLatest session/undo · /redoLast turn/initScaffold .pairwit.md/reload-contextRe-read .pairwit.md/attach · /detachFile attachments
Ctrl+P opens the command palette — search Pairwit actions and Textual
system commands. The header menu lists the same shortcuts.
12. Shortcut map
TabPlan / Build@Mention fileCtrl+BToggle FilesCtrl+EFocus / close Editor paneCtrl+WClose editor tabCtrl+SSaveCtrl+Shift+SSave asCtrl+NNew fileCtrl+FFind in editorCtrl+Shift+LSelection → chatCtrl+OAttach fileCtrl+LClear chatCtrl+PCommand paletteEscCancel turnCtrl+CCancel turn / quit if idle┊Resize pane┊Reset pane width