Commands (Slash Commands)
✓ Fresh · 2026-02-24Pi uses slash commands for built-in actions. Type / in the input to trigger command completion with fuzzy matching.
Complete Command Reference
Authentication
| Command | Purpose |
|---|---|
/login | Start OAuth authentication with a provider |
/logout | Sign out of current provider |
Model Management
| Command | Purpose |
|---|---|
/model | Open model selector (also Ctrl+L) |
/scoped-models | Enable or disable models for Ctrl+P cycling |
Session Management
| Command | Purpose |
|---|---|
/resume | Pick from previous sessions to continue |
/new | Start a fresh session (discard current) |
/name <name> | Set a display name for the current session |
/session | Show current session path, token count, and cost |
/tree | Navigate and branch session history |
/fork | Create a new session file from the current branch |
/compact [prompt] | Manually compact context (summarize older messages) |
Settings
| Command | Purpose |
|---|---|
/settings | Configure thinking level, theme, message delivery mode |
Output & Sharing
| Command | Purpose |
|---|---|
/copy | Copy the last assistant message to clipboard |
/export [file] | Save the current session as an HTML file |
/share | Upload the session as a private GitHub gist |
System
| Command | Purpose |
|---|---|
/reload | Refresh extensions, skills, prompts, and themes (hot reload) |
/hotkeys | Display all keyboard shortcuts |
/changelog | Show Pi version history |
/quit | Terminate Pi |
/exit | Terminate Pi (alias for /quit) |
Custom Commands
Skills and prompt templates register their own slash commands:
| Pattern | Source |
|---|---|
/skill:name | Custom skills loaded from skills directories |
/templatename | Prompt templates loaded from prompts directories |
Command Flow
Session Commands Deep Dive
/tree
The /tree command opens an interactive session history navigator:
- Search: Type to filter entries
- Navigate: Left/right arrows to page through history
- Filter modes (Ctrl+O): cycle through
default>no-tools>user-only>labeled-only>all - Label: Press
lto label/bookmark an entry - Branch: Select any previous point to continue from there
/compact
Compaction summarizes older messages to free context window space:
bash
/compact # default compaction
/compact Keep all code changes # custom compaction instructionsAll original history remains in the JSONL session file. Use /tree to revisit anything that was compacted.
/fork
Creates an entirely new session file from the current branch point. Unlike branching within /tree (which keeps everything in one file), /fork produces a separate file.