xs-java2ai/niulai-pet
牛来A股桌宠 (Electron + DSH 套件)
Project Overview项目介绍
Niulai Pet is a borderless, transparent, always-on-top desktop pet for A-share stock market investors, built on the Electron framework. It is packaged as a DSH native bundle plugin, so you can install it directly to any DSH profile. When you click the pet, it fetches real-time A-share price change data, plays a unique “Niulai (Bull is here)” audio when the index rises, and plays a “Mama (Oh my god)” audio when it falls. It only shows a silhouette of the bull pet, so it does not block other desktop content unnecessarily, and you can drag it to any position on your desktop that you prefer. The plugin follows DSH's packaging specifications, with a clear cordis patch manifest and plugin entry point.
You can run Niulai Pet either as a standalone desktop app or launch it automatically with your DSH profile after installing the plugin. It is designed for users who follow A-share market trends, and lets you keep the pet on your desktop permanently to check the latest index data with one click anytime. It supports window pinning, minimizing to system tray, auto-start on boot, automatic position saving, and runs as a single instance to avoid wasting system resources from duplicate launches. You can toggle the pet’s visibility quickly by clicking the system tray icon, which makes it easy to hide when you need more desktop space.
To run the project, you need Node.js version 20 or higher, and it works across Windows 10/11, macOS, and Linux desktop environments. You can install dependencies via npm or pnpm, and the project includes a pre-configured .npmrc that sets up the Electron mirror for users in mainland China to speed up downloads. The free financial APIs used do not guarantee service level agreements, so data may have delays, and the content is for display only and does not constitute investment advice. If you replace the pet image yourself, you will need to generate a transparent PNG channel for it to display correctly.
牛来桌宠是一个基于Electron构建的A股桌面宠物工具,同时以DSH bundle形式打包,可作为原生插件安装到任意DSH配置文件中。它是一个无边框、透明、置顶的桌面宠物,点击即可获取A股实时涨跌幅数据,上涨时播放“牛来了”定制音效,下跌时播放“妈呀”定制音效,整体仅显示宠物剪影,不会额外遮挡其他桌面内容,支持拖拽到任意位置。
它的典型使用流程是,安装依赖后既可以独立启动运行,也可以作为DSH插件随DSH profile启动,适合关注A股大盘走势的用户,将其放在桌面常驻,随时一键查看最新行情。支持窗口置顶、系统托盘最小化、开机自启、位置自动记忆,单实例运行避免重复启动占用资源,点击托盘图标即可快速切换显示或隐藏。
运行要求Node.js版本不低于20,支持Windows 10/11、macOS和Linux桌面环境,可通过npm或pnpm安装依赖,项目内置了npm配置文件,已为国内用户配置好Electron镜像加速。免费财经API不保证服务可用性,行情可能存在延迟,内容仅作展示不构成投资建议,自行替换素材需要处理图片透明通道。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:niulai-pet(xs-java2ai/niulai-pet)
仓库:https://github.com/xs-java2ai/niulai-pet
本站详情页:https://www.yhbd.top/plugins/xs-java2ai-niulai-pet/
本站登记:类型 bundle · 归类 原生 DSH 插件 · 许可证未声明 · ⭐ 4 · 最近提交 2026-08-19 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- No license declared - all rights reserved by default; ask the author before commercial use or redistribution未声明开源许可证 —— 默认「保留所有权利」,商用或再分发前先问作者
- Only 4 stars - very few users, little community feedback星标只有 4,几乎没人在用,遇到问题缺少社区反馈
- Desktop client: installation downloads an executable - verify the publisher and checksums桌面客户端:安装会下载可执行文件,请核对发布者与校验和
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add github:xs-java2ai/niulai-pet
把 xs-java2ai/niulai-pet 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
牛来桌宠 (Niulai Pet)
一个无边框、透明、置顶的 A股桌面宠物。点击桌宠即可获取 A股实时涨跌幅:
- 上涨 → 播放
niulai.mp3(牛来了!🔴) - 下跌 → 播放
mama.mp3(妈呀!🟢)
基于 Electron 构建,同时以 DSH bundle 形式打包,可作为插件安装进任意 DSH profile。
效果预览
| 正常状态 | 点击后(说话) |
|---|---|
![]() |
![]() |
功能特性
- ✅ 正常状态显示
./assets/niu.png,点击切换为./assets/niu_speek.png(带弹跳动画) - ✅ 调用免费财经 API 获取 A股实时涨跌幅(上证指数,可配置)
- ✅ 点击后弹出气泡展示名称 / 涨跌幅 / 现价 / 涨跌额(A股红涨绿跌)
- ✅ 上涨 / 下跌播放不同音效,音频异步预加载
- ✅ 无边框 + 透明窗口,只显示宠物剪影
- ✅ 支持拖拽到桌面任意位置,位置自动记忆
- ✅ 窗口置顶,常驻其他窗口之上
- ✅ 最小化到系统托盘(单击托盘图标切换显示/隐藏)
- ✅ 可选开机自启(开发模式可用,打包后更稳定)
目录结构
niulai/
├── assets/ # 素材(打包进 asar,路径自动解析)
│ ├── niu.png # 正常表情(已转透明)
│ ├── niu_speek.png # 说话表情(已转透明)
│ ├── niulai.mp3 # 上涨音效
│ ├── mama.mp3 # 下跌音效
│ └── original/ # 原始(白底)图片备份
├── build/
│ └── icon.png # 应用图标(由透明图自动生成)
├── scripts/
│ ├── make-transparent.cjs # 白底抠图脚本(可重复执行)
│ └── build.mjs # 打包脚本(自动配置国内镜像)
├── src/
│ ├── main.js # Electron 主进程(窗口/托盘/拖拽/自启/IPC)
│ ├── preload.cjs # contextBridge 安全桥接
│ ├── stock.js # A股行情获取(东方财富 + 腾讯备用)
│ ├── renderer/ # 渲染进程(UI/动画/音效)
│ └── pet/index.js # DSH/Cordis 插件入口(拉起桌宠)
├── cordis.patch.yml # DSH bundle patch 清单
├── package.json
└── README.md
环境要求
- Node.js ≥ 20(推荐 20/22/24)
- npm 或 pnpm
- Windows 10/11、macOS、Linux(桌面环境)
一、依赖安装
# 在项目根目录
npm install
国内网络建议配置 Electron 镜像加速(项目已内置
.npmrc,也可用环境变量):# PowerShell(等价于 .npmrc 配置;npm 11 已不接受 `npm config set` 写自定义键) $env:ELECTRON_MIRROR = "https://npmmirror.com/mirrors/electron/" $env:ELECTRON_BUILDER_BINARIES_MIRROR = "https://npmmirror.com/mirrors/electron-builder-binaries/" npm install项目内
.npmrc已配置 electron 安装镜像;electron-builder 的打包镜像由scripts/build.mjs自动设置。海外网络可删除.npmrc。
二、运行
npm start
启动后宠物出现在屏幕右下角,可拖动;点击宠物查看行情并播放音效;右键托盘图标可隐藏/刷新/退出。
三、打包分发
npm run pack # 免安装目录版 → release/win-unpacked/
npm run dist # 安装包(NSIS) → release/*.exe
开机自启 在开发模式与打包后均可用;打包后是独立 exe,不依赖源码目录,更稳定。
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →


MemTensor/memmy-agent
OpenPetsHQ/openpets
QCYTSN/dsh-dafeiyu
vlln/whale-girl
ChisaAlter/WhaleIsle
Sutera-Diffusus/dsh-whale-musume
Yi-111-a/dsh-jingling
xiaoshihou514/dsh-desktop-pet