The terminal coding agent built for native speed.
Single standalone Zig executable (4.17 MB). 2.73 ms startup, 2.16 MiB peak RSS, OS-level sandboxing, fullscreen Zig TUI, and zero-Node official LSP & Memory plugins.
Native startup, memory, and footprint pushed to the floor.
Same-host 20-sample measurements on Apple M4 (macOS arm64, isolated HOME) comparing Zpi against Codex, Claude Code, OpenCode, and pi.
Session Restore (RPC)p50
Stream & Tool Looploopback p50
Native TUI Readiness80×24 PTY p50
| Dimension | Zpi 0.3.5 | Codex 0.174.0 | Claude Code 2.1 | OpenCode 2.4.5 | pi 1.7.0 |
|---|---|---|---|---|---|
| Runtime | Zig 0.17.0 Native | Rust (+ npm launcher) | Bun compiled JS | Bun compiled JS | Node.js 22+ (TS/JS) |
| Disk Footprint | 4.17 MB | 266.1 MB (347 MB npm) | 393.3 MB | 224.9 MB | 121.0 MB (+ Node) |
| --help Startup | 2.73 ms (p95 3.24) | 12.49 ms* (37.7 npm) | 52.68 ms (p95 54.4) | 40.92 ms (p95 43.1) | 137.48 ms (p95 144) |
| Peak RSS (--help) | 2.16 MiB | 18.53 MiB | 88.38 MiB | 86.52 MiB | 126.20 MiB |
| Providers | Multi-Provider + OAuth | OpenAI-first (+ compat) | Anthropic-first | Multi-Provider | Multi-Provider |
| OS Sandbox | Seatbelt / Landlock | Seatbelt / Landlock | Seatbelt / Bubblewrap | Permissions / Docker | Host permissions |
| Protocols | MCP · RPC v1.1 · ACP | MCP · App Server | MCP · SDK | MCP · ACP · HTTP | RPC · Extensions |
| Plugin Workers | Pure Zig (~460 KB) + Node | MCP / Skills | Plugins / Hooks / MCP | JS/TS Plugins / MCP | TypeScript Extensions |
Engineered from first principles in Zig.
Everything a modern coding agent needs—fullscreen TUI, multi-provider streaming, OS sandboxing, parallel subagents, MCP/ACP/RPC, and atomic self-updates—inside one lean binary.
UI Native Fullscreen TUI
Syntax-highlighted code blocks, reflowing CJK Markdown tables, /diff, /rewind filesystem checkpoints, /goal autonomous verification loops, and OSC 7501 status.
AI Multi-Provider & Model Catalog
Built-in OpenAI Responses/Chat, Anthropic prompt caching & thinking, Google Gemini SSE, unified OAuth logins, and 3-layer Model Catalog with zpi models sync.
OS Confinement & Trust Boundaries
Opt-in OS sandboxing (--sandbox workspace-write|read-only), SSRF-hardened pure-Zig web_search/web_fetch, scoped 0600 approval rules, and untrusted AGENTS.md framing.
// Parallel Worktree Subagents
Run up to 8 concurrent subagents in isolated git worktrees with strict tool subsetting, auto-compaction, unified diff capture, and aggregated /cost tracking.
IO MCP, JSONL RPC & Zed ACP
Stdio, Streamable HTTP, and Legacy SSE MCP clients; JSONL RPC v1.1 with zero-dependency TS/Python SDKs; native ACP v1 session integration for editors like Zed.
UP Atomic Self-Update
Upgrade both the Zpi binary and every managed plugin in one command via zpi update --plugins—SHA-256 verified and atomically symlinked.
Pure-Zig native worker plugins. Zero Node.js.
Powered by Zpi's executable worker runtime. Prebuilt stripped binaries (~460 KB) are auto-downloaded and SHA-256 verified on install, running inside the Zpi sandbox over NDJSON.
zpi-lsp
v0.1.0 · 459–572 KB · Static ZigSingle-threaded poll() JSON-RPC 2.0 client supporting zls, typescript-language-server, pyright, ruff, gopls, rust-analyzer, and clangd. Automatically hooks edit/write to append live diagnostics.
zpi plugin install syuchua/zpi-plugins/plugins/lsp
zpi-memory
v0.1.0 · 475–601 KB · EN+CJK BM25Dual-scope (project + global) persistent memory backed by atomic 0600 JSON storage and bilingual English + CJK unigram/bigram BM25 ranking, injected silently on session open.
zpi plugin install syuchua/zpi-plugins/plugins/memory
From zero to a native agent workflow in four steps.
1. Install Zpi
Detects macOS / Linux (x64, arm64, glibc, musl) and verifies SHA-256 automatically.
2. Authenticate
Use env vars, store API keys in mode 0600 auth.json, or run OAuth subscription login.
3. Add Zig Plugins
Install official zero-Node LSP diagnostics and cross-session BM25 memory.
4. Verify & Launch
Inspect credentials, sandbox backend, and tools with doctor, then launch Zpi.