
Make0209/dsh-usage-stats
151Last commit Aug 14, 2026
dsh-usage-stats DSH plugin
This plugin adds a usage statistics page to the DSH web interface, featuring a 53-week heatmap, token/cache/balance dashboard, and workspace alias management. All data is sourced from persistent session logs and automatically backfilled upon installation.
How to install the dsh-usage-stats DSH plugin
dsh plugin --profile web add dsh-usage-statsCopying does not run this command. Review the repository and version before installing the dsh-usage-stats DSH plugin.
dsh-usage-stats DSH plugin data source
dsh-usage-stats DSH plugin snapshot date: Aug 16, 2026
discovered
What the dsh-usage-stats DSH plugin can do
- 53-week GitHub-style heatmap showing daily usage counts per workspace
- Statistics cards: total tokens, cache hit rate, account balance, continuous usage, per-workspace token progress bars
- Workspace alias management with persistent storage
- Time range switching (30 days / 90 days / all)
- Dark/light theme adaptive and animations
Where the dsh-usage-stats DSH plugin fits
- Track daily usage intensity across different workspaces
- Monitor token consumption and cache hit ratio to optimize prompts
- Check account balance without leaving the DSH web interface
- Rename workspaces with friendly aliases for better organization
Who the dsh-usage-stats DSH plugin is for
- DeepSeek Harness users who want visual usage statistics
- Developers managing multiple workspaces and tracking token costs
dsh-usage-stats DSH plugin limitations
- Only counts sessions that can be attributed to registered workspaces (by session cwd)
- Balance query requires a configured DeepSeek API key; otherwise shows a guide message
- Plugin only works in the web profile of DSH
dsh-usage-stats DSH plugin: from the repository README
Quoted from the Make0209/dsh-usage-stats README, the upstream source of the dsh-usage-stats DSH plugin. Copyright remains with the original authors.
DeepSeek Harness 插件:GitHub 风格用量热力图 + Token / 缓存命中 / 账户余额看板 + 工作区别名管理。 - **热力图**:53 周 GitHub 绿,每完成一个回合点亮;悬停按工作区显示次数明细与当日 Token - **统计卡片**:总花费 Token(分项)、缓存命中率、账户余额(DeepSeek 官方接口)、总使用次数、连续使用、各工作区 Token 进度条 - **工作区别名**:头部「✎ 工作区别名」管理,持久化保存(`$DSH_HOME/storages` 的 KV 单元 `usage-stats-aliases`) - 时间范围切换(近 30 天 / 近 90 天 / 全部)、动画、亮暗主题自适应 ## 效果截图   ## 安装 本插件是标准的 DSH 社区插件包(声明 `dsh.bundle` manifest + web client 半),数据全部来自持久化会话日志,安装后自动回填历史。 ### 方式一:官方插件命令(推荐) ```bash dsh plugin --profile web add dsh-usage-stats ``` 安装后刷新页面即可,无需手动改配置、无需重启。 ### 方式二:手动注册(本地包) 1. 把本目录放入任意位置,并在 `$DSH_HOME/profiles/node_modules/` 下创建指向本目录的符号链接(Windows 用 junction): ```powershell New-Item -ItemType Junction -Path "$env:DSH_HOME\profiles\node_modules\dsh-usage-stats" -Target "<本目录绝对路径>" ``` 2. 在 `$DSH_HOME/profiles/web/cordis.patch.yml` 添加一行: ```yaml - insert: - id: usage-stats name: dsh-usage-stats ``` 用户 patch 层会被热重载:保存后刷新页面即可。 ## 架构 - **Host 半**(`lib/index.js`):扫描持久化会话日志聚合用量(`turn/end` + `assistant/message.usage`),监听 `session/event` 实时折叠;通过 `webServer` 服务注册数据路由: - `GET /api/usage-stats` — 统
Read the full READMERepository license: MIT
dsh-usage-stats DSH plugin questions
How do I install dsh-usage-stats?
Run `dsh plugin --profile web add dsh-usage-stats` in your terminal. Then refresh the DSH web page. No manual configuration or restart is needed.
Where can I see the heatmap after installation?
The plugin adds a 'Usage Statistics' page under the settings panel. Look for a new section named 'Usage Stats' in the sidebar of the DSH web interface.
Does the plugin require an API key for balance display?
Yes, to show your account balance, the plugin reuses the `llm-deepseek` API key configuration. If no key is set, the balance card will display a guide message instead of the balance.
Will my usage data be lost if I uninstall the plugin?
No. All usage data is sourced from DSH's persistent session logs. The plugin only reads and aggregates those logs, so uninstalling just removes the UI; the underlying data remains intact.
Can I rename workspaces with this plugin?
Yes. The plugin provides a '✎ Workspace Alias' management feature at the top of the statistics page. Aliases are saved persistently in the `usage-stats-aliases` KV store under `$DSH_HOME/storages`.