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-cost-meter

v1.9.97

Published

DeepSeek Harness 会话费用统计插件:本会话成本、当日费用、历史记录与官方价格同步,支持多厂商多模型价格计费(内置 170+ 模型 ID 价格目录与自动匹配)、主流 Coding Plan 订阅额度查询与显示(16 家,含 WorkBuddy 官方积分、OpenDesign 工作区查询、含小米 MiMo Token Plan 控制台 Cookie 查询、SCNet Token Plan 本地 Credits 计量与火山方舟 Volcano Ark Coding Plan AK/SK 签名查询

Readme

按会话、模型和调用查看费用与 Token 用量,集中显示账户余额、套餐额度和预算。支持 API 费用与 Plan 等值费用分开统计、多厂商定价、峰谷提醒,以及侧栏和输入区的独立显示设置。

安装

需要 Node.js ≥ 20、DSH 0.2.0 或更新版本,以及 DSH 可用的 pnpm。宿主兼容记录

dsh plugin --profile web add dsh-cost-meter

安装或更新后重启 dsh web。Desktop 使用应用自带 CLI 和 desktop Profile,见 Desktop 安装与更新。

PowerShell 脚本自动检查 pnpm 和 Git,默认安装到 web Profile:

irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.97/install.ps1 | iex

固定 Git tag 安装:

dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.97

更新、卸载及无 Git 的安装方法见安装说明。

当前版本 v1.9.97:更新说明 · 安装排障

OpenCode Go 额度设置 · CommandCode 模型与账号设置

在「设置 → 费用 → 额度」添加并启用 Magpie 网关,可按提供商和账号查看额度。

功能总览

  • 费用明细:输入区、标题栏和每轮回复显示费用;展开查看单价、Token、输入内容及工具结果。支持父子代理费用归属。
  • 费用统计:按日期、渠道和模型筛选,查看趋势、模型排行、缓存命中率与 Token 热图;导出单个或全部会话记录;单独查看本地模型的 API 等值费用。
  • 套餐额度:支持 Codex / ChatGPT、OpenCode Go、MiniMax、Claude、GLM、Kimi、千问、MiMo、OpenDesign 等;提供 CLIProxyAPI 多账号额度及自定义 HTTP 余额查询。
  • 模型定价:自动匹配模型价格,编辑单价、倍率及峰谷档位;同步 DeepSeek 官方价格和 OpenRouter 目录。API 与 Plan 分开统计。
  • 预算提醒:按日、月、累计或自定义日期设预算;显示峰谷时段和倒计时,支持切换前弹窗与系统通知。
  • 显示与历史:自定义侧栏、输入区、额度横条和每轮费用;支持中英双语、深色主题和手机端。可导入历史、设置保留范围及管理存储。

功能入口和配置见功能与截图;厂商、模型及凭据要求见适配说明。

图文演示

主要界面

| 费用趋势与模型排行 | 单个会话费用分布 | |---|---| | 费用趋势与模型排行 | 会话费用矩形图 |

| 套餐额度与余额 | 显示设置与交互预览 | |---|---| | 套餐额度与余额 | 显示设置与交互预览 |

点击图片查看大图。更多界面:调用详情、价格、历史、深色与手机端

侧栏布局

在 设置 → 费用 → 显示 → 侧栏 → 侧栏布局 中切换。各张截图使用同一组示例余额、套餐额度和用量。

| 标准 | 紧凑 | |:---:|:---:| | | |

| 简洁 | 合并卡片 | |:---:|:---:| | | |

图标布局

DeepSeek 图标显示余额和当前计价时段,点击可展开明细。

| 平价时段 | 高峰时段 | 高峰时段展开余额 | |:---:|:---:|:---:| | 平价时段的 DeepSeek 蓝色圆环图标 | 高峰时段的 DeepSeek 橙色圆环图标 | 展开 DeepSeek 图标,显示余额和下次切换时段 |

感谢 @chanyuenpang 提出并实现侧栏图标布局。

文档

| 主题 | 文档 | |---|---| | 安装与使用 | 安装、更新、卸载 · 安装排障 · 显示设置 | | 统计与计费 | 计费规则 · 统计与明细 · 模型定价与适配 · 峰谷时段 | | 余额与套餐 | 凭据来源 · 自定义余额 · 网关额度 · 套餐用量估算 | | 历史与存储 | 保留与清理 · 历史重定价 · 外部用量 · 账本恢复 | | 开发与贡献 | 架构与开发 · 贡献指南 · 宿主兼容 | | 版本记录 | 更新历史 · CHANGELOG |

交流与反馈

提交 issue 时请附插件版本、宿主版本、复现步骤和相关日志。使用交流与功能讨论可加入微信群。

贡献者

感谢社区的问题报告、功能建议、文档和代码贡献。

Star 增长记录

License

MIT © 2026 dsh-cost-meter contributors