pi-rust is a drop-in Rust port of the pi coding agent harness, built for 1:1 parity with pi. In this file, "upstream pi" is the original pi, which is written in TypeScript.
- Drop-in replacement: pi-rust is the same
picommand, and it reads your~/.pi/agentsetup. Session files, settings keys, config paths, and RPC and JSON events match upstream pi byte for byte, so the two can use one setup. - Extensions: your TypeScript extensions, skills, prompt templates, themes, and pi packages work as they are. Extensions run on an embedded QuickJS engine with the Node built-in modules, so pi-rust does not need Node.js or another JavaScript runtime. To run them on Node 22 or later, set
extensionRuntimeto"node". - 1:1 parity: the Parity workflow compares pi-rust with upstream pi every day and updates the parity report. Differences from upstream pi lists each intended difference.
One binary has these parts:
- A streaming API for large language models (LLMs) from many providers.
- An agent loop that calls tools.
- The
picoding agent, which has a command-line interface (CLI).
Website and documentation: pi-rust.com.
Linux and macOS:
curl -fsSL https://raw.githubusercontent.com/yannelli/pi-rust/main/install.sh | shWindows (PowerShell):
irm https://raw.githubusercontent.com/yannelli/pi-rust/main/install.ps1 | iexHomebrew (macOS and Linux):
brew install yannelli/tap/piThe script downloads the latest release, compares it with SHA256SUMS, and installs pi. For script options, manual install, and build from source, see Install.
# set an API key (ANTHROPIC_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY, ...)
# or run /login
export ANTHROPIC_API_KEY=...
# interactive session in the current directory
pi
pi -p "Summarize src/main.rs" # print mode: run once, print the answer
pi --mode json -p "List the TODOs" # one JSON event per line
pi --mode rpc # JSON-RPC over stdio for other programs
pi -c # continue the latest session here
pi -r # pick a session to resume
pi --model openai/gpt-5.5 --thinking high
pi @notes.md @screenshot.png "What changed?"
cat error.log | pi -p "Explain this error"
# install a pi package (extensions, skills, themes)
pi install npm:<package>Run pi --help to see all options. In interactive mode, type / to see the commands.
| Page | Contents |
|---|---|
| Install | Script options, manual install, provenance check, update, and build from source |
| Interactive commands | /diff, /context, /export, /init, /review, /undo, /retry, and prompt history |
| CLI commands and flags | pi completion, pi doctor, pi sessions, pi stats, run limits, structured output, and pi extensions |
| Extension marketplace | Find, install, update, and remove native Rust extensions |
| Providers | Wire protocols, logins, Cursor, Google Antigravity, disabledProviders, OpenRouter, and account model lists |
| Status line | The marketplace:statusline extension and the move from the built-in status line |
| Terminal | Themes, notifications, and the marketplace:iterm2 extension |
| ACP mode | pi --mode acp for Zed and other editors |
| ACP agents | Kiro CLI, Amp, and ACP registry agents as providers, /acp, and the acpAgents setting |
| Docs index | Agent playbooks, parity, and the protocol notes of the subscription providers |
pi-rust reads the same files as upstream pi, so the two can use one setup. To use a different folder in place of ~/.pi/agent, set PI_CODING_AGENT_DIR.
| Path | Contents |
|---|---|
~/.pi/agent/auth.json |
API keys and OAuth logins from /login or pi auth |
~/.pi/agent/settings.json |
Settings. In a trusted project, <project>/.pi/settings.json overrides them. |
~/.pi/agent/models.json |
Custom providers and models |
~/.pi/agent/keybindings.json |
Key bindings |
~/.pi/agent/mcp.json, <project>/.pi/mcp.json |
MCP servers |
~/.pi/agent/{extensions,skills,prompts,themes}/ |
Extensions, skills, prompt templates, and themes. .pi/ in a project and ~/.agents/skills also work. |
AGENTS.md, CLAUDE.md, SYSTEM.md, APPEND_SYSTEM.md |
Context files and system prompt overrides |
~/.pi/agent/sessions/ |
Sessions as JSONL trees in the pi format |
~/.pi/agent/prompt-history.jsonl |
The prompts that you sent, for Up, Down, and Ctrl+R (pi-rust only) |
When pi-rust starts for the first time, it moves files from older pi layouts, as upstream pi does. For example, it moves oauth.json into auth.json.
pi-rust ports the upstream pi CLI and its libraries. This section lists the differences and SDK limits.
-
New Kimi Code OAuth logins use the global
.aiendpoints.- For a mainland China login, set
KIMI_CODE_OAUTH_HOST=https://auth.kimi.com. - A new login stores its OAuth and API endpoints for later refreshes. Older logins without this metadata keep their mainland endpoints.
KIMI_CODE_OAUTH_HOSTandKIMI_CODE_BASE_URL, when set, override the saved endpoints. A custom modelbaseUrlinmodels.jsonstays in effect.
- For a mainland China login, set
-
Kimi and Moonshot tool requests infer omitted types from enums, constants, and unambiguous schema structure.
-
QuickJS answers
localhostand loopback reverse queries locally. It rejectsonionandinvalidnames and their subdomains without contacting a DNS server. If the OS supplies no DNS servers,getServers()returns an empty list. Extensions can supply a server withsetServers(). See DNS behavior. -
Extensions run on an embedded QuickJS engine, so pi-rust does not need Node.js. All Node built-in modules load. These include:
zlibwith gzip, brotli, and zstd.async_hookswithAsyncLocalStorage, andv8serialization.- The network modules
net,tls,dgram,dns,http,https, andhttp2. On Windows, QuickJS uses the adapter metric alone if it cannot read the system route table. vmcontexts with timeouts,worker_threads, andcluster. They can send socket and server handles over inter-process communication (IPC).node:sqliteon the bundled SQLite,node:testwith TAP and spec output, andreplover any streams.- In-process
inspectorsessions, andwasiwith aWebAssemblyglobal on the wasmi interpreter.
The APIs that do not work throw
ERR_PI_UNSUPPORTED. Examples are rarecryptociphers such as Camellia, and structured cloning of aCryptoKey.crates/pi-js/src/unsupported.rslists all of them. Native npm addons cannot load on QuickJS. Packages that need one, such as pi-deltabox, @ff-labs/pi-fff, and @onkernel/browser-loop (sharp), run with--extension-runtime autoornode.To run extensions on Node 22 or later, set
extensionRuntimeto"node"or"auto", or use--extension-runtimeorPI_EXTENSION_RUNTIME. On Node, native addons,child_process.fork, and V8-only modules work. If Node is missing, pi uses QuickJS. See Node backend. The extension package audit compares the 70 most downloaded npm extension packages with upstream pi and lists the engine each one needs. -
QuickJS comes from a vendored copy of
rquickjs-sys0.14.0 with one fix inquickjs.c: a module that waited only for a top-level-await dependency can be imported again later. Unpatched QuickJS-ng never settles that import. See[patch.crates-io]inCargo.toml. -
VERSIONof@earendil-works/pi-coding-agentis the upstream pi version that pi-rust has parity with, so version checks written for upstream releases pass.PI_RUST_VERSIONis the pi-rust release. Upstream has no such export. -
IPC handle retries use a pi-js-specific wrapper. Internal handle listeners receive an object with only
close(). Cluster connections queued to a disconnected worker are not reclaimed. See Extension runtime. -
On non-Linux Unix, a concurrent child spawn can inherit an IPC socket before QuickJS marks it close-on-exec. Node closes inherited descriptors in its macOS
posix_spawnpath. See Platform. -
In extensions,
ctx.sessionManagerreads return copies of entries, exceptgetEntries()of the extension's own session. Upstream pi returns its own entry objects from all reads.- As in upstream pi,
getEntries()of the extension's own session returns the same entry objects on each call, and a message entry holds the message object that themessage_endhandlers received. Thecontextofturn_endandagent_before_settleholds these objects too. - The other reads, such as
getEntry()andgetBranch(), return new copies on each call. Changes to returned entries do not change the session.
- As in upstream pi,
-
The extension SDK still has gaps in child sessions, resource loading, and model runtimes.
- A
DefaultResourceLoaderwith extensions serves one child session for eachreload(). Its factories run in the caller's extension host. SettingsManagersupports custom storage and queued writes, with limits on JSON values and live object references.createMcpExtensionstarts the native MCP of pi-rust. It registers no/mcpcommand and does not take the callback options.
See Extension module exports for the remaining differences.
- A
-
pi.registerProvider(provider)with an upstreamProviderobject registers its models, auth, and stream. pi-rust reads the model list of the object at registration and after eachrefreshModelspublish, not on every call, and calls onlystreamSimple. An object withoutgetModels()registers as a provider config. See Extension module exports. -
The providers that extensions get from
@earendil-works/pi-ai/providers/allstream, classify, generate images, and resolve auth in Rust. Their API key login asks for one key, including for Amazon Bedrock, Google Vertex AI, and Cloudflare. See Extension module exports. -
When you quit the interactive mode, pi waits at most 3 seconds for the running turn and the
session_shutdownhandlers, then exits. Upstream pi waits until they finish. -
An abort finishes in less than a second. Upstream pi waits for every tool and handler.
- The running tools and the extension handlers of the run's last events share 400 ms. Slow handlers keep running without blocking.
- RPC
abortanswers within 1.5 s. - A prompt sent while a run aborts starts after the run ends. Upstream pi rejects it.
- Extension prompts that were waiting to start do not run. Upstream pi starts them.
See RPC mode.
-
In RPC mode, extension dialogs wait until the client sends a command other than a
get_*query.get_commandsanswers while asession_starthandler waits for a dialog. Upstream pi sends dialogs at once and reads no input until itssession_starthandlers finish. See RPC mode. -
grepandfinduse the Rustignorecrate, so pi-rust does not downloadrgorfd. -
The version check and
pi update --selfuse the releases of this repository. -
Newer models come from the catalog at
pi-rust.com(PI_CATALOG_URLoverrides it), which this repository generates from upstream's catalog generator at the upstream commit of the latest release. Upstream pi reads its catalog frompi.dev. See Model catalog. -
/bugoffers Upload Report, Open GitHub Issue, and Export as Zip. Upload Report sends the report privately topi-rust.com(PI_BUG_REPORT_URLoverrides it). Open GitHub Issue writes the zip archive and opens a public prefilled issue form onyannelli/pi-rust; you submit it and attach the zip yourself. Upstream pi uploads the report to its Radius gateway (radius.pi.dev). -
Install telemetry is off unless you turn it on with the
enableInstallTelemetrysetting orPI_TELEMETRY=1. When it is on, pi-rust sends the anonymous install and update ping (version andUser-Agentonly) topi-rust.com(PI_TELEMETRY_URLoverrides it). Upstream pi turns install telemetry on by default and pingspi.dev. For the same reason, the extension SDK'sSettingsManager.getEnableInstallTelemetry()returnsfalsewhen the setting is not set. Upstream returnstrue. -
/sharecan upload the session's HTML export to your pi-rust.com account. SetsessionShareDestinationto"pi-rust"; if you are not signed in, the share first signs you in with a device code, and/logoutsigns you out. WithsessionShareViewerset to"pi-rust", gist links open onpi-rust.com/session/and"auto"uses the account first when you are signed in. By default both work as upstream pi: Radius or a gist, with gist links onpi.dev.PI_SHARE_URLreplaces thepi-rust.comservice origin. See Settings. -
Shares on a pi-rust.com account can expire (
sessionShareExpiry) and can be private to you (sessionShareVisibility). On pi-rust.com you can rename, download, and delete them, and see their view counts. Upstream pi has no such options. -
The first interactive
/shareasks where it sends sessions: pi.dev, as upstream pi does (Radius, or gists viewed on pi.dev), or a pi-rust.com account. pi.dev is the default, and nothing asks at startup. Upstream pi has no such question. See Session sharing. -
The
providerIdentitysetting chooses how model provider requests identify pi-rust. With"pi"(the default), theUser-Agentispi/<version>with the upstream pi version that pi-rust has parity with, and attribution headers name pi andpi.dev. With"pi-rust", theUser-Agentispi-rust/<pi-rust version>, and attribution headers name pi-rust andpi-rust.com. Attribution headers are sent only while install telemetry is on. Upstream pi always reports its own version. See Settings. -
Word movement in Chinese, Japanese, Korean (CJK), and Thai text uses ICU4X dictionaries, so some word boundaries differ from
Intl.Segmenterin Node. -
pi-envlooks for remote daemons in api-env-daemonsfolder next to thepiprogram. Each release has api-env-daemons-<tag>.tar.gzarchive with the daemons for Linux, Android (Termux), macOS, and Windows on x86-64 and arm64. Extract this archive in the folder that containspi. -
pi experimentaland its commandsserver,client,durable, andvacationneedPI_EXPERIMENTAL=1, as in upstream pi.serverandclientuse Unix sockets. On Windows, they show a message that they need Unix. Upstream pi also has no Windows transport. -
When a local shell command exits, pi-durable stops waiting for output as upstream does: 100 ms after the exit, or 100 ms after the last chunk that follows the exit. Then:
- It delivers the queued chunks and any chunk that the readers finish reading before they observe the stop signal.
- On Unix, it also takes at most 64 KiB more per stream, if that data is readable without waiting.
- On Windows, it starts no further read.
See Platform.
-
When you clear the message queue, pi removes only your queued messages. Upstream pi drops queued extension messages with the queue.
- Esc while the agent works, the dequeue key, and the RPC
clear_queuecommand clear the queue. - Queued extension messages, such as subagent or background task results, stay queued.
- When a run is aborted, queued extension messages join the conversation without starting a turn, so the agent sees them with your next prompt.
- A message that an extension sends with
triggerTurnwhile the run is ending continues that run. Upstream pi leaves that message queued until the next prompt.
- Esc while the agent works, the dequeue key, and the RPC
-
In a linked git worktree, pi reads the project files that the worktree lacks from the main checkout. Upstream pi reads only the worktree.
- Files:
.pi/settings.json,.pi/mcp.json,.pi/SYSTEM.md, and.pi/APPEND_SYSTEM.md. - Folders:
.pi/skills,.pi/prompts,.pi/extensions, and.pi/themes. - The worktree's own copy wins.
- Project packages and relative entries resolve from the folder of the settings file that applies.
- A trust decision for the main checkout covers its worktrees, unless the worktree folder has its own.
See Settings.
- Files:
-
Extension and login
selectmenus show at most 10 options, with a(n/total)counter, so the selected option stays visible. Short terminals show fewer options. Upstream pi shows all options. -
An MCP server name in
mcp.jsonorpi.registerMcpServercan have any characters except control characters and spaces at either end, for example"Google Drive"from a Claude Code plugin. In tool names and the server namespace, each character other than an ASCII letter, an ASCII digit, or_changes to one_for each UTF-16 unit (😀gives__), soGoogle Drivegivesmcp__Google_Drive. pi rejects a server whose name gives the same namespace as an earlier server./mcp login,/mcp logout, and/mcp reconnectuse the rest of the line as the server name. Upstream pi accepts only letters, digits,_, and-in server names.
| Addition | Upstream pi | Docs |
|---|---|---|
The slash commands /diff, /init, /review, /context, /undo, and /retry |
Has none of them. Shows context use only in the footer. | Interactive commands |
Markdown export: /export notes.md and pi --export session.jsonl notes.md |
Exports only HTML and JSONL | Export |
Prompt history across sessions, with the Ctrl+R search and the promptHistory settings |
Keeps prompt history only while the process runs | Prompt history |
Alt+Down (Alt+S on Windows, app.message.sendNow) sends the queued follow-ups after the current turn. It moves them to the steering queue. |
Can only edit the queue or abort the turn | Interactive commands |
Ctrl+Enter (app.message.interrupt) stops the agent, also during a long tool call, and sends the queued messages and the editor text as one prompt |
Needs Esc, which moves the queue to the editor, and then Enter | Interactive commands |
| Esc clears the input draft when the agent is idle. Undo restores the draft. | ||
| Submitted slash commands join prompts and shell commands in the Up and Down history | ||
pi completion and pi doctor |
Has neither command | CLI |
pi sessions and pi stats |
Lists and deletes sessions only in its session picker (pi -r and /resume). Shows usage only for the current session (/session). |
Sessions |
pi extensions lists, installs, removes, enables, and disables extensions through the package and resource settings |
Extensions | |
marketplace: package sources, pi extensions search, and pi extensions info, which use signed indexes and checksummed native binaries |
Has no Rust extension marketplace | Marketplace |
The /extensions browser searches, installs, updates, removes, enables, and disables extensions, then offers a reload |
Has no /extensions command |
/extensions |
Run limits (--max-turns, --max-cost) and structured output (--output-schema, --output-retries) |
Run limits | |
pi --mode acp, with several sessions per connection and the client's stdio and HTTP MCP servers |
Needs the separate pi-acp adapter. pi-acp accepts no HTTP MCP servers, keeps one session per connection, rejects a prompt while pi runs on its own, and ends failed turns with end_turn. |
ACP mode |
RPC and ACP modes run /usage, /context, /extensions, /fast, and /reload without a model call. RPC mode also runs /session, /changelog, /export, and /name. |
Sends these prompts to the model in RPC mode | RPC mode |
| Account model lists for OpenAI Codex, Anthropic, GitHub Copilot, OpenAI, xAI, Google, and Cursor | Limits only OpenRouter | Account model lists |
Claude Mythos 5.2 (claude-mythos-5-2) is in the anthropic catalog with the settings and prices of Claude Fable 5.2. pi removes it for an account whose model list does not name it. |
Has no Mythos 5.2 model | Account model lists |
/usage, pi usage, and the native extension method usage.get show the subscription limits of the Claude, ChatGPT (Codex), Cursor, SuperGrok (xai, with Grok Build), and Google Antigravity logins |
Has no usage report | Subscription usage limits |
Fast mode for models that have one: /fast, --fast, the fastMode setting, the ACP Fast mode option, and RPC set_fast_mode |
Has no fast mode | Fast mode |
The subscription providers cursor and google-antigravity |
Has none of them | Subscription providers |
ACP agents as providers: Kiro CLI (V3), Amp, and the agents of the ACP registry run over stdio with their own tools. /acp installs and manages them. |
Has no ACP client | ACP agents |
The global disabledProviders setting hides providers from model selection and keeps their credentials. The TUI /settings menu has a Disabled providers list. |
Disable providers | |
The global rememberLastModel setting (on by default) saves each model you switch to as the default |
Saves the default model only with the selector's set-as-default key | Remember the last model |
/settings items for the retry.* and retry.provider.* values |
Sets these values only in settings.json |
Retry settings |
listOverflow and List overflow in /settings: truncate, wrap, or scroll long list rows; PI_REDUCED_MOTION=1 disables scrolling |
Truncates list rows | List overflow |
| A terminal notification when a run takes 10 seconds or more | Has this only as the example extension notify.ts |
Notifications |
The status line and /statusline, as the marketplace:statusline extension |
Changes the footer only through extensions | Status line |
| More harness themes | Themes | |
Mermaid gantt charts and gitGraph diagrams render as terminal art. Git graphs are always drawn top to bottom (BT flips them). |
Shows these diagrams as source | |
The iTerm2 integration and /terminal-setup, as the marketplace:iterm2 extension |
iTerm2 integration | |
The extension UI call ctx.ui.writeTerminal(data, { tmuxPassthrough }) writes raw bytes to the terminal |
Has no such call | |
Footer data of ctx.ui.setFooter also has getSessionStats() (input, output, cacheRead, cacheWrite, cost, contextTokens, contextWindow, contextPercent) and getRunState() (idle, working, blocked, done, or error) |
Has neither | |
Native extensions: a package lists programs in package.json pi.native, and pi runs each one as an extension over a JSON-RPC protocol on stdio |
Loads only TypeScript and JavaScript extensions | Native extension protocol |
Extensions call tools of the session's MCP servers outside a tool call, for example from a hook: pi.callMcpTool(server, tool, args) and the native method mcp.callTool |
Has no MCP tool calls for extensions | mcp.callTool |
Extension events for hook runners: instructions_loaded, prompt_expansion, notification, tool_call_blocked, cwd_changed, and before_provider_auth. session_start handlers can call ctx.switchSession(). |
Has none of these events. Only command contexts have switchSession. |
pi-rust events |
A session_before_compact result can set customInstructions for that compaction. The text replaces the instructions of the event, so a handler that keeps them adds its text to event.customInstructions. |
Reads only cancel and compaction |
Events |
Native extensions draw the rows of tools without renderers, such as the built-in tools (toolRenderers). They can also animate a spinner inside drawn rows, refresh rows on a timer, read the TUI theme, and set the working indicator. |
Renderers | |
ctx.ui.setChatStyle (ui.setChatStyle) puts prefixes before user and assistant messages, collapses finished thinking, and rounds the editor. It also sets the editor border color and the prompt layout (frame, caret, or harbor). |
Chat style | |
An expanded tool row can show an extension's view of the result (pi.registerToolResultExpander, native toolResultExpander), for example the full text behind a shortened result |
Has no expander for other tools' results | Renderers |
Native extensions write their own top-level settings key in the global or a trusted project settings.json with settings.set. pi refuses its own setting keys. |
Extensions have no settings write | settings.set |
pi.registerProvider takes oauth: { builtin: "<provider id>", name? }: the provider logs in and refreshes with a login flow of pi, and stores the credential under its own id |
Reuses a flow only through an imported OAuth object | provider.register |
| Extension widgets above and below the editor share a budget of a third of the terminal rows. Over the budget, each widget shows its first line. | Caps only text widgets, at 10 lines each | /widgets |
MCP servers with "lifecycle": "lazy" in mcp.json connect on first use. A saved tool list makes their tools known before they connect. |
Connects every enabled server when the session starts | MCP server lifecycle |
MCP elicitation: servers can ask the user for form data or to open a URL. The extension events mcp_elicitation and mcp_elicitation_result can answer a request or change the answer of the user. |
Has no MCP elicitation | MCP elicitation events |
The extension event message_display replaces the text of an assistant message on the screen in the TUI. The session and the model context keep the original text. |
Has no display-only event. registerMarkdownTransformer changes the Markdown at each render. |
Events |
Deferred context: the contextExposure setting and the skill frontmatter exposure: deferred keep skills and extension context entries, such as agent configs, out of the system prompt. tool_search finds them. |
Lists every skill in the system prompt. Only tools can be deferred. | Deferred context |
A choice of extension engine: the extensionRuntime setting, --extension-runtime, and PI_EXTENSION_RUNTIME (quickjs, node, or auto) |
Always runs extensions on Node | Extension runtime |
The numbers are upstream issue numbers.
- If you remove a tool from the first tool list, later Anthropic requests do not fail (upstream issue 11376).
- On Bedrock,
strict: "prefer"tools change to non-strict when the strict tools have more than 16 optional parameters (11416). modelOverridesinmodels.jsonalso apply to classifier and image models:name,input,inputLimits, andcost. For classifiers,contextWindowandcompatalso apply (11223).- The editor removes escape sequences from pasted text. If the end marker of a paste does not arrive, the paste ends after 10 seconds without input or at 16 MiB. Then Ctrl+C works again (11383).
- MCP HTTP replies that are plain JSON obey
maxMessageBytes(11335). - A code mode script can declare its own top-level
toolsorconsole(11226). - Branch summaries from
/treeuse the selected thinking level (11444). If you resume a session after/tree, pi restores the thinking level that you used last (11451). - pi removes mouse reports and other escape sequences with private parameters, such as
ESC[<35;59;1M, from tool output (11377). - In
pi -p, a prompt that an extension command sends withsendUserMessageruns before pi exits (11238). - An unpinned
-e npm:package updates when npm has a newer version (11375). pi.execkeeps a maximum of 16 MiB of output from a command. It stops the command when the output gets to that limit (11360).pi-envwatches a directory again after the kernel drops the watch and the directory keeps its inode (11342).
| Crate | Contents |
|---|---|
pi-ai |
Message types (JSON-compatible with pi), streaming events, providers, OAuth, the model registry, and catalogs |
pi-agent |
The agent loop, tool argument validation, and the stateful Agent |
pi-tui |
The terminal UI library: differential rendering, editor, markdown, images, and components |
pi-mcp |
The MCP client (stdio and HTTP, OAuth) and server manager |
pi-codemode |
Codemode: a sandboxed JavaScript runtime in which the model writes scripts that call tools |
pi-js |
Embedded QuickJS with Node-style modules and TypeScript, for pi extensions |
pi-coding-agent |
Tools, sessions, compaction, resources, extensions, the interactive TUI, the print, JSON, RPC, and ACP modes, and the pi CLI |
pi-chord |
Chord: an application composition runtime for services, replicated state, RPC, and plugins |
pi-telemetry |
Vendor-neutral telemetry contracts and typed schema utilities |
pi-schema |
TypeBox-compatible JSON Schema checks, defaults, and value cleanup, and the tool argument coercion and errors of upstream pi-schema, for pi-ai, pi-agent, and pi-chord |
pi-embedded |
In-process pi sessions for native and Rust applications, with a C ABI (include/pi_embedded.h) |
pi-protocol, pi-client, pi-server |
The CBOR wire protocol, its client, and its server over Unix sockets |
pi-durable |
Pi Durable: durable sessions on memory, SQLite, or JSONL storage, the harness, and its coding tools |
pi-env, pi-env-daemon |
Remote execution environments for Pi Durable over SSH, and the pi-env daemon that runs on the remote machine |
pi-evals |
Behavioral evals for the coding agent: host evals and a documentation-lift comparison in Docker (not published) |
cargo fmt --all
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspaceThe tests use the faux provider and local mock HTTP servers. They do not need API keys or network access.
Versions obey Semantic Versioning. The commit messages set the next version, as in Conventional Commits:
| Commit | Release |
|---|---|
fix:, perf:, revert: |
patch |
feat: |
minor (patch before 1.0) |
feat!:, fix!:, or a BREAKING CHANGE: footer |
major (minor before 1.0) |
docs:, chore:, ci:, test:, refactor:, style:, build: |
none |
After continuous integration (CI) passes on main, the Release workflow runs cargo xtask plan. If a release is necessary, the workflow does these steps:
- It increases the workspace version.
- It adds the new section at the top of
CHANGELOG.md. - It commits
chore(release): vX.Y.Zand adds the tagvX.Y.Z. - It builds all targets.
- It publishes the GitHub release with checksums.
Other ways to start the workflow:
- Push a
vX.Y.Ztag that matchesCargo.toml. The workflow releases that version. - Push a
vX.Y.Z-rc.1tag. The workflow publishes a pre-release. - Run the workflow manually with
dry_run. The workflow builds all targets and does not release. - Run the workflow manually with
bumpset topatch,minor, ormajor, and withdry_runoff. The workflow releases when the commits do not need a release.
cargo xtask plan # next version and release decision
cargo xtask prepare 0.2.0 # set the version and update CHANGELOG.md
cargo xtask notes 0.2.0 # print release notesMIT. pi-rust is based on pi by Mario Zechner. See LICENSE.
These parts come from other projects. Each release archive includes their license notices.
| Part | Source | License file |
|---|---|---|
| ACP mode | pi-acp by Sergii Kozak | LICENSE-pi-acp |
| ACP wire types | Agent Client Protocol schema 0.13.7 | LICENSE-agent-client-protocol-schema |
| Terminal mode and size handling | crossterm 0.29.0 | LICENSE-crossterm |
| Some JavaScript modules of the extension runtime | Node.js | LICENSE-node |
| JSON syntax diagnostics in the extension runtime | V8 | LICENSE-v8 |
| MCP OAuth code, ported from upstream pi | MCP TypeScript SDK | LICENSE-mcp-typescript-sdk |
Warning colors of loadProjectContextFiles in the extension SDK |
chalk 6.0.0 by Sindre Sorhus | LICENSE-chalk |
| Settings JSON error messages | V8, BSD 3-Clause | LICENSE-v8-settings |
| Edit diffs and the word highlights of the diff view | jsdiff 8.0.4 by Kevin Decker, BSD 3-Clause | LICENSE-jsdiff |
File locks and exit cleanup for ProjectTrustStore |
proper-lockfile 4.1.2 and signal-exit 3.0.7 | LICENSE-proper-lockfile, LICENSE-signal-exit |
The release archives also include THIRD-PARTY-LICENSES.md with the licenses of the third-party Rust crates in the binaries. The Release workflow writes it with cargo-about from about.toml and about.hbs.