pi-codex-style-tools
Codex-style inline rendering for Pi's built-in tools
Package details
Install pi-codex-style-tools from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-codex-style-tools- Package
pi-codex-style-tools- Version
0.1.0- Published
- Aug 19, 2026
- Downloads
- 190/mo · 22/wk
- Author
- danielsuhett
- License
- MIT
- Types
- extension
- Size
- 38 KB
- Dependencies
- 0 dependencies · 2 peers
Pi manifest JSON
{
"extensions": [
"./index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-codex-style-tools
Codex-like inline rendering for Pi's built-in tools.
pi-codex-style-tools is a Pi package that keeps tool execution unchanged
while rendering it with a Codex-like presentation: inline bullets, Running/Ran
labels, shell highlighting, │ and └ gutters, compact output previews, and
expandable details. Search results from extensions are normalized to source URLs.
Installation
After the package is published to npm:
pi install npm:pi-codex-style-tools
Or install it directly from the public repository:
pi install git:github.com/DanielSuhett/pi-codex-style
For local development:
pi -e ./index.ts
Restart Pi or run /reload after installing the package.
What it changes
The extension overrides only the visual renderer for bash, read, grep,
find, ls, edit, and write. Tool execution remains delegated to Pi's
original built-in implementations. Search-like tool results from extensions are
compactly rewritten to source links while preserving their details.
- Consecutive file operations are grouped into one row.
- Read and grep previews stay inline.
- Read content gets a bordered, path-aware syntax highlight with a 10-line preview.
- Short diffs up to 20 lines are shown inline; longer diffs remain expandable.
- Bash output follows the tail, up to 10 lines, and highlights Git statistics.
- Empty successful output stays hidden to keep the transcript compact.
- Search results from Firecrawl, Tavily, Brave, SerpAPI, and similar tools show only source URLs.
Performance
Renderer output is cached by tool result and theme. Syntax highlighting is limited to the visible read preview, and expanded output is capped at 200 lines with an expansion hint. This keeps repeated TUI redraws cheap and avoids large tool results blocking Pi's event loop.
Development
Requirements: Node.js >=22.6.0, npm, and a compatible Pi installation.
npm ci
npm run verify
Run the Pi-hosted renderer benchmark separately:
npm run bench
The benchmark reports cold and steady render times for the overridden tools and event-loop lag.
Package structure
index.ts Pi extension entry point
bench/renderer-bench.ts renderer benchmark
.github/workflows/ci.yml tests, types, packaging, and Pi installation smoke test
The package manifest declares index.ts under pi.extensions, includes the
pi-package keyword for package discovery, and keeps Pi core packages as peer
dependencies as required by the Pi package documentation.
Contributing
See CONTRIBUTING.md for the development workflow and
standards. The project also includes a code of conduct and issue templates.
Security
See SECURITY.md for private vulnerability reporting.
License
MIT © 2026 Suhett.