Introduction

The core design philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” When building agentic applications, developers often need to provide data-handling capabilities to models. For bookkeeping tasks, manually writing database interaction logic is both tedious and error-prone. bookkeeping is a plugin designed specifically for DSH. It allows users to record expenses, query accounts, generate reports, and export data through natural language conversations, while also supporting local persistent storage.

Core Features

Conversational Bookkeeping
The plugin supports entering amounts, dates, and notes through natural language. The model automatically parses dates (supports relative time such as “yesterday” and “last week”) and tries to match default categories (such as “lunch” and “taxi”). Amount input supports multiple formats (such as 35, ¥35, and 35 yuan).

Local Data Persistence
Data is stored in a local SQLite database. Amounts are stored as integer cents to ensure precision. By default, all data is saved in the ~/.dsh-bookkeeping directory (can be overridden by an environment variable).

Categories and Rules
A standard category system is built in (food and drink, transportation, shopping, etc.). It supports automatic categorization by keywords and allows users to define custom rules (for example, automatically categorizing “coffee beans” as “shopping”).

Reports and Export
It supports viewing income and expense summaries by day, month, or category. It supports exporting to CSV (following the RFC 4180 standard) and self-contained HTML reports.

Monthly Budgets
You can set a monthly budget (global or by category). Warnings are issued when spending reaches 80% of the budget, and prompts are given when the budget is exceeded.

Dual-Mode Operation
The plugin can be integrated into the DSH process as a tool (Tool) callable by the model, or run as a standalone command-line interface (CLI).

Installation and Configuration

Environment Requirements
- Node.js ^22.19.0 || >=24.0.0
- DeepSeek Harness (dsh) installed
- pnpm must be available in the system PATH

Installation Steps
1. Clone or download the plugin source code.
2. Enter the directory and build: npm install && npm run build.
3. Install the plugin into a specified Profile: dsh plugin --profile bookkeeping add <path/to/dsh-bookkeeping>.
4. Start DSH and verify the configuration: dsh --profile bookkeeping --dump-config.

Configuration Example
Configuration is provided through the Profile’s cordis.patch.yml file. The following is an example:

- insert:
    - id: bookkeeping
      name: dsh-bookkeeping
      config:
        dataDir: /var/data/bookkeeping   # 可选,默认 ~/.dsh-bookkeeping
        currency: CNY                    # 可选,默认 CNY
        maxAmount: 1000000000000         # 可选,单笔最大金额(单位)
Key Type Default Meaning
dataDir string ~/.dsh-bookkeeping Database and export directory. Can also be overridden by the environment variable DSH_BOOKKEEPING_DATA_DIR.
currency string CNY Default currency when the amount has no currency symbol.
maxAmount number 1_000_000_000_000 Upper limit for a single amount (unit).

Typical Usage

Chat Mode
In the DSH chat window, the model can call the tool directly:

User: Record a lunch expense of 35
User: Spent 28 on a taxi yesterday
User: How much have I spent on food and drink?
User: Export csv
User: Set this month’s budget to 5000

CLI Mode
Run it directly from the command line without a DSH process:

# 记账
node dist/src/cli.js add 35 午饭
node dist/src/cli.js add "¥500" 工资 --type income --date 昨天

# 列表查询
node dist/src/cli.js list --month 2026-08

# 报表
node dist/src/cli.js report category --month 2026-08
node dist/src/cli.js report trend --months 6

# 导出
node dist/src/cli.js export csv --out ./out

# 预算管理
node dist/src/cli.js budget set 5000           # 设置本月总预算
node dist/src/cli.js budget set 1500 --category 餐饮 # 设置分类预算

# 自定义分类规则
node dist/src/cli.js rules add 咖啡豆 购物

# 删除记录
node dist/src/cli.js remove 12

Data and Limitations

Data Storage
The database file is ledger.db. The main tables include entries (record details), category_rules (custom rules), budgets (budgets), and meta (metadata).

Amount Limits
- Amounts must be positive; zero and negative values are rejected.
- Supported currency symbol mappings: ¥/¥->CNY, $->USD, €->EUR, £->GBP, ₩->KRW.
- Amounts must be integer cents (decimal places must not exceed the range supported by the currency, e.g., CNY/USD has 2 decimal places, JPY/KRW has 0).

Date Range
Supported date parsing range: 1900-2100. Relative time is supported (today, yesterday, day before yesterday, N days ago, etc.), including Chinese/English relative terms.

Exit Codes
Exit codes for the CLI tool: 0 (success), 1 (domain error, such as invalid amount), and 2 (usage error).

Applicable Scenarios and Notes

Applicable Scenarios
- Developers who need agents to handle personal financial records.
- Developers who need a lightweight local bookkeeping solution and want to leverage the DSH ecosystem.

Notes
- The plugin runs with the permissions of the current DSH process; ensure that the installed source code is secure.
- Amount and date parsing have strict limits; out-of-range input will be rejected.
- Data is stored locally; remember to back up the ledger.db file.

This plugin belongs to the DSH ecosystem and has no affiliation with DeepSeek or High-Flyer. For more details and source code, please refer to the plugin directory page or the GitHub repository.

GitHub repository
Plugin directory page