- Updated CI workflows to include explicit coding-agent build step for proper binary compilation. - Changed TypeBox validation from ts-expect-error to explicit any cast to resolve CJS/ESM type mismatch.
AI coding agent for the terminal
Fork of badlogic/pi-mono by @mariozechner
Fork Enhancements
Features added on top of upstream pi:
MCP & Plugin System
Full Model Context Protocol support with external tool integration:
- Stdio and HTTP transports for connecting to MCP servers
- Plugin CLI (
pi plugin install/enable/configure/doctor) - Hot-loadable plugins from
~/.pi/plugins/with npm/bun integration - 22 pre-built Exa MCP tools for web research, LinkedIn, fact-finding
LSP Tool (Language Server Protocol)
IDE-like code intelligence via rust-analyzer and extensible to other languages:
- File diagnostics with error/warning/info classification
- Hover documentation, symbol references, implementations
- Code actions and refactoring suggestions
- Workspace-wide symbol search
Task Tool (Subagent System)
Parallel execution framework with specialized agents:
- 5 bundled agents: explore, plan, browser, task, reviewer
- User-level (
~/.pi/agent/agents/) and project-level (.pi/agents/) custom agents - Concurrency-limited batch execution with progress tracking
- Pre-defined commands: implement, architect-plan, implement-with-critic
Web Search & Fetch
Multi-provider search and full-page scraping:
- Anthropic and Perplexity search integration with caching
- HTML-to-markdown conversion with link preservation
- JavaScript rendering support, image handling
TUI Overhaul
- Welcome screen: Logo, tips, recent sessions with selection
- Powerline footer: Model, cwd, git branch/status, token usage, context %
- Hotkeys:
?displays shortcuts when editor empty - Emergency terminal restore: Crash handlers prevent terminal corruption
Git Context
System prompt includes repo awareness:
- Current branch, main branch auto-detection
- Git status snapshot (staged/unstaged/untracked)
- Recent 5 commits summary
Bun Runtime
Migrated from Node.js for native TypeScript:
- Runs
.tsfiles directly without build step - Faster CLI startup times
- All 7 packages converted to Bun APIs
Additional Tools
- Ask Tool: Interactive user questioning (211 lines)
- AST Tool: Structural code analysis via ast-grep (271 lines)
- Replace Tool: Find & replace across files (297 lines)
Packages
| Package | Description |
|---|---|
| @oh-my-pi/pi-ai | Unified multi-provider LLM API (OpenAI, Anthropic, Google, etc.) |
| @oh-my-pi/pi-agent-core | Agent runtime with tool calling and state management |
| @oh-my-pi/pi-coding-agent | Interactive coding agent CLI |
| @oh-my-pi/pi-mom | Slack bot that delegates messages to the pi coding agent |
| @oh-my-pi/pi-tui | Terminal UI library with differential rendering |
| @oh-my-pi/pi-web-ui | Web components for AI chat interfaces |
Development
Setup
bun run dev:install # Install deps and link all packages
bun run build # Build all packages
bun run check # Lint, format, and type check
Note:
bun run checkrequiresbun run buildfirst. The web-ui package usestscwhich needs compiled.d.tsfiles from dependencies.
Watch Mode
bun run dev
Then run directly:
cd packages/coding-agent && bunx tsx src/cli.ts
CI
GitHub Actions runs on push to main and on pull requests. The workflow runs bun run check and bun test for each package in parallel.
Do not add LLM API keys as secrets. Tests requiring LLM access use describe.skipIf() and run locally.
Versioning
All packages use lockstep versioning:
bun run version:patch # 0.7.5 -> 0.7.6
bun run version:minor # 0.7.5 -> 0.8.0
bun run version:major # 0.7.5 -> 1.0.0
Never manually edit version numbers.
Publishing
bun run release:patch # Bug fixes
bun run release:minor # New features
bun run release:major # Breaking changes
Requires an npm token with "Bypass 2FA on publish" enabled.
License
MIT - Original work copyright Mario Zechner
