{"slug": "pi-the-coding-agent-compiled-ahead-of-time-to-one-native-executable", "title": "Pi, the coding agent, compiled ahead of time to one native executable", "summary": "Pi-Bolt 1.0.0, a build of the Pi coding agent compiled ahead of time to a single native executable, launches as one binary for Linux x86-64 and ARM64, macOS on Apple silicon and Windows x64 with no JIT and no Node.js or Bun required. Benchmarked against Pi 1.4.0 on Node 24 on Linux x86-64 with one CPU, Pi-Bolt is ready to type in 41 ms versus 423 ms, writes a 400 KB file through a tool call in 1.2 s versus 143.7 s, uses 2.3 s of CPU versus 18.6 s while a long answer streams, and holds 117 MB versus 521 MB of memory after 40 prompts. Pi-Bolt keeps the same commands, sessions, settings, providers and extensions as Pi, installs alongside it as pi-bolt, and offers an optional JIT build for heavy plugins that stays within about 5% of the default build's performance for Pi itself.", "body_md": "**The [Pi](https://github.com/earendil-works/pi) coding agent, compiled ahead of time to native code.**\n\n  One executable for Linux x86-64 and ARM64, macOS on Apple silicon and Windows x64.\n\n  No JIT, no Node.js or Bun required.\n\n[**Install**](#quick-start) ·\n  [**Benchmarks**](#benchmarks) ·\n  [**Docs**](#documentation) ·\n  **Website**\n\nPi-Bolt is the Pi you already use, with the same commands, sessions, settings, providers and extensions, but every function is compiled to machine code when the executable is built, so nothing is parsed or JIT-compiled at launch. Against Pi as released on Node 24, it writes a 400 KB file 120 times faster, uses 8 times less CPU while a long answer streams, 7 times less over a session and a quarter of the memory; against Pi on stock Bun, much the same.\n\n## pi-bolt-v5-github.mp4\n\n|  | Pi on Node 24 | Pi‑Bolt | \n|---|---|---|\n| Ready to type | 423 ms | **41 ms**<sub>10× sooner</sub> | \n| Writing a 400 KB file through a tool call | 143.7 s | **1.2 s**<sub>120× faster</sub> | \n| CPU while a long answer streams | 18.6 s | **2.3 s**<sub>8× less</sub> | \n| CPU per prompt, 40 prompts into a session | 352 ms | **46 ms**<sub>7.7× less</sub> | \n| Memory after 40 prompts | 521 MB | **117 MB**<sub>4.5× less</sub> | \n\n<sub>Pi-Bolt 1.0.0 against Pi 1.4.0 as released, Linux x86-64, one CPU. Every platform: [Benchmarks](#benchmarks).</sub>\n\n- **Nothing to install first:** one executable; no Node.js, Bun or npm to run it.\n- **The same Pi:** same commands, sessions, settings and providers; every Pi extension works unchanged.\n- **Long sessions stay fast:** a frame costs about the same with 4,000 messages as with none, and typing stays responsive.\n- **Everywhere:** Linux x86-64 and ARM64 (Android too, in Termux), macOS on Apple silicon, Windows x64.\n\n**Linux, macOS, Android (Termux)**\n\n```\ncurl -fsSL https://pi-bolt.opensec.in/install.sh | sh\n```\n\n**Windows** (PowerShell)\n\n```\nirm https://pi-bolt.opensec.in/install.ps1 | iex\n```\n\nOr:\n\n- Command Prompt: `powershell -c \"irm https://pi-bolt.opensec.in/install.ps1 | iex\"`\n- npm: `npm install -g --allow-scripts=pi-bolt pi-bolt`\n- Bun: `bun add -g --trust pi-bolt`\n- Arch Linux: the community AUR package\n[`pi-bolt-avx2-bin-release-git`](https://aur.archlinux.org/packages/pi-bolt-avx2-bin-release-git) (the x86-64 AVX2 build,\nsignature checked),`paru -S pi-bolt-avx2-bin-release-git`\n\nThen, in your project:\n\n```\npi-bolt                         # start\npi-bolt update                  # install the latest release\npi-bolt update --rollback       # put back the build it replaced\npi-bolt update --channel beta   # take pre-releases too\n```\n\nNew to Pi? Run `/login` to connect a provider. Your Pi configuration in `~/.pi/agent` is used as is. Pi-Bolt installs next to Pi as `pi-bolt`, so both can stay installed;\nrunning the installer again updates, reinstalls or uninstalls it.\n\n## **Optional extensions the installer offers**\n\nThe installer verifies the release signature and offers three optional extensions by OpenSec:\n\n- [`opensec-pi-subagents`](https://www.npmjs.com/package/opensec-pi-subagents) : specialized agents in separate sessions,\nparallel workflows and scheduled jobs.\n- [`opensec-pi-todo`](https://www.npmjs.com/package/opensec-pi-todo) : a todo list for the model, shown as a live panel above the\neditor.\n- [`opensec-pi-fff`](https://www.npmjs.com/package/opensec-pi-fff) : pi-fff's fast fuzzy find, grep and`@` -mentions, at full\nspeed on the default build.\n\n## **JIT build, for heavy plugins**\n\nThe default build has no JIT: Pi's own code is compiled machine code, and an extension loaded at run time is interpreted. Light\nextensions don't notice. For extensions that do heavy work (search, parsing) or use `bun:ffi`, install the JIT build. Pi itself\nstays compiled, so it is within about 5% of the default.\n\n```\n# macOS, Linux ARM64, Termux\ncurl -fsSL https://pi-bolt.opensec.in/install.sh | PIBOLT_VARIANT=arm64-jit sh\n# Linux x86-64\ncurl -fsSL https://pi-bolt.opensec.in/install.sh | PIBOLT_VARIANT=x64-jit sh\n```\n\nOn Windows, run `$env:PIBOLT_VARIANT = \"x64-jit\"` before the PowerShell command. With npm, keep `PIBOLT_VARIANT` set in your\nshell profile; it is read on every run. `pi-bolt --version` then ends in `JIT on`, and `pi-bolt update` keeps the build you\nchose.\n\nOn the default build, an extension that needs the JIT (it calls into a native library through `bun:ffi`) fails with a line that\nnames the extension and gives the command that switches to the JIT build.\n\n## **Manual download**\n\nDownload a build from the [latest release](https://github.com/opensec-git/Pi-Bolt/releases/latest), check it against\n`SHA256SUMS`, unpack it and run `./pi` (on Windows, `pi-bolt.exe`).\n\n| Download | For | \n|---|---|\n| `pi-bolt-linux-x64.tar.xz` | **Linux** , CPUs with AVX2 (Intel Haswell, AMD Zen and later) | \n| `pi-bolt-linux-x64-baseline.tar.xz` | Linux, any x86-64 CPU | \n| `pi-bolt-linux-arm64.tar.xz` | **Linux** ARM64, any 64-bit ARM CPU (Raspberry Pi 3 and later, AWS Graviton, Ampere) | \n| `pi-bolt-darwin-arm64.tar.xz` | **macOS** , Apple silicon | \n| `pi-bolt-win32-x64.zip` | **Windows** x64; compiled code on CPUs with AVX2, bytecode on others | \n\n`-jit` builds are for heavy use of plugins loaded at run time; the runtime and kit archives are what `pi-bolt compile` builds\nwith ([compiling plugins in](https://github.com/opensec-git/Pi-Bolt/blob/pi-bolt/docs/PLUGINS.md)). In Termux, use the installer: it sets the executable's loader to Termux's glibc\n([Android](#android-termux)).\n\n## **Android (Termux)**\n\nIn [Termux](https://termux.dev) from F-Droid or GitHub (the Google Play version has no glibc packages), run the same\n`curl ... | sh` command. Pi-Bolt is a glibc program and Android's libc is not glibc, so the installer first installs Termux's\nglibc (`pkg install glibc-repo && pkg install glibc`, after asking), sets it as the executable's loader, and links `pi-bolt`\ninto `$PREFIX/bin`.\n\n`pi-bolt` is a small launcher that starts Pi-Bolt in Android's time zone and without Termux's `LD_PRELOAD` (a library of\nAndroid's libc, which glibc cannot load); the programs Pi-Bolt starts get it back. The installer copies Termux's `resolv.conf`\nand `hosts` to `$PREFIX/glibc/etc`, where Termux's glibc reads them.\n\n## **Requirements**\n\n- **Linux** x86-64 or ARM64 with glibc 2.17 or later (Ubuntu 20.04+, Debian 11+, RHEL/Rocky 8+, Amazon Linux 2, Raspberry Pi\nOS 64-bit). musl is not supported.\n- **Android** 7 or later on 64-bit ARM, in Termux.\n- **macOS** 13 or later on Apple silicon. Install with the installer or npm\n([Troubleshooting](https://github.com/opensec-git/Pi-Bolt/blob/pi-bolt/docs/TROUBLESHOOTING.md#macos) ).\n- **Windows** 10 (1809) or later, or Windows 11, on x64. Install with the installer or npm; for problems, see[Troubleshooting: Windows](https://github.com/opensec-git/Pi-Bolt/blob/pi-bolt/docs/TROUBLESHOOTING.md#windows) .\n- Windows on ARM64 runs the x64 build, in Windows 11's x64 emulation.\n\n- **Editors:**`pi-bolt --acp` runs Pi-Bolt in the agent panel of Zed, JetBrains IDEs, VS Code, Neovim and other[ACP](https://agentclientprotocol.com) editors, with your Pi settings, extensions, skills and sessions.[Setup](https://github.com/opensec-git/Pi-Bolt/blob/pi-bolt/docs/ACP.md)\n- **Other agents:**`pi-bolt --mcp` is an[MCP](https://modelcontextprotocol.io) server; other agents give Pi-Bolt a task with\nits`prompt` tool and continue the session in later calls.[Setup](https://github.com/opensec-git/Pi-Bolt/blob/pi-bolt/docs/MCP.md)\n- **Built-in search:** the`grep` and`find` tools are on by default and search in-process, following`.gitignore` , with\nnothing to install. With[`opensec-pi-fff`](https://www.npmjs.com/package/opensec-pi-fff) or`@ff-labs/pi-fff` loaded,\nFFF's search tools are used instead.\n- **Compiled plugins:**`pi-bolt compile` compiles the extensions installed on this machine into your Pi-Bolt (Linux and macOS)\nwith the release's own compiler, where they run as machine code;`pi-bolt update` compiles them into each new release.[Plugins](https://github.com/opensec-git/Pi-Bolt/blob/pi-bolt/docs/PLUGINS.md)\n- **Doctor:**`pi-bolt doctor` prints a plain-text report of your installation to paste into an issue.[Details](#pi-bolt-doctor)\n- **Updates:**`pi-bolt update` installs the latest release, and`--rollback` puts back the build it replaced.\n- **Herdr:** Pi-Bolt shows its state in a[Herdr](https://herdr.dev) pane, and a Herdr restart reopens the conversation.[Details](#herdr)\n- **ARM64 and Android:** Linux ARM64 builds, and the same installer in Termux.[Android](#android-termux)\n\nPi extensions work unchanged. The default build has no JIT, so an extension loaded at run time is interpreted; compile the ones\nyou use every day into Pi-Bolt with `pi-bolt compile`, or use the [JIT build](#jit-build-for-heavy-plugins).\n\n## **Setup in Zed and Claude Code**\n\nIn Zed's `settings.json` ([other editors](https://github.com/opensec-git/Pi-Bolt/blob/pi-bolt/docs/ACP.md)):\n\n```\n\"agent_servers\": {\n  \"Pi-Bolt\": { \"type\": \"custom\", \"command\": \"/full/path/to/pi-bolt\", \"args\": [\"--acp\"], \"env\": {} }\n}\n```\n\nIn Claude Code ([other clients](https://github.com/opensec-git/Pi-Bolt/blob/pi-bolt/docs/MCP.md)):\n\n```\nclaude mcp add pi-bolt -- /full/path/to/pi-bolt --mcp\n```\n\n## **Pi and Pi-Bolt side by side**\n\nPi-Bolt uses Pi's agent directory (`~/.pi/agent`) and shared `packages` list. Ordinary `pi-bolt install` and `pi-bolt remove`\nupdate that shared list, just as Pi does, and drop Pi-Bolt's own entry for that package, so both load what the shared list\ndeclares. Add `--pi-bolt` to change only Pi-Bolt's overrides. Using fictional package names:\n\n```\npi-bolt install --pi-bolt npm:@example/bolt-tools\npi-bolt remove --pi-bolt npm:@example/shared-tools\n```\n\n`piBolt.packages` extends the shared list. A `-source` entry excludes an inherited package from Pi-Bolt without changing Pi;\nother shared packages remain inherited. See [Configuration](https://pi-bolt.opensec.in/docs/configuration.html).\n\n```\n{\n  \"packages\": [\"npm:@juicesharp/rpiv-todo\"],\n  \"piBolt\": { \"packages\": [\"-npm:@juicesharp/rpiv-todo\", \"npm:opensec-pi-todo\"] }\n}\n```\n\n## **pi-bolt doctor**\n\n`pi-bolt doctor` prints a report of your installation, in plain text to paste into an issue: the build and how it was installed,\nwhether the release's signature verifies, which extensions are compiled in, run at run time or fail to load, how Pi's `packages`\nand `piBolt.packages` differ, the Herdr and editor setup, and the problems it finds, such as another `pi-bolt` earlier on your\n`PATH`. It prints no keys or tokens, and shows your home folder as `~`. `pi-bolt doctor --offline` leaves out the release\nsignature and the check for a newer version.\n\n## **Herdr**\n\nIn a [Herdr](https://herdr.dev) pane, Pi-Bolt shows up as `pi-bolt` (idle, working or blocked), and a Herdr restart reopens the\nsame conversation in the same pane. There is nothing to install; `\"-builtin:herdr\"` in the `extensions` setting turns it off.\nRestoring a session needs Herdr 0.9.2 or later. To start other agents in Herdr panes from Pi-Bolt, install\n[pi-herdr](https://www.npmjs.com/package/@andrewjacop/pi-herdr): `pi-bolt install npm:@andrewjacop/pi-herdr`.\n\nPi-Bolt 1.0.0 against Pi 1.4.0 as released on npm, run by stock Bun 1.4.4 and by Node 24, doing the same work against the same local model; lower is better.\n\n## **Linux x86-64**\n\n| Benchmark | Pi-Bolt | Pi on Bun | Pi on Node 24 | \n|---|---|---|---|\n| Writing a 400 KB file through a tool call, s | **1.2** | 194.8 | 143.7 | \n| CPU, streaming a 60,000-character answer, s | **2.34** | 21.92 | 18.62 | \n| CPU per prompt, prompts 21 to 40 of a session, ms | **46** | 328 | 352 | \n| CPU, interactive session, ms | **167** | 1,087 | 1,180 | \n| Memory after 40 prompts, MB | **117** | 309 | 521 | \n| Ready to type, ms | **41** | 366 | 423 | \n\n## **Linux ARM64**\n\n| Benchmark | Pi-Bolt | Pi on Bun | Pi on Node 24 | \n|---|---|---|---|\n| Writing a 400 KB file through a tool call, s | **1.3** | 164.1 | 134.5 | \n| CPU, streaming a 60,000-character answer, s | **2.32** | 18.82 | 18.19 | \n| CPU per prompt, prompts 21 to 40 of a session, ms | **42** | 280 | 299 | \n| CPU, interactive session, ms | **156** | 1,021 | 1,099 | \n| Memory after 40 prompts, MB | **120** | 299 | 640 | \n| Ready to type, ms | **37** | 334 | 390 | \n\n## **macOS (Apple M5)**\n\n| Benchmark | Pi-Bolt | Pi on Bun | Pi on Node 24 | \n|---|---|---|---|\n| Writing a 400 KB file through a tool call, s | **0.6** | 76.2 | 96.7 | \n| CPU, streaming a 60,000-character answer, s | **1.35** | 7.10 | 6.47 | \n| CPU per prompt, prompts 21 to 40 of a session, ms | **17** | 111 | 149 | \n| CPU, interactive session, ms | **80** | 485 | 523 | \n| Memory after 40 prompts, MB | **89** | 746 | 1,363 | \n| Ready to type, ms | **24** | 120 | 151 | \n\n## **Windows x64**\n\n| Benchmark | Pi-Bolt | Pi on Bun | Pi on Node 24 | \n|---|---|---|---|\n| Writing a 400 KB file through a tool call, s | **1.8** | 131.0 | 110.1 | \n| CPU, streaming a 60,000-character answer, s | **2.69** | 44.86 | 39.01 | \n| CPU per prompt, prompts 21 to 40 of a session, ms | **53** | 278 | 379 | \n| CPU, interactive session, ms | **213** | 1,266 | 1,286 | \n| Memory after 40 prompts, MB | **79** | 286 | 378 | \n| Ready to type, ms | **78** | 300 | 363 | \n\nGitHub's runners for Linux (pinned to one CPU) and Windows (2 cores; memory there is the working set); macOS on an Apple M5,\nnot pinned. Node 22, the method and the raw data: [`bench/results/2026-10-23-stock-bun-1.0.0`](https://github.com/opensec-git/Pi-Bolt/blob/pi-bolt/bench/results/2026-10-23-stock-bun-1.0.0).\n\nAgainst [PiG](https://github.com/MichaelKinsy/PiG) 0.5.1 (Pi ported to Go):\n[Pi-Bolt against PiG](https://github.com/opensec-git/Pi-Bolt/blob/pi-bolt/docs/BENCHMARKS.md#100-against-pig-051-and-099). Every other result, and the method:\n[docs/BENCHMARKS.md](https://github.com/opensec-git/Pi-Bolt/blob/pi-bolt/docs/BENCHMARKS.md).\n\n1. **Bun bundles Pi** and compiles it to JavaScriptCore bytecode.\n2. **An ahead-of-time compiler** turns every function into optimized x86-64 or ARM64 machine code, through B3, the back end of\nJavaScriptCore's top-tier JIT.\n3. **A prebuilt heap** holds Pi's modules already loaded, and is mapped from the executable at launch.\n4. **A training profile** orders the code so that startup touches as few pages as possible.\n\n## **Diagram and sources**\n\nThe compiler builds on [oven-sh/WebKit#743](https://github.com/oven-sh/WebKit/pull/743). Pi-Bolt ports it to x86-64 and macOS\nand adds its own code generation and runtime work ([docs/ARCHITECTURE.md](https://github.com/opensec-git/Pi-Bolt/blob/pi-bolt/docs/ARCHITECTURE.md)). `packages/` is the Pi release\nnamed in [`sources.json`](https://github.com/opensec-git/Pi-Bolt/blob/pi-bolt/sources.json) with Pi-Bolt's changes on top; the engine changes are in `patches/`.\n\n- [Architecture](https://github.com/opensec-git/Pi-Bolt/blob/pi-bolt/docs/ARCHITECTURE.md) : what the executable contains, how it is built, what happens at launch\n- [Building](https://github.com/opensec-git/Pi-Bolt/blob/pi-bolt/docs/BUILDING.md) : building the runtime and Pi from source, training profiles, tests\n- [Benchmarks](https://github.com/opensec-git/Pi-Bolt/blob/pi-bolt/docs/BENCHMARKS.md) : method, results and raw data\n- [Plugins](https://github.com/opensec-git/Pi-Bolt/blob/pi-bolt/docs/PLUGINS.md) : porting Pi extensions and writing them for AOT\n- [Editors](https://github.com/opensec-git/Pi-Bolt/blob/pi-bolt/docs/ACP.md) : Pi-Bolt in Zed, JetBrains IDEs, VS Code and other ACP editors\n- [Other agents](https://github.com/opensec-git/Pi-Bolt/blob/pi-bolt/docs/MCP.md) : Pi-Bolt as a tool of other agents and MCP clients\n- [Troubleshooting](https://github.com/opensec-git/Pi-Bolt/blob/pi-bolt/docs/TROUBLESHOOTING.md) : diagnostics, environment variables, known limitations\n- [Releasing](https://github.com/opensec-git/Pi-Bolt/blob/pi-bolt/docs/RELEASING.md) : CI, releases, signing\n\nBug reports, benchmarks on other hardware and fixes are welcome: see [CONTRIBUTING.md](https://github.com/opensec-git/Pi-Bolt/blob/pi-bolt/CONTRIBUTING.md). Report security\nissues privately, as described in [SECURITY.md](https://github.com/opensec-git/Pi-Bolt/blob/pi-bolt/SECURITY.md).\n\n## **Build from source**\n\n```\ngit clone https://github.com/opensec-git/Pi-Bolt.git && cd Pi-Bolt\nscripts/fetch-runtime.sh            # the released Pi-Bolt runtime (or build it: docs/BUILDING.md)\nscripts/prepare-pi.sh               # builds the Pi in this repository\nscripts/build-pi.sh                 # out/pi-bolt/pi\ntests/aot/run.sh                    # engine tests\n```\n\nMIT. Release executables include Bun (MIT), JavaScriptCore (LGPL-2.0 and BSD), ICU (Unicode License) and Pi (MIT); see\n[THIRD_PARTY_NOTICES.md](https://github.com/opensec-git/Pi-Bolt/blob/pi-bolt/THIRD_PARTY_NOTICES.md).\n\nNote\n\nPi-Bolt is an independent fork of [Pi](https://github.com/earendil-works/pi), not affiliated with Pi's authors or with Oven.\n\n  Built on [Pi](https://github.com/earendil-works/pi) by Mario Zechner and contributors,\n  and [Bun](https://github.com/oven-sh/bun) by Oven.", "url": "https://wpnews.pro/news/pi-the-coding-agent-compiled-ahead-of-time-to-one-native-executable", "canonical_source": "https://github.com/opensec-git/Pi-Bolt", "published_at": "2026-10-24 04:18:29+00:00", "updated_at": "2026-10-24 04:41:09.175379+00:00", "lang": "en", "topics": ["ai-tools", "ai-agents", "developer-tools", "ai-products"], "entities": ["Pi-Bolt", "Pi", "OpenSec", "Node.js", "Bun", "earendil-works", "Termux", "Arch Linux"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/pi-the-coding-agent-compiled-ahead-of-time-to-one-native-executable", "markdown": "https://wpnews.pro/news/pi-the-coding-agent-compiled-ahead-of-time-to-one-native-executable.md", "text": "https://wpnews.pro/news/pi-the-coding-agent-compiled-ahead-of-time-to-one-native-executable.txt", "jsonld": "https://wpnews.pro/news/pi-the-coding-agent-compiled-ahead-of-time-to-one-native-executable.jsonld"}}