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

pi-power-paste

v0.1.0

Published

OpenCode-grade clipboard paste for pi on Windows: instant Ctrl+V image attachments, Explorer file drops as collapsible blocks, large-text collapsing, persistent clipboard helper

Readme

pi-power-paste

English | 中文

OpenCode-grade clipboard paste for pi on Windows.

| Clipboard content | What you get | |---|---| | Image (screenshot, copied image) | [#image 1] placeholder + real image attachment sent to the model | | Files copied in Explorer (Ctrl+C) | Image files → [#image N] attachments; text files → collapsed [paste #N +X lines] blocks (full content sent at submit); binaries/folders → plain path | | Large text (>3 lines or >1000 chars) | Collapsed [paste #N +X lines] marker, expanded at submit | | Small text | Inserted as-is |

Two extras that make it feel native:

  • Persistent PowerShell clipboard helper — pi core spawns a cold PowerShell (~500ms) for every clipboard image read; power-paste keeps one alive and answers in ~5-10ms.
  • Ctrl+V that actually works — registered through pi's Kitty-protocol-aware shortcut layer (see Windows Terminal setup below). Alt+V (pi's default image-paste binding) also works out of the box.

Built on top of pi-paster (MIT) — it is bundled as a library (placeholder store, editor, image optimizer, preview widgets); its own extension is not loaded.

Installation

pi install npm:pi-power-paste

Or try it without installing:

pi -e npm:pi-power-paste

Windows Terminal Ctrl+V setup

Windows Terminal binds Ctrl+V to its own "paste text" action, so the key never reaches pi (or any other TUI app). Symptoms: Ctrl+V does nothing for images; Win+V → Enter doesn't work either. Fix — unbind it in WT's settings.json:

"actions": [
    { "command": "unbound", "keys": "ctrl+v" }
]

WT hot-reloads the file, no restart needed. PowerShell's own PSReadLine still pastes with Ctrl+V, and right-click paste keeps working, so the trade-off is minimal.

Notes:

  • Both stable and Preview WT have separate settings files — edit the one you actually run (%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal[Preview]_8wekyb3d8bbwe\LocalState\settings.json).
  • VS Code integrated terminal intercepts Ctrl+V too; unbind workbench.action.terminal.paste for terminalFocus if you want it there.
  • Without any of this, Alt+V still gives you the full power-paste flow.

Commands

  • /power-paste — live self-test: probes the clipboard and reports helper mode (persistent helper vs one-shot fallback), latency, clipboard content kind, and pending attachment count.

How it works

  • One PowerShell process (-STA -NoExit) is spawned lazily on first paste; each probe is a single-line script over stdin with a sentinel-delimited reply (WinForms clipboard API: GetFileDropList → files, GetImage → PNG bytes, GetText → text). If it dies or times out, a one-shot spawnSync probe takes over — paste never breaks.
  • Images become [#image N] placeholders with real attachments (optimized before send), text/file content uses pi's native [paste #N] collapsing so blocks are atomic-deletable and expanded at submit.
  • Ctrl+V matching goes through pi.registerShortcut — with the Kitty keyboard protocol active (Windows Terminal 1.22+), Ctrl+V arrives as a CSI-u sequence, not \x16. Matching raw bytes is a trap.

Requirements

  • Windows for the full experience; on macOS/Linux the extension degrades to pi-paster's original clipboard-image behavior.
  • Windows Terminal users: the Ctrl+V unbind above (or just use Alt+V).

Credits

License

MIT