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

koishi-plugin-music-player-ncm

v1.1.11

Published

网易云音乐播放器插件 - 支持搜索、下载和发送网易云音乐

Readme

koishi-plugin-music-player-ncm

网易云音乐播放器插件,支持在聊天中搜索、下载并发送网易云音乐。

安装

npm install koishi-plugin-music-player-ncm

指令

ncmget <歌名>

别名:网易云

搜索并发送网易云音乐。

参数:

| 参数 | 说明 | |------|------| | -a | 以语音格式发送(转码为 128kbps) | | -f | 以文件格式发送 | | -z | 压缩音频并以语音发送(需要 ffmpeg 服务) | | -zf | 压缩音频并以文件发送 |

使用示例:

ncmget 晴天
网易云 周杰伦 七里香
ncmget -z 稻香
ncmget -zf 稻香
ncmget "歌名 带空格"
ncmget “中文引号也可以”
  • 以语音格式发送时会使用 128kbps 音频;有 ffmpeg 时临时转码,无 ffmpeg 时直接下载 128kbps 音源
  • -z 将音频压缩并以语音格式发送
  • -zf 同样压缩,但以文件格式发送(便于保存)
  • 支持中英文引号包裹歌名(如歌名中包含空格)
  • 未识别的参数(如 -x)会被当作歌名的一部分

搜索流程:

  1. 输入歌名后,如有多个结果会显示列表
  2. 回复数字选择歌曲
  3. 回复 0 退出搜索
  4. 超时未选择自动取消(默认 30 秒)

配置项

| 配置项 | 类型 | 默认值 | 说明 | |--------|------|--------|------| | cookie | string | - | 网易云音乐 Cookie | | bitrate | number | 320000 | 音频码率 (bps) | | searchTimeout | number | 30 | 搜索超时时间 (秒) | | searchPageSize | number | 5 | 搜索结果数量 (1-20) | | mergeSearchResults | boolean | false | 合并发送搜索结果 | | sendFormat | radio | file | 发送格式 (file / audio) | | rateLimitEnabled | boolean | true | 启用频率限制 | | rateLimitInterval | number | 2 | 调用间隔 (秒) | | rateLimitGlobal | boolean | true | 全局频率限制 | | cacheMaxSize | number | 1024 | 缓存容量上限 (MB) | | cachePath | string | data/ncm-cache | 缓存路径 |

服务依赖

  • database (必需)
  • http (必需)
  • i18n (必需)
  • ffmpeg (可选) - 使用 -z 压缩功能时需要;语音发送可用它转码,未安装时会自动下载 128kbps 音源

Cookie 获取方法

配置 Cookie 后可获取 VIP 歌曲。

使用 Cookie Editor 插件

  1. 安装 Cookie-Editor
  2. 访问 music.163.com 并登录
  3. 点击插件图标,导出为 JSON 格式
  4. 粘贴到插件的 cookie 配置项中

手动获取

  1. 访问 music.163.com 并登录
  2. F12 打开开发者工具
  3. 在 Application > Cookies 中找到 MUSIC_U 并复制值
  4. 配置项中填入:MUSIC_U=你的值

Cookie 格式示例:

JSON 格式:

[
  {"name": "MUSIC_U", "value": "your_music_u_value"},
  {"name": "__csrf", "value": "your_csrf_value"}
]

字符串格式:

MUSIC_U=your_value; __csrf=your_value

Cookie 包含账号敏感信息,请勿泄露。Cookie 有效期有限,失效后需重新获取。

缓存机制

插件自动缓存已下载的歌曲,再次请求时从本地读取:

  • 默认容量 1GB,按 LRU 策略滚动覆盖
  • 默认位置 data/ncm-cache/(可配置)
  • 数据库自动维护歌曲元信息

许可证

MIT License

免责声明

本插件仅供学习和个人使用。使用时请遵守网易云音乐的相关条款和版权法律法规。开发者不对因使用本插件产生的任何问题负责。