
cute-baobao/dsh-usage-meter
40Last commit Aug 14, 2026
dsh-usage-meter DSH plugin
dsh-usage-meter is a plugin for DeepSeek Harness that automatically logs token consumption from model calls. It aggregates data by model and hour, showing a stacked bar chart in the Web GUI Settings page. The interface supports both Chinese and English, following the GUI language.
How to install the dsh-usage-meter DSH plugin
dsh plugin --profile web add @dsh-usage-meter/usageCopying does not run this command. Review the repository and version before installing the dsh-usage-meter DSH plugin.
dsh-usage-meter DSH plugin data source
dsh-usage-meter DSH plugin snapshot date: Aug 16, 2026
discovered
What the dsh-usage-meter DSH plugin can do
- Automatically records token usage for each model call in DSH Web
- Aggregates usage data by model and hour
- Displays a stacked bar chart (one bar per hour, color-coded by model) in the Settings page
- Stores data persistently in $DSH_HOME/usage-meter/usage.jsonl
- Re-aggregates data on startup to reflect the latest state
- Bilingual interface (Chinese/English) matching the GUI language
Where the dsh-usage-meter DSH plugin fits
- Monitor token consumption across different models over time
- Identify usage trends and peak hours for model calls
- Optimize token budget by analyzing model-specific usage patterns
- Track historical usage for cost allocation or audit purposes
- Compare daily or hourly usage between models to inform resource planning
Who the dsh-usage-meter DSH plugin is for
- DSH Web users who want to track their token usage
- Developers and operators managing DSH deployments and need usage insights
dsh-usage-meter DSH plugin limitations
- Only works in the DSH Web environment (profile: web)
- Data aggregation is limited to hourly granularity (no finer resolution)
- Requires a restart of `dsh web` after installation or removal
- Data storage is local to the DSH server and not synced across instances
dsh-usage-meter DSH plugin: from the repository README
Quoted from the cute-baobao/dsh-usage-meter README, the upstream source of the dsh-usage-meter DSH plugin. Copyright remains with the original authors.
DeepSeek Harness 用量统计插件:自动记录模型调用的 token 用量,按「模型 × 小时」聚合,在 Web GUI 设置页以堆叠柱状图展示(每小时一根柱子,按模型分色)。 [🌐 English](README.en.md) · 中文  ## 安装 ```sh pnpm dsh plugin --profile web add @dsh-usage-meter/usage ``` > 刚发布当天若解析失败,显式钉版本(如 `@dsh-usage-meter/usage@0.3.0`)即可。 重启 `dsh web`,设置 → 用量统计 即可查看。 ## 卸载 ```sh pnpm dsh plugin --profile web remove @dsh-usage-meter/usage ``` ## 数据 记录在 `$DSH_HOME/usage-meter/usage.jsonl`,启动时按小时重新聚合;界面中英双语,跟随 GUI 语言。 ## 许可 MIT
Read the full READMERepository license: MIT
dsh-usage-meter DSH plugin questions
How do I install dsh-usage-meter?
Run the command `pnpm dsh plugin --profile web add @dsh-usage-meter/usage` in your terminal. If the package fails to resolve on the day of release, pin a specific version like `@dsh-usage-meter/usage@0.3.0`. After installation, restart `dsh web` and go to Settings → Usage Statistics to see the chart.
Where is the usage data stored?
The data is stored in a JSONL file at `$DSH_HOME/usage-meter/usage.jsonl`. Each line represents a model call record. The plugin re-aggregates the data on startup, so you don't need to manually manage the file.
Can I use this plugin in DSH terminal or other profiles?
No, this plugin is designed specifically for the Web profile. The installation command includes `--profile web`, and the chart is only available in the Web GUI Settings page. It does not work in terminal or other profiles.
Does the plugin support all models?
Yes, the plugin records token usage for every model call made through DSH Web. The chart will display a bar for each hour, with different colors representing different models. Since the plugin logs all calls, any model supported by DSH will be tracked.
How can I uninstall the plugin?
Run `pnpm dsh plugin --profile web remove @dsh-usage-meter/usage` in your terminal. After removal, restart `dsh web` to fully clear the plugin from the settings UI.