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

yo-moss-ai

v0.0.20

Published

MOSS 配置客户端:局域网设备、红外遥控器、Onvif 摄像头

Readme

yo-moss-ai

MOSS 配置客户端:在局域网发现设备、学习红外遥控器、配置摄像头。

固件上报的 boardmoss-onvif / moss-ov2640)决定相机源:onvif 走外接 ONVIF/RTSP,ov2640 走板载 MJPEG 与云台。product=moss-xiaozhi 只表示这是 MOSS 设备,不用于判断有没有板载摄像头。请与对应固件一起升级。

客户电脑安装好 Node.js 后,一条命令即可启动,并自动打开浏览器。

npx yo-moss-ai

指定版本(推荐,避免意外升到不兼容的版本):

npx [email protected]

首次启动会从国内镜像下载摄像头预览用的 ffmpeg(约 20MB),保存到 ~/.moss-desktop/bin。之后再运行会直接用本地文件。

启动成功后终端会打印类似:

yo-moss-ai v0.1.0  http://127.0.0.1:3780

浏览器一般会自动打开。若没有,请手动访问上面的地址。用 Ctrl + C 结束。

如何卸掉

npx yo-moss-ai 不会装成系统里的常驻软件。终端里 Ctrl + C 停掉后,命令本身就已经没在运行。

若要清掉本机残留:

  1. 配置和账号(设备列表、摄像头密码等)在用户目录:
# macOS / Linux
rm -rf ~/.moss-desktop

# Windows(PowerShell)
Remove-Item -Recurse -Force "$env:USERPROFILE\.moss-desktop"
  1. npx 下载缓存(可腾出磁盘):
npm cache clean --force

若曾经用过全局安装 npm install -g yo-moss-ai,再执行:

npm uninstall -g yo-moss-ai

需要的 Node.js 版本

必须安装 Node.js 20 或更高版本(建议安装官网的 LTS 长期支持版,例如 20 或 22)。

在终端检查:

node -v

应显示 v20.x.x 或更高。若提示 command not found,或版本低于 20,请先按下面步骤安装。

如何安装 Node.js

方法一:官网安装包(最简单)

  1. 打开 https://nodejs.org/zh-cn
  2. 下载 LTS 版本(不要下 Current 测试版也行,但 LTS 更稳)
  3. 运行安装程序,一路下一步,保持默认选项(Windows 请勾选 “Add to PATH”)
  4. 关掉旧的终端窗口,重新打开一个新的
  5. 再执行 node -vnpm -v,确认都能显示版本号

方法二:macOS 用 Homebrew

brew install node@22

node -v 仍看不到,把 Homebrew 的 node 加入 PATH 后再开一个新终端。

方法三:用 nvm 管理版本(适合需要多版本的人)

macOS / Linux:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash

关掉终端再打开,然后:

nvm install 22
nvm use 22
node -v

Windows: 可使用 nvm-windows,安装后同样执行 nvm install 22

装好后启动本工具

npx yo-moss-ai

npx 随 Node.js 一起安装,不用再装别的。若提示是否安装包,输入 y 回车。

使用顺序

  1. 扫描局域网并添加 MOSS(给它起个名字)
  2. 在设备列表里选一台在线设备
  3. 添加电器并学习遥控器。学到信号后请先试发,确认电器有反应再保存
  4. 可选:扫描 Onvif 摄像头,查看画面并控制云台

电脑、MOSS、摄像头需要在同一局域网。

开发者

本地开发:

pnpm install
pnpm dev

浏览器打开 http://127.0.0.1:3780 ,页面和接口在同一端口。

打包(压缩并混淆前端与服务端代码):

pnpm build

发布到 npm(每次自动升版本号,默认 +0.0.1):

npm login
npm whoami            # 能打印出用户名再发布
pnpm release          # 0.1.0 -> 0.1.1
pnpm release:minor    # 0.1.1 -> 0.2.0
pnpm release:major    # 0.2.0 -> 1.0.0
pnpm release 1.4.0    # 指定版本

若构建已成功、只是登录失败,不要再 pnpm release(会重复升版本),登录后执行:

npm publish --access public