pi-img-visualizer0.1.0
Hover an image path or [Image#N] chip in the pi transcript to see an inline popup preview
Untested on omp
This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.
Reports 0
No reports yet.
Readme
pi-img-visualizer
Hover an image path or an [Image#N] chip in the pi transcript and a popup shows the image, inline, next to the pointer.
- Paths are resolved against the session's working directory (
~,file://,path:lineanda//b/diff prefixes are understood). Only existingpng,jpg,jpeg,gifandwebpfiles up to 8 MB are previewed. - The hovered path or chip is underlined; the popup follows the pointer, flips near screen edges, and closes on click, scroll, key press or when the pointer leaves.
[Image#N]chips (pasted images) are rebuilt from the session itself, so they also work in resumed chats.

Install
pi install npm:pi-img-visualizer
Try it for one run without installing: pi -e npm:pi-img-visualizer.
Requirements
- Fullscreen TUI mode (
"tuiMode": "fullscreen"in pi settings): pi only reports pointer motion there. - A terminal with an inline image protocol (kitty or iTerm2 compatible). Elsewhere the popup shows pi's text fallback.
Usage
Just hover. /image-preview toggles the feature on and off for the current run.
Pasted images ([Image#N])
Chips resolve from images stored in the session. If you run Gentle Shell, the extension also reads its opt-in disk cache (GENTLE_PI_IMAGES_DISK_CACHE=session). ![An [Image#N] chip underlined on hover](https://raw.githubusercontent.com/Manuhhhh/pi-img-visualizer/HEAD/docs/chip.png)
Images rebuilt from the session are written to $XDG_CACHE_HOME/pi-img-visualizer/restored/<session> (default ~/.cache) with private permissions and removed on shutdown.
Development
npm install
npm test # node:test, Node >= 22.18
npm run typecheck
pi -e ./extensions/index.ts
License
MIT