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-deepseek-usage

v1.1.1

Published

查询 DeepSeek API 余额与用量信息,支持每日花费统计图表

Readme

koishi-plugin-deepseek-usage

在 Koishi 中查询 DeepSeek 余额花费统计(支持柱状 + 折线统计图)。

指令

  • deepseek余额:查询余额
    • -r:输出原始 JSON
  • deepseek统计 [days]:查询本月花费统计图(默认全月,最多 60 天)
    • days:只看最近 N 天
    • -t:仅输出文字(不发图)

配置

在 Koishi 控制台插件配置中填写:

| 字段 | 必填 | 说明 | |---|---:|---| | token | 是 | DeepSeek API Key(sk-...),用于查询余额 | | platformToken | 否 | 用于拉取平台“真实花费”。从浏览器打开 platform.deepseek.com(已登录)→ F12 → Application → Local Storage → userToken。如果你拿到的是 {\"value\":\"...\"} 这种 JSON,插件会自动取 value | | platformCookie | 否 | 可选辅助项。若 platformToken 偶发失效,可从浏览器 Network 任意请求的 Request Headers 复制 Cookie |

可选自定义:

| 字段 | 默认 | 说明 | |---|---|---| | commandName | deepseek余额 | 余额指令名 | | statsCommandName | deepseek统计 | 统计指令名 | | allowPrivate | true | 是否允许私聊使用指令 | | autoRecordInterval | 60 | 自动记录余额间隔(分钟),0 表示关闭(用于本地估算花费的 fallback 数据) | | replyTemplate |(内置)| 余额回复模板:支持 {currency} {total_balance} {granted_balance} {topped_up_balance} | | statsReplyTemplate |(内置)| 统计文字模板:支持 {year} {month} {total} {currency} {model_summary} | | chartTitleTemplate |(内置)| 统计图片标题模板:支持 {year} {month} {total} {currency} |

说明

  • platformToken / platformCookie 属于敏感信息,不要发到群里或公开。