# pi-rust > pi-rust is a drop-in Rust port of the pi coding agent by Ryan Yannelli, built for 1:1 parity with upstream pi (the TypeScript original by Mario Zechner) and compared with it every day. It reads an existing ~/.pi/agent setup and runs pi's TypeScript extensions, skills, prompt templates, themes, and packages as they are, on a built-in QuickJS engine, so it needs no Node.js. One binary has a streaming LLM API for many providers, an agent loop that calls tools, and the `pi` CLI. ## Compatibility with pi - Drop-in: the same `pi` command. It reads ~/.pi/agent (auth.json, settings.json, models.json, keybindings.json, mcp.json, sessions, extensions, skills, prompts, themes). Session files, settings keys, config paths, and RPC and JSON events match upstream pi byte for byte, so pi and pi-rust can share one setup. - Extensions: pi TypeScript and JavaScript extensions and `pi install npm:` packages run unchanged on the built-in QuickJS engine with the Node built-in modules. Extensions that need native npm addons can run on Node 22+ (`extensionRuntime: "node"`). Native Rust extensions are an extra option. - Parity: a daily workflow compares pi-rust with upstream pi. The latest report shows pi-rust has all of pi's CLI flags, slash commands, built-in tools, and extension API calls. Report of Nov 22, 2026: https://github.com/yannelli/pi-rust/issues/30 - Every intended difference from upstream pi: https://pi-rust.com/docs/differences/ - Latest release: v0.12.26 (Nov 22, 2026) - Install on macOS and Linux: `curl -fsSL https://pi-rust.com/install.sh | sh` - Install on Windows: `irm https://pi-rust.com/install.ps1 | iex` - Install with Homebrew: `brew install yannelli/tap/pi` - Source code (MIT): https://github.com/yannelli/pi-rust - Maintainer: Ryan Yannelli (https://ryanyannelli.com/); project page: https://ryanyannelli.com/projects/pi-rust/ - Upstream pi (TypeScript): https://github.com/earendil-works/pi - Full text of every page: https://pi-rust.com/llms-full.txt ## Get started - [Quick start](https://pi-rust.com/docs/quick-start/): The commands to start pi in a project, run one prompt, resume a session, and pick a model. - [Install pi-rust](https://pi-rust.com/install/): It downloads the latest release for your platform. It compares the archive with SHA256SUMS. It installs pi in ~/.local/bin. - [Configuration files](https://pi-rust.com/docs/configuration/): pi-rust uses your existing pi folder: logins, settings, models, key bindings, MCP servers, extensions, skills, and sessions. - [Differences from upstream pi](https://pi-rust.com/docs/differences/): What pi-rust adds to the TypeScript pi, where its runtime behaves differently, and which upstream bugs it already fixes. ## Use pi - [Interactive commands](https://pi-rust.com/docs/commands/): In interactive mode, type / to see the list of commands. Examples are /login, /model, /settings, /tree, /fork, /compact, /export, /share, /mcp, and /hotkeys. - [CLI commands and flags](https://pi-rust.com/docs/cli/): Run pi --help to see all options. This page explains session working directories and the commands that pi-rust adds: pi completion, pi doctor, pi sessions, pi… - [Settings](https://pi-rust.com/docs/settings/): Settings load from /settings.json (normally ~/.pi/agent/settings.json). A trusted project's .pi/settings.json overrides global values. - [Terminal](https://pi-rust.com/docs/terminal/): To select a harness theme, open /settings and select Theme. In interactive mode, when a run takes 10 seconds or more, pi sends a terminal notification at the… - [Status line](https://pi-rust.com/docs/status-line/): The custom status line is the marketplace:statusline extension. Earlier pi-rust versions had it built in. You can also install it from /extensions. - [Deferred context](https://pi-rust.com/docs/deferred-context/): Created: 2026-11-04. Last updated: 2026-11-04. pi-rust can keep skills and extension context entries, such as subagent configs, out of the system prompt. ## Models and logins - [Providers](https://pi-rust.com/docs/providers/): anthropic-messages openai-responses openai-completions openai-codex-responses (SSE and WebSocket) azure-openai-responses google-generative-ai google-vertex… - [Subscription usage limits](https://pi-rust.com/docs/usage-limits/): Created: 2026-10-30. Last updated: 2026-10-31. /usage, pi usage, and the native extension method usage.get show the limits of pi's subscription logins. ## Editors and tools - [MCP servers](https://pi-rust.com/docs/mcp/): By default pi connects every enabled MCP server of mcp.json in the background when a session starts. - [ACP mode for Zed and other editors](https://pi-rust.com/docs/acp/): pi --mode acp runs pi as an Agent Client Protocol (ACP) server over stdio. Editors such as Zed can then use pi as an external agent. - [ACP agents as providers](https://pi-rust.com/docs/acp-agents/): Created: 2026-10-30. Last updated: 2026-11-04. pi can run an external Agent Client Protocol (ACP) agent, such as Kiro CLI or Amp, and show its work in the pi… - [RPC mode](https://pi-rust.com/docs/rpc/): pi --mode rpc reads JSON commands on stdin and writes responses and session events on stdout, one JSON record per line, as upstream pi does. ## Extensions - [Extension marketplace](https://pi-rust.com/docs/marketplace/): The marketplace contains native Rust extensions for pi-rust. Each release has a signed index and binary archives for supported platforms. - [Native extension protocol](https://pi-rust.com/docs/native-extensions/): Created 2026-10-29. Last updated 2026-11-02. A native extension is a program that pi starts as a child process. pi and the child exchange JSON-RPC 2.0 messages. ## Reference - [Crates](https://pi-rust.com/docs/crates/): The Rust crates in the pi-rust workspace: pi-ai, pi-agent, pi-tui, pi-mcp, pi-js, pi-coding-agent, and the rest. ## Questions - [What is pi-rust?](https://pi-rust.com/faq/#what-is-pi-rust): pi-rust is a drop-in Rust port of the pi coding agent by Ryan Yannelli, built for 1:1 parity with pi. One binary has a streaming API for models from many providers, an agent loop that calls tools, and the pi command line. - [Is pi-rust a drop-in replacement for pi?](https://pi-rust.com/faq/#drop-in): Yes. It's the same pi command, and it reads ~/.pi/agent: your logins, settings, models, key bindings, MCP servers, sessions, extensions, and skills. Session files and RPC events match pi byte for byte, so you can switch between the two. Set PI_CODING_AGENT_DIR to use another folder. - [Does pi-rust have full parity with pi?](https://pi-rust.com/faq/#parity): pi-rust is a 1:1 port, and a workflow compares it with upstream pi every day. The latest report shows pi-rust has all of pi's CLI flags, slash commands, built-in tools, and extension API calls. Session files, settings, config paths, and RPC and JSON events match pi byte for byte. - [Do pi extensions work in pi-rust?](https://pi-rust.com/faq/#extensions): Yes. TypeScript extensions, skills, prompt templates, themes, and pi packages work as they are. Extensions run on a built-in QuickJS engine with the Node built-in modules. Extensions that need native npm addons run on Node 22 or later when extensionRuntime is "node". pi-rust also runs native extensions written in Rust. - [How is pi-rust different from pi?](https://pi-rust.com/faq/#difference-from-pi): pi-rust has everything in pi, runs without Node.js, and adds /diff, /review, /undo, /retry, pi doctor, run limits, structured output, ACP mode, subscription usage limits, and native extensions. - [Does pi-rust need Node.js?](https://pi-rust.com/faq/#node): No. pi-rust is one binary, and extensions run on its built-in QuickJS engine. To run them on Node 22 or later instead, set extensionRuntime to "node". - [How do I install pi-rust?](https://pi-rust.com/faq/#install): On macOS and Linux, run curl -fsSL https://pi-rust.com/install.sh | sh. On Windows, run irm https://pi-rust.com/install.ps1 | iex. With Homebrew, run brew install yannelli/tap/pi. - [Which operating systems does pi-rust support?](https://pi-rust.com/faq/#platforms): macOS on Apple silicon and Intel, Linux on x86-64, arm64, and armv7, and Windows on x86-64 and arm64. - [Which models and providers does pi-rust support?](https://pi-rust.com/faq/#providers): Every provider pi supports, including Anthropic, OpenAI, Google, Amazon Bedrock, Mistral, xAI, GitHub Copilot, and OpenRouter, plus Cursor and Google Antigravity subscriptions. Log in with /login or an API key. - [Does pi-rust work in Zed or other editors?](https://pi-rust.com/faq/#editors): Yes. pi --mode acp runs pi as an agent inside Zed and other ACP editors, with no adapter. - [Does pi-rust support MCP servers?](https://pi-rust.com/faq/#mcp): Yes, over stdio and HTTP with OAuth. Add servers to ~/.pi/agent/mcp.json or a project's .pi/mcp.json. - [How much memory does pi-rust use?](https://pi-rust.com/faq/#memory): About 36 MiB per session. With 20 sessions at once on a 16 GB Mac, pi-rust peaked at 680 MiB in total, against 3,431 MiB for Node pi and 3,275 MiB for Codex CLI. - [How do I update pi-rust?](https://pi-rust.com/faq/#update): Run pi update --self. If you installed with Homebrew, run brew upgrade yannelli/tap/pi. - [Is pi-rust free and open source?](https://pi-rust.com/faq/#license): Yes. pi-rust is MIT licensed, and the source is on GitHub at yannelli/pi-rust. - [Who makes pi-rust?](https://pi-rust.com/faq/#maintainer): Ryan Yannelli, a software engineer in New York. - [Is pi-rust.com the website of upstream pi?](https://pi-rust.com/faq/#official): No. pi-rust.com is the website of pi-rust. Upstream pi is the TypeScript original by Mario Zechner, at github.com/earendil-works/pi. ## Optional - [Benchmarks](https://pi-rust.com/benchmarks/): memory of 20 concurrent sessions against Node pi and Codex CLI, with method and limits - [Changelog](https://pi-rust.com/changelog/): every release, newest first