pi-claude-style-tools
Claude Code-style tool rows for pi with Ctrl+O image previews and consistent built-in, MCP, and custom tool rendering
Package details
Install pi-claude-style-tools from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-claude-style-tools- Package
pi-claude-style-tools- Version
1.0.15- Published
- May 5, 2026
- Downloads
- 1,791/mo · 121/wk
- Author
- leftwinglautus
- License
- MIT
- Types
- extension
- Size
- 153.9 KB
- Dependencies
- 2 dependencies · 3 peers
Pi manifest JSON
{
"extensions": [
"./extensions/index.ts",
"./extensions/spinner.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-claude-style-tools
Claude Code inspired tool rendering for Pi — Shiki-powered diffs, status dots, branch connectors, file icons, and configurable output modes.
Features
- Compact built-in tool rendering for
read,bash,grep,find,ls,edit, andwrite - Claude-style OpenAI tool rendering for
apply_patchplus common Pi/OpenAI-style tools likewebfetch,web_search,fetch_content, task tools, and context tools apply_patchdiff previews that render parsed file patches in the call phase, similar toedit/write- Adaptive edit/write diffs with split or unified layouts, syntax highlighting, and inline word-level emphasis
- Diff stat bar with colored add/remove summary and hunk metadata
- Progressive collapsed diff hints that shorten on narrow terminals
- Thinking labels during streaming and final messages, with context sanitization
- MCP-aware rendering with hidden, summary, and preview modes
- Configurable output modes for read, search, bash, and MCP results
- Transparent tool backgrounds in
transparentorbordermode - Transparent edit/write diffs with universal red/green diff colors
- Global border patch for all tool rows, including unknown/custom tools
Configuration
Set in .pi/settings.json or ~/.pi/settings.json:
{
"toolBackground": "border",
"readOutputMode": "preview",
"searchOutputMode": "preview",
"mcpOutputMode": "preview",
"previewLines": 8,
"bashOutputMode": "opencode",
"bashCollapsedLines": 10,
"diffCollapsedLines": 24,
"diffTheme": "github-dark"
}
Tool background modes
| Value | Behavior |
|---|---|
default |
Standard Pi tool backgrounds |
transparent |
Transparent tool backgrounds |
border |
Transparent backgrounds with top/bottom border lines |
Output modes
| Setting | Values | Default |
|---|---|---|
readOutputMode |
hidden, summary, preview |
preview |
searchOutputMode |
hidden, count, preview |
preview |
mcpOutputMode |
hidden, summary, preview |
preview |
bashOutputMode |
opencode, summary, preview |
opencode |
Numeric settings
| Setting | Default | Description |
|---|---|---|
previewLines |
8 |
Lines shown in collapsed preview mode |
expandedPreviewMaxLines |
4000 |
Max lines when fully expanded |
bashCollapsedLines |
10 |
Lines for collapsed bash output |
diffCollapsedLines |
24 |
Diff lines before collapsing |
Notes
This package targets recent Pi versions where tool renderers use:
renderCall(args, theme, context)renderResult(result, { expanded, isPartial }, theme, context)
Unknown/custom tools do not have a public global renderer hook in Pi, so this package patches container rendering to add top/bottom borders for all tool executions in border mode.
Credits
This project builds upon and was inspired by the excellent work of:
- @heyhuynhgiabuu/pi-pretty by huynhgiabuu — Pretty terminal output with syntax-highlighted file reads, colored bash output, and tree-view directory listings
- @heyhuynhgiabuu/pi-diff by huynhgiabuu — Shiki-powered terminal diff renderer with word-level diffs in split and unified views
- pi-tool-display by MasuRii — Compact tool call rendering, diff visualization, and output truncation