Pi School

Cheatsheet

Slash commands, prompt syntax, keyboard shortcuts, CLI flags, and file paths at a glance.

A quick reference drawn from Pi’s own docs and the lessons in this course.

For deeper context on any item, follow the links to the relevant lesson or to the official docs.

Slash commands

Type these inside Pi’s prompt. Type / on its own to see the full list of available commands, including any prompt templates and skills you’ve installed.

CommandWhat it does
/login, /logoutManage OAuth or API-key credentials for a model provider
/modelSwitch models for this session (Ctrl+S in the picker saves it as the default)
/thinking [level]Set the thinking level
/scoped-modelsEnable/disable models for Ctrl+P cycling
/settingsThinking level, theme, message delivery, transport
/resumePick from previous sessions
/newStart a new session
/name <name>Set the current session’s display name
/sessionShow session file, ID, messages, tokens, and cost
/treeJump to any point in the session and continue from there — see Branching
/trustSave a project trust decision for future sessions
/forkCreate a new session from a previous user message
/cloneDuplicate the current active branch into a new session
/compact [prompt]Manually compact context, optionally with custom instructions
/copyCopy the last assistant message to the clipboard
/export [file]Export the session to HTML or JSONL
/import <file>Import and resume a session from a JSONL file
/shareUpload the session and get a viewer link (a private GitHub gist, or a Radius artifact if you’re signed in to Radius)
/bug [description]Prepare a private bug report for the Pi developers
/mcpInspect, sign in to, reconnect, enable, or disable MCP servers
/reloadReload keybindings, extensions, skills, prompt templates, themes, and context files
/hotkeysShow all keyboard shortcuts
/changelogDisplay version history
/quitQuit Pi
/skill:nameManually invoke an installed skill
/<template-name>Run a prompt template you’ve defined

Prompt syntax

Special characters that change how a prompt is interpreted.

SyntaxWhat it does
@<path>Fuzzy-search and reference a project file; its contents are added to the conversation (e.g. Explain @src/index.ts)
!<command>Run a shell command and send its output to the model as part of the conversation
!!<command>Run a shell command without sending its output to the model

Keyboard shortcuts

The full set is customizable via ~/.pi/agent/keybindings.json — these are the defaults. Run /hotkeys inside Pi any time for the live list.

Images and files

ShortcutWhat it does
Ctrl+V (Alt+V on Windows)Paste an image from the clipboard
Drag and dropDrag an image file into a terminal that supports it
TabComplete a file path
Ctrl+GOpen the current input in an external editor

Models and thinking

ShortcutWhat it does
Ctrl+LOpen the model selector
Ctrl+P / Shift+Ctrl+PCycle forward/backward through scoped models
Shift+TabCycle thinking level
Ctrl+TCollapse or expand thinking blocks
Ctrl+S (in /model or /thinking)Save the selection as the default

Fullscreen transcript

ShortcutWhat it does
Ctrl+Shift+F (Ctrl+F on Windows)Search the transcript
PageUp / PageDownScroll the transcript
Ctrl+Home / Ctrl+EndJump to the start or end of the transcript
Ctrl+OCollapse or expand tool output

Sessions and tree

ShortcutWhat it does
Ctrl+XCopy the last assistant message, or the selected message in /tree
Ctrl+O (in tree view)Cycle the tree filter mode
Shift+L (in tree view)Set or clear a label on the selected entry
Ctrl+R (in session picker)Rename a session
Ctrl+D (in session picker)Delete a session

Application

ShortcutWhat it does
EscapeCancel or abort the current response
Ctrl+CClear the editor
Ctrl+DExit Pi (when the editor is empty)
Ctrl+ZSuspend Pi to the background (not on native Windows)

CLI flags

Pass these when starting pi from your terminal. For the full list, see the command line docs.

FlagWhat it does
-p, --printPrint a single response and exit, instead of starting an interactive session
--mode jsonOutput events as JSON lines
--mode rpcRPC mode over stdin/stdout, for process integration
-c, --continueContinue the most recent session
-r, --resumeBrowse and select a session at startup
--name <name>, -n <name>Set the session display name at startup
--provider <name>Choose a provider, e.g. anthropic, openai, google
--model <pattern>Choose a model, e.g. sonnet:high or openai/gpt-4o
--no-context-files, -ncDisable AGENTS.md/CLAUDE.md discovery
--tools <list>, -tChoose exactly which tools are enabled, e.g. read,grep,find,ls
--exclude-tools <list>, -xtDisable specific tools
--no-builtin-tools, -nbtDisable built-in tools, keep extension/custom tools
--no-mcpStart without MCP servers
--tui-mode regularUse the terminal’s normal scrollback instead of fullscreen
--approve, -aTrust project-local settings for one run
--no-approve, -naIgnore project-local settings for one run

Shell commands

Run these from your terminal, outside a Pi session. Agents can run them through bash too.

CommandWhat it does
pi mcp add <name> -- <command> [args...]Add a local MCP server (add -l for the current project)
pi mcp add <name> --url <url>Add a remote MCP server
pi mcp listConnect to every MCP server and show its tools and errors
pi mcp login <name>Sign in to an OAuth MCP server
pi install <source>Install a Pi package, e.g. npm:pi-web-access
pi updateUpdate Pi (pi update --all also updates packages)
pi configChoose which package and built-in resources load

File paths

Where Pi looks for config and customization files. Global paths apply to every project; per-project paths apply only inside that project (and only load once the project is trusted).

Global

PathWhat it is
~/.pi/agent/settings.jsonMain config: default provider/model, project trust default, compaction tuning
~/.pi/agent/AGENTS.mdCustom instructions loaded at the start of every session
~/.pi/agent/extensions/Global extensions
~/.pi/agent/skills/, ~/.agents/skills/Global skills
~/.pi/agent/prompts/Global prompt templates
~/.pi/agent/themes/Global themes
~/.pi/agent/mcp.jsonMCP servers available in every project
~/.pi/agent/models.jsonCustom model/provider definitions
~/.pi/agent/keybindings.jsonCustom keyboard shortcuts
~/.pi/agent/trust.jsonSaved project trust decisions
~/.pi/agent/sessions/Saved sessions, as JSONL
~/.pi/agent/auth.jsonStored OAuth tokens and API keys from /login

Per-project

PathWhat it is
AGENTS.md (or CLAUDE.md)Project-specific instructions, typically committed to Git
.pi/settings.jsonProject-specific config overrides
.pi/mcp.jsonProject-specific MCP servers
.pi/extensions/Project-specific extensions
.pi/skills/, .agents/skills/Project-specific skills
.pi/prompts/Project-specific prompt templates
.pi/themes/Project-specific themes

Where to look next