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

knotlink-cli

v0.1.0

Published

KnotLink 节点开发命令行工具 — 校验清单、脚手架、打包一条龙

Readme

knotlink-cli

KnotLink 节点开发命令行工具 — 初始化、校验、打包、提 PR 一条龙。

安装

npm(推荐)

cd knotlink-cli
npm install
npm link

装完 knotlink 全局可用。

独立 exe

无需 Node.js,下载即用:

npm run build       # 输出 dist/knotlink.exe(需 bun)

或从 GitHub Release 下载预编译的 knotlink.exe

命令

knotlink init

交互式创建新节点,在当前目录生成 KnotLink-Output/

KnotLink-Output/
├── pr/<AppID>/            ← 清单 + README + logo(主源,手动编辑)
├── release/<AppID>/       ← 分发目录(放二进制产物)
├── .gitignore             ← 忽略 release 下的二进制
├── sync-to-release.sh     ← PR → release 同步脚本
├── version.sh             ← 版本号管理(patch / minor / major / set)
├── reg-dev.sh             ← 开发调试:注册 PR 路径到系统注册表
└── pack.sh                ← 插入式节点 zip 打包(独立式无)

knotlink reg <action> [appId]

开发调试时,将 PR 目录路径写入注册表,KnotHub 无需打包即可发现节点。

knotlink reg C              # 注册 PR 目录(自动检测 AppID)
knotlink reg D              # 删除注册(同上)
knotlink reg C 0x00000014   # 手动指定 AppID
knotlink reg list           # 查看所有已注册节点
knotlink reg scripts        # 重新生成所有 .sh 脚本(已有项目补全用)

knotlink validate <path> [options]

校验三清单:

knotlink validate ./MyNode             # 自动检测类型
knotlink validate ./MyNode --pr        # 同时检查 PR 文件组(README + logo)

knotlink pr [path]

一键提 PR。路径可选,自动检测优先级:指定路径 > 当前目录 > 向上查找 KnotLink-Output/pr/ > 手动输入。

knotlink pr                             # 自动检测
knotlink pr KnotLink-Output/pr/xxx      # 指定路径

流程:

信息卡片确认 → 文件完整性检查(缺 logo 可即时生成)
→ 获取 KNodeIndex 仓库(gh 自动 / 手动路径)
→ 判断 add / update → 二次确认 → 拷贝文件 → Commit & Push
→ 输出 PR 链接 + 标题 + 内容(复制粘贴即可)

前置条件:有 gh CLIgh auth login)全自动 fork + push;没 gh 请提前 fork 并 clone KNodeIndex 到本地。

knotlink logo <name> [options]

生成 128×128 节点 logo。

knotlink logo "消息提醒"                          # 默认:圆角、自动取色、SVG
knotlink logo "KnotLink" -c 蓝 -s rounded        # 预设色 + 圆角
knotlink logo "助手" -c "#EA4335" -s square       # 自定义色 + 方形
knotlink logo "节点" -s circle -o ./logo.svg      # 圆形 + 指定路径
knotlink logo "节点" -o logo.png                  # 根据扩展名自动转 PNG

| 选项 | 说明 | 可选值 | |------|------|--------| | -c, --color | 颜色 | 蓝/绿/红/黄/紫/青/橙/深灰 或 #hex | | -s, --style | 风格 | rounded(默认)/ square / circle | | -f, --format | 格式 | svg / png(默认根据扩展名) | | -o, --output | 输出路径 | 默认 logo.svg |

knotlink version

显示版本和环境信息。

典型工作流

knotlink init                          # 1. 创建项目骨架
# 编辑 pr/<AppID>/FuncList.json        # 2. 定义接口和信号
knotlink reg C                         # 3. 注册到 KnotLink(KnotHub 可发现)
knotlink logo "我的节点" -o pr/<AppID>/logo.png  # 4. 生成 logo
# 放入二进制产物到 release/<AppID>/     # 5. 打包产物
./sync-to-release.sh                   # 6. 同步 PR → release
./version.sh patch <AppID>             # 7. 升版本号
./pack.sh <AppID>                      # 8. 插入式:打成 zip(拖入 KnotHub 安装)
knotlink pr                            # 9. 提 PR

独立式节点 — 注册表处理

独立式节点需处理注册表以便 KnotLink 发现。开发调试时用 knotlink reg C./reg-dev.sh C <AppID>。发布时的几种方式:

| 方式 | 适用场景 | |------|---------| | NSIS 安装包 | 项目有 .nsi,安装/卸载自动处理 | | 运行时自注册 + 清单同目录 | 能改入口代码,清单放 exe 旁边 | | 运行时自注册 + 动态释放 | 单文件洁癖,启动释放 + 退出清理 | | .reg / .bat 文件 | 便携/绿色软件,双击注册 | | 不做处理 | 只放两个清单,不写注册表 |

详见 KnotLink 接入指南

开发

npm start              # node bin/knotlink.js
npm run build          # bun build → dist/knotlink.exe

许可

MIT