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

@yunzai-ng/cli

v0.4.1

Published

Yunzai NG 命令行:init / start / dev / doctor / plugin

Readme

@yunzai-ng/cli

命令行入口。命令名 yzng

命令

| 命令 | 作用 | |---|---| | yzng start | 启动 | | yzng dev | 启动,缺省日志级别更低 | | yzng init | 只生成主目录与默认配置,不启动 | | yzng doctor | 体检:Node 版本、目录权限、可选原生模块、端口占用 | | yzng plugin new <名> | 生成一个插件骨架 |

常用参数:

yzng start --home D:\yunzai          # 指定主目录(也可用环境变量 YZNG_HOME)
yzng start --plugins ../a,../b       # 额外加载这几个目录(开发时用)
yzng start --log-level debug

devstart 的唯一区别是缺省日志级别

刻意不提供文件监听自动重载。 Node 的 ESM 模块缓存无法真正清除 —— 每次重载都会永久留下一份 旧模块连同其闭包。一个「保存即重载」的开发模式会让人在几十次保存之后面对一个内存里堆着几十份 旧闭包的进程,而那时的行为已经无从解释。开发期改了插件,重启进程。

主目录怎么定

优先级:--home 参数 > YZNG_HOME 环境变量 > 便携模式标记 > 当前目录

默认就是当前目录:在哪儿 yzng init,数据就在哪儿,拷走整个文件夹即完成迁移。 首次启动会打印它的实际位置 —— 这一条要紧,因为「我改的配置为什么不生效」 几乎总是改错了目录。

以 Windows 服务、开机自启或 pm2 启动时,工作目录并非项目目录,必须显式给出 YZNG_HOME 或启动器的工作目录,否则数据会落在启动器所在之处。

从 0.1.x 升级

0.1.x 的默认位置是系统目录(Windows 的 %LOCALAPPDATA%\YunzaiNG、Linux 的 ~/.yunzai-ng 等)。升级后不会静默沿用那里 —— 那会让「默认在当前目录」在任何装过旧版的 机器上都不成立。取而代之,initstartdoctor 都会在检测到旧实例时打印一行提示:

  ! 旧版本的主目录里还有一个实例 C:\Users\你\AppData\Local\YunzaiNG
      本次用的是 D:\yunzai
      要继续用旧的,设 YZNG_HOME 指向它;要搬过来,把其中内容拷到上面这个目录

刻意不自动迁移:两个目录都有内容时无从判断该以谁为准,猜错的代价是覆盖掉正在用的那份。