Pi-Bolt 0.5.2 is for Pi behind something: tmux, zmx, ssh, a container. It writes a seventh of what it wrote to the terminal, no longer stops when a large file has been written, uses less CPU while a reply streams, and keeps half the memory after long answers. It runs Pi 1.0.0.
Smoother
- Fullscreen mode scrolls instead of drawing every row again. When an answer grew by a line, or the transcript was scrolled, every row of the screen moved and every row was written to the terminal again: 3.5 MB for a 20,000-character answer. Pi-Bolt now moves the rows that only moved by scrolling that part of the screen, and draws what is left: 0.5 MB. In tmux with a client attached, the tmux server used 0.65 s of CPU for that answer and now uses 0.16 s, and sends its client 0.28 MB instead of 1.4 MB, which is what an ssh connection or
docker exechas to carry. What is on the screen is the same: checked row by row, text and colors, in tmux and in zmx, also inside a container.PI_TUI_SCROLL_ROWS=0draws every row as before. - No pause when a large file has been written. A file written through a tool call had every line highlighted as it arrived, and the whole file again when it was complete, though a collapsed call shows ten lines: Pi drew nothing and took no key for 0.8 s after a 200 KB file, 1.3 s after 400 KB. Now the lines that are shown are highlighted, and the rest when the call is expanded: the longest pause is 0.08 s, whatever the size, and writing a 200 KB file takes 3.9 s of CPU in the TUI instead of 6.2 s. A collapsed call shows what it showed, with one exception: a file that ends inside a comment or string that is never closed, followed by empty lines, is counted without those empty lines until the call is expanded.
- Less CPU while a reply streams. A 20,000-character answer takes 1.0 s of CPU instead of 1.3 s, a 60,000-character one 4.0 s instead of 5.0 s. Collections of garbage wake two threads instead of eight, and memory is given back to the system every quarter of a second instead of every tenth: the process has 7 threads instead of 13 and makes half the system calls.
Memory
- A long answer no longer costs megabytes that stay. From 0.5.1, each block of an answer kept in memory a copy of the whole answer as it was when the block arrived: 17 MB for a 60,000-character answer, for each of the last eight answers. After four such answers Pi-Bolt 0.5.1 held 159 MB of its own, 112 MB once idle; 0.5.2 holds 72 MB, and 34 MB once idle (it starts at 33 MB).
In containers
- Checked in a Docker container (Debian 12) under tmux and under zmx, and with limits: Pi-Bolt runs with
--memory=96m --cpus=1, at more CPU than without a limit, because the kernel has to read the executable's code again when the limit pushes it out. 256 MB or more leaves it alone. See Troubleshooting.
Benchmarks, measured again
- The benchmark tools waited for the end of an answer by its last words. In fullscreen mode, a screen drawn again shows the answers before it too, and the tools took one of those for the one they waited for: from the second prompt of a session on, the next prompt was sent while the one before was still being answered, and cut it short. That held for every build, Pi on Bun and on Node too. Answers are now numbered, and every figure in the README and in BENCHMARKS.md was taken again, against Pi 1.0.0 as released on Bun and on Node: ready to type in 74 ms (Bun 125, Node 299), 336 ms of CPU for a session of five prompts (823, 1,205), 140 MB at the end of a long session (226, 529).
- New there: what Pi writes to the terminal in tmux, and the longest pause while a file is written through a tool call (Pi as released stops for 10 s on a 50 KB file and most of a minute on a 200 KB one, in the TUI).
Fixed
- The installer says where a download came from when
PIBOLT_DOWNLOAD_BASEis set.
Tested
Everything 0.5.1 was tested with, on this release's three builds: the load test through all three model APIs (32 processes at once, 600 prompts in one process, tool results and requests identical to stock Bun's), old systems and CPUs, the engine tests, the installer. And:
- 3,600 frames of random changes to a screen (lines added, removed, changed, the mouse wheel, repeated and empty lines), each compared cell by cell with a terminal that draws every row.
- What a collapsed write call shows against what an expanded one shows, at every step of files streamed 1 to 4,096 characters at a time, in six languages.
- The fullscreen screen with and without scrolling after a long answer, paging and a resize: in tmux and zmx, at 120 and 80 columns, on the host and in a container.
- What is drawn in regular mode: the same as Pi 1.0.0 on stock Bun, line for line and color for color.
No real provider is called by the tests.
Install
curl -fsSL https://pi-bolt.opensec.in/install.sh | shor pi-bolt update from 0.5.1, or npm install -g pi-bolt, or bun add -g pi-bolt. The executable now downloads from the npm registry's CDN, and from GitHub if that fails.
| Asset | For |
|---|---|
pi-bolt-linux-x64.tar.xz / .tar.gz
| Recommended. CPUs with AVX2 (Intel Haswell 2013+, AMD Zen+). |
pi-bolt-linux-x64-baseline.tar.xz / .tar.gz
| Any x86-64 CPU with SSE4.2. |
pi-bolt-linux-x64-jit.tar.xz / .tar.gz
| JIT also on, for plugins loaded at run time. |
pi-bolt-runtime-linux-x64.tar.gz
| The Pi-Bolt Bun runtime, for compiling plugins in. |
Linux x86-64 with glibc 2.17 or later.