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

dsh-clipboard

v0.1.0

Published

DSH plugin: write text to the system clipboard (pbcopy / clip / xclip / xsel).

Readme

dsh-clipboard

把文本写入系统剪贴板的 DSH 插件。零依赖、纯 ESM JavaScript、无需构建。

简介

注册一个工具 clipboard_write,接收任意文本并写入系统剪贴板,方便 agent 把生成的结果直接交给用户粘贴使用(例如复制命令、代码片段、URL、密钥等)。

执行结果始终返回规范 JSON 值,任何失败都不抛异常

{ "ok": true,  "bytes": 42, "tool": "pbcopy" }
{ "ok": false, "bytes": 42, "tool": null, "error": "no clipboard tool available (install xclip or xsel): ..." }

安装

dsh plugin --profile <profile-name> add dsh-clipboard
# 本地开发:
dsh plugin --profile <profile-name> add file:./plugins/dsh-clipboard

平台依赖

| 平台 | 实现 | 是否需要安装 | |---|---|---| | macOS | pbcopy/usr/bin/pbcopy) | 免装,系统自带 | | Windows | clip | 免装,系统自带 | | Linux | xclip(优先)或 xsel | 需要安装其一:sudo apt install xclipsudo apt install xsel;两者都没装时工具返回 ok: false 并提示安装 |

注意:Linux 下需要可用的 X11/Wayland 会话(DISPLAY/WAYLAND_DISPLAY)。无图形会话(如纯 SSH、CI 容器)会写入失败。

使用场景

  • 让 agent 把生成的一行命令、SQL、JSON、代码片段直接放进剪贴板,用户粘贴即用。
  • 复制临时 token / URL / 文件路径,省去手动选中。
  • 作为多步工作流里的“交接输出”步骤。

自检

插件挂载时自动写入一次 clipboard-probe-<时间戳>;macOS 上会用 pbpaste 读回比对,Linux/Windows 只报告写入结果。日志前缀 [dsh-clipboard]

License

MIT