Introduction¶
When using DeepSeek Harness (DSH) for local model inference, tracking daily usage, calculating costs, and maintaining a check-in habit are common needs. The dsh-daily-ledger plugin solves these problems. It is a local tool that does not connect to the network or upload data. After installation and activation, it automatically listens for DSH-committed model usage events and records them locally.
Plugin Overview¶
dsh-daily-ledger is a local daily check-in and token/amount ledger for DeepSeek Harness (DSH). It is maintained by jijiz1 and licensed under the MIT License.
Core Features¶
- Daily check-in: Supports check-ins in chat, with optional notes of up to 500 characters. Repeated calls on the same day only update the note.
- Token and cost statistics: Supports statistics over 1 to 366 days, with breakdowns by provider and model.
- Usage status view: Quickly check today’s check-in status, consecutive-day streak, and today’s usage.
- Web floating window: Shows a floating window in the bottom-right corner, which can be expanded, collapsed, and dragged. It includes three pages: “Today”, “Statistics”, and “Background”.
- Token category statistics: Supports detailed statistics for uncached input, cache read, cache write, output, and reasoning tokens. Reasoning tokens are already included in output and are not billed again.
- Pricing snapshot: Each model call saves a pricing snapshot for that moment. Models without pricing display “Unpriced” and are never treated as 0.
Installation and Activation¶
Use the official installation command to add the plugin path:
dsh plugin --profile web add D:\DSH\dsh-daily-ledger
After installation is complete, restart the dsh web process to activate it.
Typical Usage¶
Send the following commands in chat to use the plugin:
- Today’s check-in: Say “check in today” in chat.
- Usage statistics: Say “token and amount statistics for the last 7 days” in chat.
- Model spending: Say “view this month’s spending by model” in chat.
Configuration and Data¶
After the first launch, data is stored in the following default locations:
$DSH_HOME/daily-ledger/ledger.json: Check-in and usage ledger.$DSH_HOME/daily-ledger/pricing.json: Pricing table.
Time Zone Settings¶
The default time zone is Asia/Shanghai. It can be changed using the environment variable DSH_DAILY_LEDGER_TIME_ZONE.
Pricing Configuration¶
Default prices are taken from DeepSeek’s official English and Chinese pricing pages (unit: per million tokens).
Other provider/model combinations can be added directly in pricing.json. Keys must be written in provider/model format (for example, openrouter/deepseek/deepseek-v4-pro). After restarting, new calls will save new pricing snapshots.
Web Floating Window¶
The floating window appears in the bottom-right corner and supports the following operations:
- Page switching: Includes the “Today”, “Statistics”, and “Background” pages.
- Dragging: When expanded, drag the title bar to move it. When collapsed, drag the capsule button to move it.
- Background settings:
- Presets: Deep Sea, Purple Glow, Forest, and Sunset.
- Custom: Supports custom solid colors, image URLs, or local images up to 2 MB. Local images are converted to browser-local data only and are not uploaded externally.
- Mask: Allows adjusting the intensity of the content mask.
- Memory: Window position, expanded state, and background settings are stored locally in the browser. If there are no data changes, periodic refreshes do not rebuild the window.
Notes¶
- Data statistics scope: Automatic statistics start from model calls made after the plugin is activated. Historical logs are not imported, and previous compressed session logs are not guessed or imported again.
- Amount estimation: Amounts are estimates based on tokens and configured prices. Provider bills, taxes, exchange rates, or time-based pricing may cause differences. The final bill is authoritative.
Conclusion¶
dsh-daily-ledger provides DSH users with localized cost tracking and habit-management capabilities. To learn more details or access the source code, visit the GitHub repository.