npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@vanillagreen/pi-tool-renderer

v1.6.1

Published

Compact Claude/opencode-style renderers for Pi tools with rich diffs, apply_patch, generic/MCP rendering, and optional global chrome.

Readme

pi-tool-renderer

tool_batch composite result with Read/grep/Bash rows Edit tool with side-by-side diff renderer

Compact renderers for Pi tools. Optional tool_batch composite tool. Optional rich diff UI for edits, writes, and bash patches.

Highlights

  • Compact one-line tool rows for read, bash, grep, find, ls; file paths in compact rows use OSC 8 file:// hyperlinks when the terminal supports them.
  • Delayed live bash tails avoid fast-command output flashes; long-running commands show/preserve the last few lines flush-left so copied output has no gutter characters.
  • tool_batch runs multiple independent read/search/list/diagnostic bash calls and renders one combined result.
  • Optional rich Shiki diffs for edit/write with side-by-side previews, hunk counts, and inline word highlights.
  • Compact user-message cards with a green border and red π marker.
  • Compaction summaries and skill invocations render with the same compact chrome.
  • Generic renderers for OpenAI-style tools (web_search, webfetch, Agent, Task*) and MCP tools.
  • apply_patch call/result preview when the tool is present.

Defaults leave edit/write on Pi's built-in renderers. Enable Render edits/writes compactly to opt in.

Install

Via npm:

pi install npm:@vanillagreen/pi-tool-renderer

Via vstack:

cargo install --git https://github.com/vanillagreencom/vstack.git vstack
vstack add vanillagreencom/vstack --pi-extension pi-tool-renderer --harness pi -y

Restart Pi after installation.

tool_batch

{
  "calls": [
    { "tool": "read", "path": "README.md" },
    { "tool": "grep", "pattern": "registerCommand", "path": "pi-extensions" }
  ]
}

Accepts read, grep, find, ls, and diagnostic bash. Per-call arguments can be flat or wrapped in args.

Prefer it for independent inspection calls. Don't use it for mutating commands, order-dependent commands, streaming output, or anything you want to inspect separately.

If the combined output would exceed Pi's normal tool-result budget, child outputs are capped to fit (head + tail preserved). Use separate calls or read offset/limit for the full budget per call.

Settings

Open /extensions:settings; settings appear under the Tool Renderer tab.

Project settings in .pi/settings.json apply only after Pi marks the workspace trusted; before trust, vstack Pi extensions read user/global settings only.

Glyph style: each package exposes glyphStyle (unicode default, ascii for terminal-safe chrome). @vanillagreen/pi-tool-renderer.globalGlyphStyleOverride=ascii forces ASCII chrome across vstack Pi extensions while leaving tool/model/user content unchanged.

General

| Setting | What it does | | --- | --- | | Enable compact renderers | Override built-in read/bash/search renderers. | | Tree connector style | unicode or ascii. | | Stack separate native tool calls | Legacy renderer for consecutive native tool calls. Prefer tool_batch. | | Stack child display | rows, headline, or anchor-list when stacking is on. |

Batch tool

| Setting | What it does | | --- | --- | | Register tool_batch | Add the composite tool. | | Batch max calls | Max calls per tool_batch invocation. | | Batch per-call timeout (ms) | Max time any one child call may run before tool_batch reports that child as timed out. |

Messages

| Setting | What it does | | --- | --- | | Compact user messages | Green border + red π marker instead of filled background; preserves Pi's prompt-zone markers around the full framed card. | | User message trailing blank line | Extra blank line after user messages. | | Compact compaction summaries | Compact bullet style instead of Pi's padded box. | | Compact skill invocation messages | Compact /skill:name rows. | | Align assistant messages | Remove Pi's one-column left padding from assistant text. | | Styled markdown code blocks | Render fenced code blocks with syntax highlighting and background, flush-left with no copy gutter/prefix. |

Read / Search / Bash output

| Setting | What it does | | --- | --- | | Read output mode | preview, summary, or hidden. | | Search output mode | preview, count, or hidden. | | Bash output mode | opencode, preview, summary, or hidden. | | Live bash output delay (ms) | Wait this long before showing a running bash output tail. | | Live bash tail lines | Tail lines shown for long-running bash output and kept after completion. | | Expanded read/search/bash preview lines | Per-tool expand-time line caps. | | Command preview characters | Max command chars in collapsed bash rows. | | Collapsed bash preview lines | Tail lines shown when bashOutputMode=preview. |

Bash diffs

| Setting | What it does | | --- | --- | | Render bash diffs | Detect diff output from read-only bash and render rich diff UI. Off by default. | | Render git diff command diffs | Show rich diff UI for explicit git diff commands. Off by default. |

Mutation (edit/write)

| Setting | What it does | | --- | --- | | Render edits/writes compactly | Override Pi's built-in edit/write renderers. Off by default. | | Split diff view | Side-by-side rich diffs on wide terminals. | | Collapsed / expanded diff preview lines | Line budgets for collapsed and expanded rows. | | Edit/write call preview | Show safe call-phase diff previews before execution completes. | | Edit/write call preview lines | Line budget for call-phase previews. | | Syntax-highlight diffs | Use Shiki when a language can be detected. | | Inline word diff highlights | Highlight changed words in paired removed/added lines. | | Diff line backgrounds | Fill added/removed lines with success/error backgrounds. | | Show diff hunk metadata | Include hunk counts and truncation hints. |

Generic tools

| Setting | What it does | | --- | --- | | Generic external tool renderers | Render web_search, webfetch, Agent, Task* and similar. | | Render apply_patch | Install apply_patch call/result renderers without changing execution. | | apply_patch call preview | Parse arguments and render diff previews during the call phase. | | apply_patch preview lines | Line budget for collapsed apply_patch diffs. | | MCP output mode | preview, summary, or hidden. | | MCP preview lines | Line budget for MCP/generic tool previews. |

Chrome

| Setting | What it does | | --- | --- | | Global tool chrome | off, transparent, or outlines (muted horizontal rules above/below), including tools that render their own shell. | | Guard terminal right margin | Render one column short to avoid auto-wrap flashes in tmux. | | Animate pending tool status | Blink pending bullets. Off for stable streaming. | | Working indicator | default, pulse, or hidden. |

Safety

| Setting | What it does | | --- | --- | | Max renderer line width | Hard cap for single rendered lines. |

Notes

This package mostly changes rendering, not tool execution. tool_batch is one tool result, so it caps combined child output if needed; individual built-in tools still apply their own truncation first.