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-sub2api-admin-lgs

v0.0.8

Published

LGS 用 sub2api 管理

Readme

koishi-plugin-sub2api-admin-lgs

npm

LGS 用 sub2api 管理

Token 消耗榜

插件使用新版 Sub2API 的管理员 API Key 调用实际的用户 Token 用量接口 /api/v1/admin/dashboard/user-breakdown,不依赖网页登录状态。

在 Sub2API 后台的「系统设置 → 管理员 API Key」创建密钥后,将它填入插件配置。

  • 消耗排行榜 日:近一日排行
  • 消耗排行榜 周:近一周排行
  • 消耗排行榜 月:近一月排行
  • 消耗排行榜 总:历史总排行

也可使用 token榜、消耗榜,并支持 day、week、month、total 参数。 QQ 官方机器人可使用原生 Markdown 排版和四档切换按钮。

分组账号监控

插件通过管理员 API Key 请求 /api/v1/admin/groups:

  • 分组账号:查看每个分组的可用账号数、总账号数和限流账号数。
  • 开启 monitorEnabled 后,按 monitorInterval 定时检查。
  • 分组可用账号首次变为 0 时向 alertChannels 报警,恢复到大于 0 后发送恢复消息;相同状态不会重复通知。
  • monitoredGroups 留空时,只监控启用且总账号数大于 0 的分组;填写后按分组名称精确匹配。
  • alertChannels 使用 platform:channelId 格式,例如 qq:123456。