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

v0.2.5

Published

Token usage, estimated cost, and a 52-week activity dashboard for DeepSeek Harness Web

Readme

dsh-usage

npm CI License: MIT

English · 简体中文

看清每一次 AI 调用消耗了多少 Token。dsh-usage 为 DeepSeek Harness Web 增加单轮用量摘要、模型费用估算和 52 周活动面板。

这是由社区独立维护的插件,并非 DeepSeek 官方插件。费用是估算值,不代表供应商最终账单。

Settings → Usage 用量面板

你会得到什么

  • 每轮对话结束后显示简洁的 Total · Input · Cache · Output · Cost 摘要。
  • 独立的 设置 → Usage 页面,可按模型、会话和单轮查看用量。
  • 基于持久化会话历史生成的 GitHub 风格 52 周热力图。
  • 与 Provider 无关的统计:只要模型返回标准 usage,就能记录 Token。
  • 完全可选、默认关闭的 DSH Community 聚合数据分享。

插件直接回放 Harness 已有的 Session 日志,不会再创建一套用量数据库。本地 Usage 始终独立于 Community 登录和网络状态。

30 秒安装

需要 Node.js 22.18 或更高版本,以及已有的 DeepSeek Harness Web Profile。

npx --yes --package=@deepseek-ai/dsh [email protected] -- dsh plugin --profile web add dsh-usage
npx --yes @deepseek-ai/dsh --profile web --dump-config
npx --yes @deepseek-ai/dsh --profile web

打开终端输出的 Web 地址,完成一次模型回复,然后查看对话下方的用量摘要和 设置 → Usage。首次安装后需要重启 Harness,让 Web 客户端发现新插件。

命令固定使用已经验证可用的 pnpm 11.9.0 安装基线。不要换成 pnpm 11.7.0,该版本可能在安装插件时失败。

升级、全局 CLI、源码运行、代理和故障排查

是否加入 Community,由你决定

连接 GitHub 和开启 Community Sync 是两个独立选择。GitHub 登录只用于确认公开身份,不会自动上传数据;只有你在 设置 → Usage 中主动打开同步开关后,插件才会发送聚合数据。

开启后只上传按天和按模型汇总的请求数及 Token 总量。提示词、回复、Session 内容、工具内容、路径、主机名、硬件标识和费用都不会上传。未知或私有模型路由会在本地合并为 other。即使同步失败,本地 Usage 也不会受到影响。

查看排行榜和图文安装指南 →

DSH Community 公开排行榜

可信的统计口径

普通输入、缓存读取、缓存写入和输出分别统计。Provider 已经计入 Output 的推理 Token 不会重复计算。fork 和子 Agent 会扣除继承自父会话的 seed 事件,同时保留子 Agent 自己产生的新模型调用,包括缓存命中。

只有相关调用都提供 usage,并且都能匹配生效日期对应的价格时,才会显示费用。条件不完整时仍展示 Token,但省略 Cost,避免把部分费用误认为总费用。

相关链接

采用 MIT License。