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

@yuuu0109/dsh-usage-quota

v0.1.1

Published

DeepSeek Harness web plugin for model usage, balance quota, and daily token display

Readme

dsh-usage-quota

一个 DeepSeek Harness Web 插件,用于在模型设置之外配置用量与额度查询,并在左侧侧边栏设置按钮上方显示剩余额度与今日消耗 Token。

功能

  • 设置页新增“用量查询”模块,DeepSeek 官方余额只配置一次,不按模型拆分。
  • DeepSeek 官方查询使用 GET {baseURL}/user/balance,自动读取模型设置中的 Base URL 与 API Key。
  • 查询配置优先写入 DSH settings namespace;旧 Host 尚未加载该 namespace 时自动使用浏览器本地配置,仍可立即配置和显示。
  • 全局自动查询间隔为 1 到 1440 分钟。
  • Token 显示可在完整数字与 K/M 缩写之间切换,偏好按浏览器本地保存。
  • 左下角显示 DeepSeek 官方剩余额度和今日 Token;今日 Token 明细按实际请求模型显示。
  • 今日 Token 从持久化会话事件重算,重启后不会丢失,跨午夜自动切日。

安装

dsh plugin --profile web add @yuuu0109/dsh-usage-quota

重启 dsh web 并刷新浏览器。

更新

dsh plugin --profile web update @yuuu0109/dsh-usage-quota

重启 dsh web 并刷新浏览器。如果配置的 npm 镜像尚未同步最新版本,可指定官方源:

dsh plugin --profile web update @yuuu0109/dsh-usage-quota --registry=https://registry.npmjs.org/

pnpm 11 可能延迟 24 小时同步新版本,需要立即更新时可执行:

dsh plugin --profile web update @yuuu0109/dsh-usage-quota --config.minimumReleaseAge=0

从源码安装

git clone https://github.com/Yuuu0109/dsh-usage-quota.git
cd dsh-usage-quota
pnpm install
pnpm build
dsh plugin --profile web add .

卸载

dsh plugin --profile web remove @yuuu0109/dsh-usage-quota

重启 dsh web

使用

  1. 打开“设置”中的“用量查询”。
  2. 开启“在侧边栏显示”,设置自动查询间隔。
  3. DeepSeek 官方模型直接测试即可。
  4. 自定义网关可填写 URL 模板和剩余字段路径,例如:
URL: {{baseUrl}}/dashboard/billing/credit_grants
Header: Authorization: Bearer {{apiKey}}
剩余字段路径: total_available

保存后,左下角会自动按配置间隔刷新。

开发

pnpm typecheck
pnpm test
pnpm build

兼容 DeepSeek Harness 0.1.0-rc.8 与 React 18。

这是独立社区插件,不属于官方 DeepSeek Harness 仓库。