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

dev_clipboard

v0.1.0-alpha.0

Published

Local developer text tools for JSON, JWT, timestamps, URLs, Base64, UUID, curl and SQL

Downloads

199

Readme

dclip CLI

本地开发者文本工具,支持 JSON、JWT、Timestamp、URL、Base64、UUID、curl 和 SQL。读取 UTF-8 stdin 或指定文件,向 stdout 输出显式请求的结果。运行时不访问系统剪贴板,不执行生成的 HTTP 请求,也不写内容日志或历史。

包名为 dev_clipboard,采用 MIT 许可证,版权署名为 404_cat。

安装和运行

需要 Node.js ≥ 24.21.0;最低版本测试使用 24.21.0。alpha 是试用版本,完整产品验收尚未完成。

npm install -g dev_clipboard@alpha
dclip --version
dclip --help

npx --yes --package dev_clipboard@alpha dclip --help

安装通过 npm 获取包;之后转换在本地运行。包内包含编译后的 CLI、独立 Worker 和打包依赖,不要求安装 pnpm、Rust、桌面程序或构建工具。

POSIX shell 示例:

printf '%s' '{"n":9007199254740993123,"n":2}' | dclip run json.minify
printf '%s' '1717583927' | dclip run timestamp.iso --unit seconds
printf '%s' 'https://example.com/?x=1&x=2' | dclip run url.query
printf '%s' 'select * from sample_table' | dclip run sql.format --dialect postgresql

PowerShell 示例:

'{"name":"猫","n":9007199254740993123}' | dclip run json.format
dclip run jwt.payload --file synthetic-token.txt
dclip detect --file synthetic-input.txt

stdin 与 --file 二选一;不接受原文位置参数,以免原文进入命令历史和进程参数。敏感输入应通过文件或 stdin 提供,并自行管理终端记录、文件与输出重定向。stdout 是完整结果,可能含敏感值。

命令与动作

dclip detect [--file path]
dclip run <type.action> [--file path]
  [--unit seconds|milliseconds]
  [--dialect postgresql|mysql]
  [--mode standard|url-safe]
dclip --help
dclip --version

| 类型 | actionId | 支持边界 | | --------- | ---------------------------------------------------- | -------------------------------------------------------------------------------- | | JSON | json.format、json.minify、json.escape、json.unescape | 严格 JSON;保留大整数数字词法与重复键;unescape 只解一层 JSON 字符串 | | JWT | jwt.decode、jwt.payload | 三段 JWS,只解码;始终提示未验证签名,不解密 JWE | | Timestamp | timestamp.local、timestamp.utc、timestamp.iso | 单位可显式选择;自动候选只是启发式,local 使用当前系统时区 | | URL | url.parse、url.query、url.decode | HTTP/HTTPS;查询保留顺序与重复键;query 中 + 表示空格,component decode 中保持 + | | Base64 | base64.encode、base64.decode | standard/url-safe;UTF-8 解码,二进制只输出有界 hex 预览 | | UUID | uuid.validate、uuid.normalize、uuid.generate | 规范化、格式/版本检查及加密随机 v4 生成 | | curl | curl.fetch、curl.axios、curl.python | 有限 POSIX curl 子集,仅生成代码,不执行请求 | | SQL | sql.format | 必须选择 postgresql/mysql;仅格式化,不保证完整语法正确,不连接数据库 |

curl 支持单个 HTTP URL,-X/--request、多个不同名 -H/--header、单个 -d/--data/--data-raw;方法限定 GET、POST、PUT、PATCH、DELETE、HEAD。拒绝 @file、管道、重定向、多命令、未知选项、重复同名 header、多个 URL、命令替换和 Windows cmd/PowerShell curl 语法。HEAD body 拒绝,fetch 的 GET body 拒绝。生成代码应另行审查后再使用。

输出和限制

  • 成功结果写 stdout;警告与受约束的错误写 stderr。不要把两个流合并后当作转换结果。
  • 退出码:0 成功;2 输入、动作或参数错误;3 文件/流、Worker、平台或超时错误。
  • 输入上限 1 MiB UTF-8 字节,输出上限 2 MiB;非法 UTF-8 拒绝。识别硬预算 300 ms,动作 1,000 ms;超时终止 Worker。
  • detect 输出候选元数据,不回显原文;强/弱匹配不代表经过独立人工准确率验收。
  • 没有公开可导入的 core API;此包的入口是 dclip 命令。
  • alpha 验证中曾出现一次未定位的退出码 3,后续测试未复现;macOS 和远端 CI 尚未验证。

开发验证

仓库根运行 pnpm build 后运行 pnpm verify:cli-package。脚本创建实际 tarball,在隔离目录离线测试本地安装、独立全局前缀、npm exec,以及 Worker 转换和输入错误路径,不修改用户全局安装。

项目采用 MIT 许可证,见 LICENSE。打包第三方库的原始许可文本与署名见 THIRD_PARTY_NOTICES.md。