A zero-unsafe, sub-100ms Rust CLI AI coding assistant — high-performance port of the TypeScript Pi Agent.
pi_agent_rust is a terminal AI coding assistant by Jeffrey Emanuel, a Rust port of the TypeScript Pi Agent by Mario Zechner. Its core advantage is extreme performance: cold start < 100ms, single static binary < 22MB, idle memory < 50MB RSS, and large-session memory usage at 1/8–1/11 of Node/Bun versions. Globally forbids unsafe code.
Ships 7 built-in tools (read, write, edit, bash, grep, find, ls) with auto-truncation and process tree cleanup. Supports JSONL session persistence with branch conversation trees, a dual Wasm + JS sandboxed extension system (two-phase exec gating, capability-gated hostcalls), and custom Skills/Prompt Templates. TUI is built on a Rust port of the Go Charm ecosystem with file-reference and slash-command autocomplete. Native SSE parser supports extended thinking streaming output.
Built on asupersync structured concurrency runtime (HTTP/TLS/SQLite built-in), rich_rust terminal rendering, ast-grep + swc for AST operations, with LTO + jemalloc in release profile. Supports Linux, macOS, Windows, FreeBSD. Single-pass mode (-p) for CI/automation integration.
Installation:
curl -fsSL "https://raw.githubusercontent.com/Dicklesworthstone/pi_agent_rust/main/install.sh?$(date +%s)" | bash
export ANTHROPIC_API_KEY="sk-ant-..."
pi
Common Commands:
pi— Start interactive sessionpi "message"— Start with initial messagepi -p "prompt"— Single-pass mode for scripts/CIpi --continue— Resume most recent sessionpi @<file> "message"— Attach file as contextpi --thinking <level>— Set thinking level (off/minimal/low/medium/high/xhigh)/skill:name— Invoke custom Skill/<template> [args]— Invoke Prompt Template
Config directory: ~/.pi/agent/ (skills, prompts, sessions, themes)
Default features: image-resize, jemalloc, clipboard, wasm-host, sqlite-sessions.
Unconfirmed: Upstream Pi Agent (TypeScript original) repo URL not provided in README; OpenClaw official link missing; benchmark data lacks independent third-party verification; pi install npm:@org/pi-packages package registry address not given.