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-kardsman

v2.0.1

Published

Koishi plugin inspired by nonebot_plugin_kardsman and KardsDeckBuilder

Downloads

40

Readme

koishi-plugin-kardsman (示例骨架)

这是一个基于参考仓库 nonebot_plugin_kardsmanKardsDeckBuilder 的 Koishi 插件骨架示例。

主要命令(已初步实现为占位/数据查询):

  • kards.search <卡名>: 查卡(本地 data/cards.json
  • kards.random: 随机抽一张卡
  • kards.deck <卡组代码>: 接收卡组代码(目前为占位,后续实现图像合成)
  • kards.guess: 猜卡小游戏占位

如何开始(Windows PowerShell)

  1. 进入插件目录:
cd d:\VS\kards2\koishi-kardsman
  1. 安装依赖(示例,仅 dev 依赖,实际运行需在 Koishi 项目中作为插件引入):
npm install
  1. 开发时可使用 ts-node 直接运行(需在 Koishi 环境中加载该插件):
npm run dev

集成到你的 Koishi Bot

  • 推荐在已有的 Koishi 项目中,将此包作为本地插件引入(如 npm link 或在主项目中直接 require('./path/to/koishi-kardsman/dist'))。
  • 生成卡牌图像通常需要:
    • 卡牌素材(纹理、框架、图案)存放在 data/images/ 或远程图床。
    • 使用 canvas(node-canvas)或外部服务对卡牌进行合成。注意:在 Windows 上安装 node-canvas 可能需要额外的系统依赖。

接下来要做的工作(我可以继续完成)

  • 完整实现卡组代码解析与图像合成(参考 KardsDeckBuilder 的编码/渲染逻辑)。
  • 将图片资源从参考仓库导入或支持远程图床链接,并实现合成预览(合成可用 canvas/sharp/外部 API)。
  • 实现猜卡小游戏逻辑与群聊交互状态管理。

如果你希望我现在继续:

  • 请告诉我你要在什么平台上运行 Koishi(例如:OneBot / cqhttp / mcp / Telegram),我会为该适配器调整图片发送实现;
  • 或者允许我接着实现卡组解析与图像合成的初始实现(我会把合成方案做成可选的本地 canvas 实现或调用外部图像服务)。