
feiyang-dev/dsh-usage-plugin
181Last commit Aug 15, 2026
dsh-usage-plugin DSH plugin
dsh-usage-plugin adds 'Usage & Cost' and 'Balance Query' tabs to the DSH Web UI. It records every model call's token usage, cache hits, and compute cost using DeepSeek’s peak/valley pricing. The plugin also provides a price table editor, import/export, and a monthly heatmap for daily usage.
How to install the dsh-usage-plugin DSH plugin
dsh plugin --profile web add @feiyang666/dsh-usage-pluginCopying does not run this command. Review the repository and version before installing the dsh-usage-plugin DSH plugin.
dsh-usage-plugin DSH plugin data source
dsh-usage-plugin DSH plugin snapshot date: Aug 16, 2026
discovered
What the dsh-usage-plugin DSH plugin can do
- Records token usage, cache hits, and cost per model call, using peak/off-peak billing (Beijing time 09:00–12:00 and 14:00–18:00).
- Displays a calendar heatmap colored by cost or call count, with day-level details and peak/off-peak cost split.
- Provides a balance query feature using the configured DEEPSEEK_API_KEY.
- Supports export to CSV, JSON, and PNG long image (up to 2000 records), with native folder picker and auto-open after export.
- Supports import of JSON/CSV files with deduplication by time.
- Persists records to <session workspace>/dsh-usage/usage-records.json (cap 100,000 records).
Where the dsh-usage-plugin DSH plugin fits
- Monitor and analyze API usage costs for DeepSeek Harness applications.
- Track daily token consumption and peak/off-peak cost distribution.
- Export usage reports for billing or auditing purposes.
- Query DeepSeek account balance directly from the DSH UI.
- Review cache hit history to optimize prompt caching strategies.
Who the dsh-usage-plugin DSH plugin is for
- DeepSeek Harness users who need to track API costs and usage.
- Developers managing multiple DSH profiles or instances who want centralized cost monitoring.
dsh-usage-plugin DSH plugin limitations
- Requires DeepSeek Harness (dsh) installed and a running DSH web service.
- Balance query requires a valid DEEPSEEK_API_KEY configured in Settings.
- Records are capped at 100,000 entries; older records may be automatically pruned.
- Export to PNG is limited to the latest 2000 records (warns if exceeded).
- Pricing is based on DeepSeek's official peak/valley schedule; models without official prices are counted as zero cost.
dsh-usage-plugin DSH plugin: from the repository README
Quoted from the feiyang-dev/dsh-usage-plugin README, the upstream source of the dsh-usage-plugin DSH plugin. Copyright remains with the original authors.
**English** · [简体中文](./README.zh.md) [GitHub](https://github.com/feiyang-dev/dsh-usage-plugin) · [npm](https://www.npmjs.com/package/@feiyang666/dsh-usage-plugin) · MIT License **A community plugin for DeepSeek Harness** — records token usage and cost for every model call, with peak/off-peak billing, balance query, a calendar heatmap, and CSV / JSON / PNG export.    </div> --- > ## 🔔 Important Notice (2026-08-16): npm package renamed > > The **npm package has been renamed from `@feiyang666/deepseekharnessdesktop` to `@feiyang666/dsh-usage-plugin`** (matching the GitHub repo `feiyang-dev/dsh-usage-plugin`). > > - Use the new package name for install / upgrade: `dsh plugin --profile web add @feiyang666/dsh-usage-plugin` > - The old package `@feiyang666/deepseekharnessdesktop` remains published for a while, but it is **no longer maintained and will not receive updates** — please migrate soon. > - The desktop client ([`DeepSeek Harness Desktop`](https://github.com/feiyang-dev/DeepSeek-H
Read the full READMERepository license: MIT
dsh-usage-plugin DSH plugin questions
How do I install dsh-usage-plugin?
The recommended way is to run `dsh plugin --profile web add @feiyang666/dsh-usage-plugin` in your terminal. This automatically installs the package and wires it into DSH. Alternatively, you can use the DeepSeek Harness Desktop app's graphical plugin installer. Restart the DSH web service after installation.
Why is the balance query failing?
Balance query requires a valid DEEPSEEK_API_KEY to be configured in the DSH Settings → Models. Make sure the key is set and that `api.deepseek.com` is reachable. If you are behind a proxy, configure it in DSH's network settings.
How do I export usage data?
In the 'Usage & Cost' panel, go to the export section. You can choose CSV, JSON, or PNG format. The export will include the latest 2000 records (PNG is limited to 2000). You can select a target directory using the native folder picker, and after export the folder will auto-open. If you exceed 2000 records, a warning will appear.
How do I uninstall the plugin?
Run `dsh plugin --profile web remove @feiyang666/dsh-usage-plugin` in your terminal. This removes the package and cleans up the configuration. Restart DSH after uninstallation. If you manually installed it, remove the plugin row from `cordis.patch.yml` and then run `pnpm remove @feiyang666/dsh-usage-plugin`.
Can I use this plugin with non-DeepSeek models?
Yes, the plugin records the model name from the actual request parameters. Non-DeepSeek models will appear truthfully in the records. However, if a model does not have an official price entry in the plugin's pricing table, its cost will be counted as zero. You can edit the price table in the panel to add custom pricing.