@tian.zuo/pi-image-cache
Temporary pasted-image cache with compact placeholders for the pi coding agent.
Package details
Install @tian.zuo/pi-image-cache from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@tian.zuo/pi-image-cache- Package
@tian.zuo/pi-image-cache- Version
0.1.2- Published
- Aug 30, 2026
- Downloads
- 471/mo · 15/wk
- Author
- tian.zuo
- License
- MIT
- Types
- extension
- Size
- 50.5 KB
- Dependencies
- 1 dependency · 3 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
@tian.zuo/pi-image-cache
Release notes: changelog · GitHub releases
Temporary pasted-image caching with compact placeholders for the pi coding agent.
pi install npm:@tian.zuo/pi-image-cache
How it works
Caches pasted images so they survive as compact [Image#NNN] placeholders and
are re-attached to the model on send.
On macOS, Ctrl+V pastes the clipboard image directly — both raw image data
(screenshots, "Copy Image") and image files copied in Finder, including
multiple files at once. File references win over pasteboard image data,
because Finder also puts a generic 1024×1024 document icon on the clipboard
next to the file it copied.
The cache lives under ~/.pi/agent/cache/image-cache/ with a 24h TTL,
alongside a small PNG rendition per non-PNG image so inline previews work in
Kitty-protocol terminals (Ghostty, Kitty, WezTerm) and after a session resume.
Commands
Ctrl+V— paste a clipboard image (macOS)./images— list cached images./image-cache-clear— clear the cache.
License
MIT © Tian Zuo