v0.3.5 Released · Pure Zig 0.17.0 · Native Executable Worker Plugins

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.

$curl -fsSL https://raw.githubusercontent.com/syuchua/zpi/main/install.sh | bash
macOS arm64 / x64 · Linux glibc & musl · SHA-256 Verified · Zero Node.js Runtime
2.73 ms
CLI --help Startup (p50)
19.3× faster than Claude · 50.4× vs pi
2.16 MiB
Peak Memory RSS
40×+ smaller than OpenCode & Claude
4.17 MB
Standalone Binary Size
64×–94× smaller than Codex / Claude
459 KB
Official Zig LSP Plugin
Zero Node.js · SHA-256 verified
zpi — ~/workspace/zpi
Multi-Dimensional Benchmarks

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.

Apple M4 · macOS arm64 · 3 warmups + 20 samples

Session Restore (RPC)p50

Load 128 msgs · Zpi3.45 ms
Load 128 msgs · rpi / pi26.00 / 125.69 ms
Load 8,192 msgs (2.28 MB) · Zpi11.90 ms
Load 8,192 msgs · rpi / pi70.00 / 133.47 ms

Stream & Tool Looploopback p50

64 KiB SSE settled · Zpi1.81 ms
64 KiB SSE settled · rpi / pi2.22 / 21.78 ms
Read 4 KiB tool · Zpi0.91 ms (0.054 ms tool)
Read 4 KiB tool · rpi / pi1.38 / 21.85 ms

Native TUI Readiness80×24 PTY p50

Launch → Editor Ready2.82 ms
Fullscreen 8,192-msg Restore38.10 ms (19.5 MiB)
Keypress → Frame Render0.050 ms
/tree Open (8,192 msgs)0.085 ms
Multi-Dimensional Architecture & Runtime Matrix
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
Core Architecture

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.

Official Plugin Ecosystem · syuchua/zpi-plugins

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 Zig

Single-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.

diagnostics definition references hover symbols tool_result hook
zpi plugin install syuchua/zpi-plugins/plugins/lsp

zpi-memory

v0.1.0 · 475–601 KB · EN+CJK BM25

Dual-scope (project + global) persistent memory backed by atomic 0600 JSON storage and bilingual English + CJK unigram/bigram BM25 ranking, injected silently on session open.

remember recall forget /plugin:memory:search 0600 atomic store
zpi plugin install syuchua/zpi-plugins/plugins/memory

Build your own native Zig worker plugin

Scaffold a compilable Zig 0.17.0 worker project and zpi-plugin.json manifest in seconds.

zpi plugin init my-plugin --zig
First Five Minutes

From zero to a native agent workflow in four steps.

STEP 01

1. Install Zpi

Detects macOS / Linux (x64, arm64, glibc, musl) and verifies SHA-256 automatically.

curl -fsSL .../install.sh | bash
STEP 02

2. Authenticate

Use env vars, store API keys in mode 0600 auth.json, or run OAuth subscription login.

zpi auth login anthropic
STEP 03

3. Add Zig Plugins

Install official zero-Node LSP diagnostics and cross-session BM25 memory.

zpi plugin install syuchua/zpi-plugins/plugins/lsp
STEP 04

4. Verify & Launch

Inspect credentials, sandbox backend, and tools with doctor, then launch Zpi.

zpi doctor && zpi