Skip to content

Pi Cheatsheet ​

Keys: Ctrl = Control (⌃), Option = ⌥, Shift = ⇧, Enter = Return (↵). Run /hotkeys in Pi to see the shortcuts in your current configuration.

Prompting ​

ShortcutAction
EnterSubmit a message. While Pi is working, queue a steering message to run after the current tool call finishes.
Option+EnterQueue a follow-up to run after the agent finishes all queued work.
Ctrl+VPaste an image.
Option+↑Restore queued messages to the editor.
Ctrl+GOpen an external editor for longer prompts. Choose the editor with the EDITOR environment variable; the PDF suggests EDITOR="code --wait" for VS Code.
Ctrl+CClear the current prompt input.
EscCancel or abort the current operation.
Ctrl+OShow or hide tool output in the message composer.
Ctrl+TShow or hide thinking blocks in the message composer.
Ctrl+DExit when the prompt input is empty.

Prompting Additions ​

SyntaxAction
@fileType @ to fuzzy-search files and attach them to your message.
!commandRun a shell command and send its output to the model.
!!commandRun a shell command without sending its output to the model.

Tree Navigation ​

These shortcuts apply inside /tree.

ShortcutAction
Ctrl+← or Option+←Collapse the current branch. If no branch is expanded, jump to the previous segment start.
Ctrl+→ or Option+→Expand the current branch. If no branch is collapsed, jump to the next segment start or branch end.
Shift+LEdit a label.
Ctrl+DUse the default filter.
Ctrl+THide tool results.
Ctrl+UShow only user messages.
Ctrl+LShow labeled entries.
Ctrl+AShow all entries.

Sessions & Branching ​

CommandAction
/newStart a fresh session file.
/resumeBrowse previous sessions and switch to one.
/name <name>Set a human-readable session name.
/sessionShow session details, including ID, token usage, and cost.
/treeJump anywhere in the current session tree.
/forkCreate a new session from an earlier user message.
/cloneDuplicate the current session into a new session.
/compact [prompt]Summarize older context to free tokens.
/export [file]Export the session to HTML.
/shareUpload a private GitHub gist with a shareable HTML link.

Models & Thinking ​

ShortcutAction
Ctrl+LOpen the model selector.
Ctrl+PCycle to the next model.
Shift+Ctrl+PCycle to the previous model.
Shift+TabCycle the thinking level.

Core Slash Commands ​

CommandAction
/login, /logoutManage OAuth or API-key credentials.
/modelOpen the current model selector.
/skill:nameRun an installed skill on demand.
/promptNameLoad a predefined prompt template into the editor.
/scoped-modelsChoose which models participate in Ctrl+P cycling.
/settingsChange Pi editor settings.
/reloadReload keybindings, skills, prompts, extensions, and context files.
/hotkeysShow the live shortcut list from the current configuration.
/copyCopy the last assistant message to the clipboard.

Starting Pi ​

CommandAction
pi -cStart Pi with the most recent session.
pi -rBrowse and resume a previous session.
pi --session <path|id>Start Pi with a specific session.
pi --name <name>Start a new session with a specific name.
pi --no-sessionStart in ephemeral mode without saving session data.
pi --mode json <msg>Run non-interactively with the given prompt, stream JSON responses, and exit.

Adapted from the Pi Coding Agent Shortcuts (Dark, Mac) reference by Web Dev Simplified.