Spaces:
Sleeping
Sleeping
| export const PI_CLI_VERSION = "0.77.0"; | |
| export const PI_DEFAULT_TOOLS = ["read", "bash", "edit", "write"]; | |
| export const PI_BUILTIN_TOOLS = ["read", "bash", "edit", "write", "grep", "find", "ls"]; | |
| export const PI_SLASH_COMMANDS = [ | |
| "/login", | |
| "/logout", | |
| "/model", | |
| "/scoped-models", | |
| "/settings", | |
| "/resume", | |
| "/new", | |
| "/name <name>", | |
| "/session", | |
| "/tree", | |
| "/fork", | |
| "/clone", | |
| "/compact [prompt]", | |
| "/copy", | |
| "/export [file]", | |
| "/share", | |
| "/reload", | |
| "/hotkeys", | |
| "/changelog", | |
| "/quit", | |
| ]; | |
| export const PI_HELP_TEXT = `pi - AI coding assistant with read, bash, edit, write tools | |
| Usage: | |
| pi [options] [@files...] [messages...] | |
| Commands: | |
| pi install <source> [-l] Install extension source and add to settings | |
| pi remove <source> [-l] Remove extension source from settings | |
| pi uninstall <source> [-l] Alias for remove | |
| pi update [source|self|pi] Update pi and installed extensions | |
| pi list List installed extensions from settings | |
| pi config Open TUI to enable/disable package resources | |
| pi <command> --help Show help for install/remove/uninstall/update/list | |
| Options: | |
| --provider <name> Provider name (default: google) | |
| --model <pattern> Model pattern or ID (supports "provider/id" and optional ":<thinking>") | |
| --api-key <key> API key (defaults to env vars) | |
| --system-prompt <text> System prompt (default: coding assistant prompt) | |
| --append-system-prompt <text> Append text or file contents to the system prompt (can be used multiple times) | |
| --mode <mode> Output mode: text (default), json, or rpc | |
| --print, -p Non-interactive mode: process prompt and exit | |
| --continue, -c Continue previous session | |
| --resume, -r Select a session to resume | |
| --session <path|id> Use specific session file or partial UUID | |
| --session-id <id> Use exact project session ID, creating it if missing | |
| --fork <path|id> Fork specific session file or partial UUID into a new session | |
| --session-dir <dir> Directory for session storage and lookup | |
| --no-session Don't save session (ephemeral) | |
| --models <patterns> Comma-separated model patterns for Ctrl+P cycling | |
| --no-tools, -nt Disable all tools by default (built-in and extension) | |
| --no-builtin-tools, -nbt Disable built-in tools by default but keep extension/custom tools enabled | |
| --tools, -t <tools> Comma-separated allowlist of tool names to enable | |
| --exclude-tools, -xt <tools> Comma-separated denylist of tool names to disable | |
| --thinking <level> Set thinking level: off, minimal, low, medium, high, xhigh | |
| --extension, -e <path> Load an extension file (can be used multiple times) | |
| --no-extensions, -ne Disable extension discovery (explicit -e paths still work) | |
| --skill <path> Load a skill file or directory (can be used multiple times) | |
| --prompt-template <path> Load a prompt template file or directory (can be used multiple times) | |
| --theme <path> Load a theme file or directory (can be used multiple times) | |
| --no-themes Disable theme discovery and loading | |
| --no-context-files, -nc Disable AGENTS.md and CLAUDE.md discovery and loading | |
| --export <file> Export session file to HTML and exit | |
| --list-models [search] List available models (with optional fuzzy search) | |
| --verbose Force verbose startup (overrides quietStartup setting) | |
| --offline Disable startup network operations (same as PI_OFFLINE=1) | |
| --help, -h Show this help | |
| --version, -v Show version number | |
| Built-in Tool Names: | |
| read - Read file contents | |
| bash - Execute bash commands | |
| edit - Edit files with find/replace | |
| write - Write files (creates/overwrites) | |
| grep - Search file contents (read-only, off by default) | |
| find - Find files by glob pattern (read-only, off by default) | |
| ls - List directory contents (read-only, off by default)`; | |
| export function formatHotkeys() { | |
| return `Common Pi keybindings | |
| Ctrl+C Clear editor | |
| Ctrl+C twice Quit | |
| Escape Cancel or abort | |
| Escape twice Open /tree | |
| Ctrl+L Open /model | |
| Ctrl+P Cycle scoped models forward | |
| Shift+Ctrl+P Cycle scoped models backward | |
| Shift+Tab Cycle thinking level | |
| Ctrl+O Collapse or expand tool output | |
| Ctrl+T Collapse or expand thinking blocks | |
| Shift+Enter Multi-line input`; | |
| } | |