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-smart-paste

v1.0.2

Published

Smart clipboard paste for pi on Windows — copy files and paste their paths; falls back to images.

Downloads

532

Readme

pi-smart-paste

Smart clipboard paste for pi on Windows: copy a file → paste its path. Falls back to images.

中文 · English


中文

复制文件后,在 pi 输入框直接按 Ctrl+V,粘贴出来的是文件路径,而不是什么都没有。

为什么需要它

pi 内置的粘贴只处理图片。当你在资源管理器里复制一个文件,剪贴板里装的是「文件拖放列表」(既不是纯文本也不是图片),所以按 Ctrl+V 没反应——别的能粘文件的 harness 都是自己主动去读这个列表。

本扩展让粘贴变成内容感知的:

| 剪贴板内容 | 粘贴结果 | |---|---| | 复制的文件 | 文件绝对路径(多个每行一个) | | 图片(截图 / 复制图片) | 保存为临时 png 并粘贴路径 | | 都没有 | 提示用户 |

效果

粘贴文件 → 直接得到文件路径(核心卖点):

粘贴文件

粘贴图片 → 得到临时图片路径:

粘贴图片

安装

# 从 GitHub
pi install git:github.com/ccch1mneyyy/pi-smart-paste
# 或从 npm
pi install npm:pi-smart-paste

配置(让 Ctrl+V / Alt+V 生效)

编辑 ~/.pi/agent/keybindings.json,解绑内置的「只粘图片」动作,把这俩键交给本扩展:

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

然后在 pi 里执行 /reload

用法

| 触发方式 | 行为 | |---|---| | Ctrl+V / Ctrl+Shift+V / Alt+V | 智能粘贴(文件优先 → 图片) | | Ctrl+Shift+I | 仅图片 | | /paste | 智能粘贴(命令版) | | /paste-file | 仅文件路径 | | /paste-image | 仅图片 |

工作原理

用 STA 模式的 PowerShell 一次探测剪贴板:先 Clipboard.GetFileDropList()(文件),再 Clipboard.GetImage()(图片)。输出强制 UTF-8,中文路径不乱码

平台

Windows(依赖 PowerShell + System.Windows.Forms)。

许可证

MIT © chimney


English

Copy a file in Explorer, hit Ctrl+V in pi, and you get the file path instead of nothing.

Why

pi's built-in paste only handles images. A copied file sits on the clipboard as a file-drop list (not text, not an image), so Ctrl+V is a no-op. This extension makes paste content-aware: files → paths, else image, else notify.

| Clipboard | Pasted | |---|---| | Copied file(s) | Absolute file path(s), one per line | | Image (screenshot / copy) | Saved to temp png, path pasted | | Neither | User is notified |

Screenshots

Paste a file → get its path (the headline feature):

paste file

Paste an image → get the temp image path:

paste image

Install

pi install git:github.com/ccch1mneyyy/pi-smart-paste
pi install npm:pi-smart-paste

Setup

Clear the built-in image-only paste in ~/.pi/agent/keybindings.json so Ctrl+V / Alt+V reach this extension:

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

Then run /reload in pi.

Usage

| Trigger | Behavior | |---|---| | Ctrl+V / Ctrl+Shift+V / Alt+V | Smart paste (files first → image) | | Ctrl+Shift+I | Image only | | /paste | Smart paste (command) | | /paste-file | Files only | | /paste-image | Image only |

How it works

A single STA-mode PowerShell probe reads Clipboard.GetFileDropList() (files) then Clipboard.GetImage() (image), with UTF-8 output so non-ASCII paths survive.

Platform

Windows only (PowerShell + System.Windows.Forms).

License

MIT © chimney