Skip to content

Slash commands

Type / in the composer and the palette lists everything available in that session. Commands are matched against the real list, so a message that merely begins with a path — /etc/hosts is wrong — is still sent as a message.

A command that opens a dialog does not appear in the transcript. Its menu is the feedback; a chat bubble saying /models would be noise.

Where they come from

SourceProvided by
builtinThe portal
extensionAn installed pi package
promptA prompt template
skillA skill

Builtins

pi's builtin commands are implemented by whichever mode is running — the TUI draws its own — so the portal supplies them. The names and descriptions are read from the SDK's own BUILTIN_SLASH_COMMANDS, so they track pi's releases rather than drifting from a copy.

Only the ones the portal can actually service are offered. /quit, /hotkeys, /trust and the auth commands are terminal concerns; listing them would be a menu of things that quietly do nothing.

CommandDoes
/compactSummarise the conversation to free context
/sessionModel, effort, context, tokens, cost, tool calls
/exportWrite the session out — HTML, or .jsonl if you name one
/reloadReload extensions, skills, prompts and settings
/modelOpen the model picker
/settingsOpen settings
/newStart a session in this workspace
/nameRename the session

The first four act on the session server-side and report through the event stream. The rest open portal UI and never reach pi.

/compact is not awaited — it is a model call, and holding the HTTP request open for it would time out. It reports when it finishes.

Extension commands

Anything an installed package registers appears automatically. Install pi-llama-cpp and /models shows up, opening the same menu the TUI draws:

/models  [extension]  Browse Llama.cpp models

Interactive commands work because the portal binds a UI context when it creates the session. Without one, pi hands the extension a default immediately and a command that asks a question appears to do nothing. Dialogs are rendered as a modal — select, confirm, input and editor are all supported.

Dialog events are deliberately never persisted. A stored one would be replayed to every future reader, so reloading the page reopened a menu whose extension had long since stopped waiting.

Adding more

Install a pi package from Settings → Extensions. Its commands appear the next time the palette refreshes, which happens when a run ends — no reload needed.

Give it a task, close the browser, come back later.