Global command palette for Pi Coding Agent — press Ctrl+Shift+P to search and run commands from anywhere.
Pi's slash commands (/model, /compact, extension commands, etc.) only work when the editor is empty. If you've typed something and want to switch models or run a command, you're stuck. This extension opens a floating command palette via keyboard shortcut, regardless of editor state.
None.
pi install npm:@d3ara1n/pi-command-paletteOr add to ~/.pi/agent/settings.json:
{
"extensions": [
"/absolute/path/to/pi-extensions/packages/pi-command-palette"
]
}| Shortcut | Action |
|---|---|
Ctrl+Shift+P (default, configurable) |
Open command palette |
The palette lists:
- Built-in actions — Model selector, New session, Compact, Reload, Fork, Tree, Resume
- Extension commands — All registered
/commandentries - Skills & Templates — Skill commands and prompt templates
When a command replaces your current editor text, the original content is saved and a Restore: Previous Editor Text entry appears at the top of the palette. Select it to get your text back.
The "Model: Switch Model" action opens a secondary overlay listing all models with configured API keys. Select one to switch instantly — no need to go through /model or Ctrl+P.
Scoped models float to the top, marked with a ★ (favorite) prefix. "Scoped" here means the same set pi uses for its built-in selector's scoped tab and Ctrl+P cycling — the enabledModels patterns in your settings.json (project .pi/settings.json overrides global ~/.pi/agent/settings.json). Everything else follows alphabetically. If no scope is configured, the list is a plain alphabetical roster — nothing breaks.
The default shortcut is Ctrl+Shift+P, matching VS Code's Command Palette for familiar muscle memory. If it conflicts with your terminal or other shortcuts, override it via either of the following (evaluated in order, first match wins).
Useful for terminals that intercept Ctrl+Shift+<key> before it reaches the session (e.g. Termius on Windows/WSL2):
export PI_COMMAND_PALETTE_KEY=ctrl+shift+pAdd it to your shell profile to persist (~/.zshrc on macOS, ~/.bashrc on bash).
Set commandPalette.shortcut in ~/.pi/agent/settings.json (global) or .pi/settings.json in your project. A present project commandPalette block replaces the global block:
{
"commandPalette": {
"shortcut": "ctrl+shift+p"
}
}Any valid pi keybinding string works (e.g. ctrl+shift+p, ctrl+shift+k, ctrl+alt+k, ctrl+k). Restart pi (or run /reload) after changing the shortcut.