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

@itc-steve/pi-wl-images

v1.0.1

Published

Flicker-free inline images for Pi on Wayland + Ghostty, using Kitty Unicode placeholders.

Downloads

300

Readme


Why this exists

Pi's built-in image paste reserves rows and forces a full redraw. That is the flicker.

This package puts images on the ordinary differential-redraw path with Kitty Unicode placeholders, so the image stays put while the rest of the TUI updates.

No X11 fallback. No WSL/PowerShell path. No macOS pngpaste. No Sixel converter. No native clipboard addon.

Install

pi install npm:@itc-steve/pi-wl-images

Local checkout:

pi install /path/to/pi-wl-images

Required: free up ctrl+v

Pi binds ctrl+v to built-in app.clipboard.pasteImage. Leave it bound and both handlers fire — clean render and the full-screen redraw. Looks like the bug never got fixed.

Unbind it in ~/.pi/agent/keybindings.json:

{
  "app.clipboard.pasteImage": []
}

Empty array = no keys. Create the file if missing.

Prefer keeping pi's paste on ctrl+v? Skip the unbind and use /paste only. Do not run both on the same key.

First use

| Action | Result | |---|---| | ctrl+v | attach Wayland clipboard image (after unbind above) | | /paste | same, explicit — works with or without unbind | | /image <path> | attach image file |

Attaching inserts a [wl-image] marker in the draft. Send the message → marker becomes a real image for the model, plus an inline transcript render.

Delete the marker to cancel. Markers are counted, not just stripped — remove one and that image is dropped, not silently sent.

Requirements

  • Wayland session
  • wl-clipboard (wl-paste)
  • Kitty-graphics terminal with Unicode placeholder support (Ghostty qualifies)

Verify the terminal:

python3 -c '
import os,termios,tty,select
fd=os.open("/dev/tty",os.O_RDWR); old=termios.tcgetattr(fd); tty.setraw(fd)
os.write(fd,b"\x1b_Gi=99,s=1,v=1,a=q,t=d,f=24;AAAA\x1b\\\\")
print(os.read(fd,64) if select.select([fd],[],[],1)[0] else b"no reply")
termios.tcsetattr(fd,termios.TCSADRAIN,old)'

\x1b_Gi=99;OK\x1b\\ means good.

How it works

  1. Pastewl-paste only; bytes + dimensions stashed.
  2. Marker[wl-image] lands in the editor draft.
  3. Submit — marker swapped for a real image content block for the model.
  4. Render — Kitty virtual placement + Unicode placeholder cells via pi-tui Component.render(), not reserved rows.

Herdr is optional. Outside a Herdr pane the extension uses the terminal cell-size report and never touches the socket.

src/
  diacritics.ts       Unicode 6.0.0 row/column table (297 entries)
  placeholder.ts      virtual placement + placeholder cell rows
  image-component.ts  transmit out-of-band; cells via render()
  cell-size.ts        Herdr-aware cell geometry
  herdr-socket.ts     minimal herdr socket client
  clipboard.ts        wl-paste only
  dimensions.ts       PNG/JPEG/GIF/WebP header parsing
  index.ts            commands, shortcut, transform, entry renderer

Limits

| Limit | Value | |---|---| | Max image grid | 297×297 cells (diacritic table size) | | Payload cap | 10MB | | Animated GIFs | first frame only | | Terminal resize | retransmits (c/r fixed at transmit time) |

Test

npm test        # 25 tests, no framework
npm run typecheck

Live flicker check:

node --experimental-strip-types test/render-demo.ts

Draws a red block, redraws the line beneath it 20 times. Block must not blink.

License

MIT © itc-steve