The @mariozechner/pi-coding-agent package is the flagship Pi package - a complete terminal-based coding agent with interactive TUI, session management, extension system, and built-in tools for reading, writing, editing, and executing code.
Interactive Mode
Full TUI with editor, autocomplete, and streaming responses
Session Management
Tree-based branching, resume, and auto-save functionality
Extension System
TypeScript-based plugins for tools, commands, and UI
# Interactive mode with Anthropicexport ANTHROPIC_API_KEY=sk-ant-...pi# Interactive mode with OpenAIexport OPENAI_API_KEY=sk-...pi --provider openai --model gpt-4o# Non-interactive print modepi -p "What files are in the current directory?"# Continue previous sessionpi -c
Sessions are stored as JSONL files with tree structure for branching:
# Continue most recent sessionpi -c# Browse and select from past sessionspi -r# Use specific session filepi --session path/to/session.jsonl# Ephemeral mode (don't save)pi --no-session
Tree navigation: Use /tree command to navigate session history, branch to different points, and create forks.Compaction: Automatic context management when approaching token limits. Customize via settings or extensions.
Skills are on-demand capability packages following the Agent Skills standard:
<!-- ~/.pi/agent/skills/deploy/SKILL.md --># Deploy ApplicationUse this skill when the user wants to deploy the application.## Steps1. Run tests2. Build production bundle3. Upload to server
Prompt Templates are reusable prompts with variable substitution: