Skip to content

Show Image

The show-image extension registers a show_image tool that renders a local image file directly in the terminal. The agent generates a chart, plot, or screenshot — then shows it to you inline instead of describing it or making you open a file manager.

show_image(path: "reports/trend.png", maxWidthCells: 100)
  • Accepts PNG, JPG, GIF, WebP, and BMP files (local paths only — no network fetches).
  • Renders inline on terminals that speak a graphics protocol: kitty, iTerm2, Ghostty, WezTerm, Warp.
  • Prints a placeholder line on terminals without graphics support, so the tool never fails — the path is still visible for manual viewing.
  • Optional maxWidthCells / maxHeightCells arguments cap the rendered size so a 4K screenshot doesn’t eat the whole pane.

The typical workflow: the agent writes a matplotlib/gnuplot chart during a data task and calls show_image right after — you review the figure without context switching. It pairs naturally with analysis, QA screenshot comparison, and visual-regression work.

2026-09-18 — consolidated. This extension lived untracked in ~/.pi/agent/extensions/ for weeks before it got a repository. It is now part of the private jreb-agents monorepo and is deployed by its scripts/install.sh alongside the other extensions.

Pi auto-discovers extensions in ~/.pi/agent/extensions/ — copy or symlink the single file there:

Terminal window
mkdir -p ~/.pi/agent/extensions
ln -sf ~/projects/jreb-agents/extensions/show-image.ts ~/.pi/agent/extensions/

No toggle — the tool is available from the next session start or /reload. Ask the agent to render any image and it appears (or a placeholder, on terminals without graphics support).