Introduction¶
Agent developers using DeepSeek Harness (DSH) need to keep track of call counts and costs at all times, but the default interface only shows raw Token statistics. The Token Receipt plugin renders local DSH Token usage records and estimated costs into a printable receipt, supporting multiple time ranges and multiple currencies, with PNG export and clipboard copy capabilities.
Plugin Overview¶
- Name: Token Receipt (dsh-token-receipt)
- Maintainer: maxlee
- Category: Client plugin
- Value: Generates a “receipt”-style Token usage report within the DSH interface, suitable for reporting, sharing, or archival.
Core Features¶
-
Multi-period View
- Supports switching between “Day”, “Week”, “Month”, “30 Days”, “90 Days”, and “All” views.
- In Day/Week/Month views, you can step forward/backward or return to today within the panel.
- Switching periods automatically plays a “paper feed” animation. -
Model Cost Estimation
- Breaks down input, output, cache-read, and cache-write Tokens by DeepSeek model, providing corresponding model costs.
- Estimates are based on public models.dev pricing for reference only; they do not represent actual billing. -
Multi-currency Display
- Currency defaults to following the interface language, but can be manually switched between USD, CNY, and JPY. -
Visual & Interaction
- When printing or switching periods, displays a stepped paper-feed animation with torn edges and a barcode.
- Automatically adapts toprefers-reduced-motion, reducing animation intensity. -
Export & Sharing
- Copy Image: Directly copies a 3× resolution PNG to the clipboard for easy pasting into documents or chat.
- Save PNG: Downloads the local image.
- Replay Print: Manually re-triggers the paper-feed animation. -
Multi-language & Theming
- Supports English, Simplified Chinese, and Japanese interfaces, with both light and dark theme support.
Installation & Activation¶
Install from npm¶
Open the “Plugins” page in DSH, click “Add Plugin”, and enter the following in the input field:
dsh-token-receipt
Alternatively, execute via the plugin_manager tool:
{
"action": "install_bundle",
"target": "dsh-token-receipt"
}
After installation, if DSH prompts restart-required, restart the application once to activate the plugin.
Install from a Local Checkout¶
If you have a local repository checkout, pass the absolute path to plugin_manager:
{
"action": "install_bundle",
"target": "/absolute/path/to/dsh-token-receipt"
}
Update Notes¶
On DSH Desktop, if an update involves browser UI changes (client.js), you must fully quit DSH and relaunch it. Simply closing the plugin panel, switching plugins, or closing the window is not sufficient to trigger a reload. The plugin panel loads its bundle at startup. Version 1.1.1 and later will detect new versions and display a “Reload UI” prompt in the interface.
Typical Usage¶
- Open the “Token receipt” panel in the left sidebar.
- Switch the time range: select “Day”, “Week”, “Month”, “30 Days”, “90 Days”, or “All”. In Day/Week/Month views, use the date controls to step forward/backward or return to today. The paper-feed animation plays automatically on each switch.
- In the “Currency” menu, select
USD,CNY,JPY, or “Follow Language”. - Copy Image: Click “Copy image” to copy a 3× PNG to the clipboard, ready to paste into documents or chat.
- Save PNG: Click “Save PNG” to download the local receipt image.
- To watch the print animation again, click “Replay print”.
Use Cases & Notes¶
- Ideal for developers who need to visualize, report, share, or archive DSH Token usage and costs.
- The plugin runs with the current DSH process permissions. It is recommended to review the source code and license (MIT) before installation.
- Costs are estimates based on public models.dev pricing, not actual billing. All session and Token data remain local; only public pricing rates are fetched online.
Conclusion¶
Token Receipt turns DSH’s Token consumption and cost estimates into a readable, exportable receipt, facilitating team communication and cost tracking. Installation and usage are straightforward, making it well-suited for agent developers who frequently need to report or retain usage records.
- Directory page: https://www.skillhub.cn/plugins/maxlee/dsh-token-receipt
- GitHub: https://github.com/maxlee/dsh-token-receipt