Introduction¶
When using DeepSeek Harness (DSH), model call records are usually scattered in session logs. If you want to look back on how many tokens were used per day over a period of time and which models consumed more, the common practice is to manually review logs or write statistical scripts yourself.
snownightt/dsh-token-activity is a third-party plugin for DeepSeek Harness. It displays the daily Token consumption of the last 365 local calendar days as a heatmap, and allows you to view all models and their respective Token usage for that day by hovering over the date.
What is this¶
snownightt/dsh-token-activity is maintained by SnowNightt, the GitHub repository address is https://github.com/SnowNightt/dsh-token-activity, and the license is MIT.
The problem it solves is specific: providing a “Usage” entry point in the DeepSeek Harness Web interface to view cumulative tokens, peak tokens, and daily-aggregated historical token consumption.
Core Features¶
- A new top-level navigation “Usage” added to the settings interface.
- Top metric cards display cumulative tokens and peak tokens.
- Displays a heatmap of daily Token consumption for the last 365 local calendar days.
- When hovering over any date, it shows the total for the day, the date, all models, and their respective tokens.
- Automatically backfills historical sessions and displays the backfill progress in real-time.
- A failed single session backfill does not affect the overall statistics.
Installation and Activation¶
Below is the process for installing and activating from an npm package: first install the plugin, then start the Web service, and finally check the configuration.
Install the plugin:
dsh plugin --profile web add @snownightt/dsh-token-activity-bundle
After installation is complete, start the DeepSeek Harness Web service:
dsh web
After the above steps, you can check the combined configuration:
dsh --profile web --dump-config
The output should contain:
token-activity
ui-token-activity
Note: After installing or uninstalling a plugin, you need to restart the DeepSeek Harness Web service.
Typical Usage¶
- After installing the plugin, start the DeepSeek Harness Web service:
dsh web
-
Open the DeepSeek Harness Web interface in a browser, go to “Settings”, and click “Usage” in the top-level navigation.
-
On first opening, wait for the historical session auto-backfill to complete. A failed read of a single session will not interrupt other data statistics.
-
After backfilling is complete, the page will display cumulative tokens, peak tokens, and a heatmap of Token consumption for the last 365 local calendar days. Hover over any date to see the total for the day, the date, all models, and their respective tokens.
Use Cases and Notes¶
This plugin is suitable for developers who need to view historical Token consumption and model usage on a per-date basis within the DeepSeek Harness Web interface.
It calculates recorded model call tokens based on DeepSeek Harness session logs and does not directly read the API provider’s account billing. Therefore, the cumulative amount shown by the plugin should be understood as tokens recorded in Harness sessions and cannot replace the account usage on the API provider’s platform. Fees, balances, or final billing are based on the official API provider platform.
The following situations may cause discrepancies between the plugin’s statistics and the official platform data:
- Auxiliary model calls such as automatic title generation and context compression may not be fully counted;
- Web search response Token usage is currently not written into this plugin’s statistical source;
- Failed, cancelled, or retried requests are only counted when
usageis saved in the Harness session log.
In addition, this plugin loads with the current dsh process, and runtime permissions depend on the current dsh process. It is recommended to check the GitHub source code and the MIT license before installation.
If you want to uninstall the version installed from npm, you can execute:
dsh plugin --profile web remove @snownightt/dsh-token-activity-bundle
After uninstalling, the DeepSeek Harness Web service also needs to be restarted.
Conclusion¶
The value of snownightt/dsh-token-activity is not to replace the API provider’s billing, but to provide a daily-aggregated Token consumption view for DeepSeek Harness’s session logs. It is suitable for quickly judging usage trends through local session logs first, and then verifying costs against official platform data.
Directory page: https://www.skillhub.cn/plugins/SnowNightt/dsh-token-activity
GitHub: https://github.com/SnowNightt/dsh-token-activity