PiG Documentation

Guides and references for configuring, using, and extending PiG.

Using PiG

Run pig in the directory you want to work in to start the interactive TUI. PiG commands include top-level CLI verbs, slash commands inside the TUI, and keyboard shortcuts.

  • Command line lists the CLI verbs, the generic subcommands, and the pig docs commands for the embedded reference bundle.
  • Slash commands lists the commands you type in the TUI editor.
  • Keybindings describes how to change the default shortcuts.

Keyboard shortcuts

Key
Action
EnterSubmit message.
Shift+Enter / Ctrl+JNewline in editor.
EscCancel the active dialog, compaction, Bash command, or model turn.
Ctrl+CClear the editor; press it again within 500 ms to exit.
Ctrl+DExit on empty editor.
Ctrl+P / Shift+Ctrl+PCycle to next/previous scoped model (provider-qualified).
Shift+TabCycle thinking level on reasoning-capable models.
TabAutocomplete (slash commands, paths, mentions).
Ctrl+LOpen the model selector.
Ctrl+OExpand or collapse tool output.
Ctrl+TShow or hide thinking blocks.
Ctrl+GOpen the current editor buffer in externalEditor, $VISUAL, $EDITOR, Notepad on Windows, or nano elsewhere.

Extensions may install additional shortcuts via register.shortcuts[]. The dispatcher rejects duplicates across the host and all loaded extensions.

Core-vs-extension precedence

Core commands always win. If an extension registers a slash command whose name collides with a built-in, the built-in handler runs and the extension command is suppressed with a diagnostic. The same rule applies to CLI command paths: core paths are dispatched before contributed top-level or nested paths.

Adapted from upstream Pi documentation · Upstream documentation ↗ · MIT License