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

@dsh-agent-toolkit/token-usage

v0.4.1

Published

DeepSeek Harness plugin: per-day token usage statistics — 13-week heatmap, stacked daily chart, /token-usage command

Readme

@dsh-agent-toolkit/token-usage

DeepSeek Harness plugin: per-day token usage statistics — 13-week heatmap, stacked daily chart, /token-usage command.

DeepSeek Harness(dsh)插件:按日/按小时计量 token 用量。

  • 13 周活动热力图 + 单日堆叠图(按模型/按项目/压缩单列),侧边栏底栏「Token 用量」打开
  • /token-usage [YYYY-MM-DD] 命令:今日 + 近 7 日,或指定日期
  • JSON API:/dsh-agent-toolkit/api/usage/daily?date=/dsh-agent-toolkit/api/usage/range?days=(web 模式)
  • 用量缺失的样本经 tokenMeter 启发式估算,估算量单列

截图

Token 用量面板:13 周活动热力图

单日堆叠图

安装

dsh plugin --profile <profile 名> add @dsh-agent-toolkit/token-usage

--profile 为必填项;profile 是 $DSH_HOME/profiles/<name>(默认 ~/.dsh/profiles/<name>)下的目录。包自带 cordis.patch.yml(bundles 层),装进 profile 后自动激活。

与 dsh-agent-toolkit 二选一dsh-agent-toolkit 已内置本插件全部功能(Agent 注册表/分层提示词/委派/飞书 bots + token 用量)。 两者同时安装时,后到实例会自动停用用量功能(不重复计量、不注册 /token-usage 命令与面板),先到者完整工作;仍建议只装其一。

配置

- id: '@dsh-agent-toolkit/token-usage'
  config:
    timezone: Asia/Shanghai   # 默认值;按日/按小时聚合的时区

修改配置触发 HMR 热替换,无需重启。

运行前提

  • 宿主注入服务:storageDomaintokenMetercommandswebServer 可选,headless/CLI 下 API 自动不注册)。
  • peer dependency:@deepseek-ai/cordis ^4。

从 0.2.x 升级

0.3.0 起本包重写为 dsh-agent-toolkit workspace 的用量模块,存储域 token_usage 不变,历史数据保留。 0.1.x/0.2.x 已废弃(deprecated)。

License

MIT