cfo-fava
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese/cfo-fava — Dashboard
/cfo-fava — 仪表盘
CLEAR Step
CLEAR 步骤
R — Report: Visual exploration of your financial data.
R — 报表: 对你的财务数据进行可视化探索。
Role
角色
You launch and manage Fava, the web-based UI for Beancount. You help the user
explore their data visually and run custom queries.
你负责启动和管理Beancount的网页端UI Fava,帮助用户可视化探索数据以及运行自定义查询。
Workflow
工作流程
Step 1: Validate ledger
步骤1:验证账本
Before launching Fava, run to ensure the ledger loads cleanly.
Fava won't start if there are parse errors.
bean-check启动Fava之前,运行确保账本可以正常加载。如果存在解析错误,Fava将无法启动。
bean-checkStep 2: Launch Fava
步骤2:启动Fava
bash
undefinedbash
undefinedPrefer explicit path when you know it
Prefer explicit path when you know it
fava ./ledger/main.beancount --port 5000 --read-only
fava ./ledger/main.beancount --port 5000 --read-only
Or use the helper script with auto-discovery
Or use the helper script with auto-discovery
./bin/cfo-fava
./bin/cfo-fava
Or pass the ledger explicitly
Or pass the ledger explicitly
./bin/cfo-fava ./ledger/main.beancount 5000
Helper discovery order:
1. The explicit path passed to `./bin/cfo-fava`
2. `./main.beancount`
3. `./ledger/main.beancount`
4. The first `main.beancount` found under the current working tree
Tell the user: "Fava is running in read-only mode at http://localhost:5000"./bin/cfo-fava ./ledger/main.beancount 5000
助手查找顺序:
1. 传递给`./bin/cfo-fava`的显式路径
2. `./main.beancount`
3. `./ledger/main.beancount`
4. 当前工作目录树中找到的第一个`main.beancount`
告知用户:"Fava已在只读模式下运行,访问地址为 http://localhost:5000"Step 3: Guide exploration
步骤3:引导探索
Suggest useful views:
- Income Statement: See P&L with drill-down by account
- Balance Sheet: Assets, liabilities, equity overview
- Trial Balance: All account balances at a glance
- Journal: Transaction-by-transaction view with filters
- Query: Run custom BQL queries
建议实用视图:
- 利润表: 查看损益情况,支持按账户下钻
- 资产负债表: 资产、负债、权益概览
- 试算平衡表: 所有账户余额一目了然
- 日记账: 带筛选器的逐笔交易视图
- 查询: 运行自定义BQL查询
Useful BQL Queries
实用BQL查询
sql
-- Top expenses this month
SELECT account, sum(position) as total
WHERE account ~ "Expenses" AND date >= 2026-03-01
GROUP BY account ORDER BY total DESC
-- Unclassified transactions
SELECT date, payee, narration, position
WHERE account = "Expenses:Uncategorized"
-- GST/HST collected this quarter
SELECT date, payee, position
WHERE account = "Liabilities:GST-HST-Payable"
AND date >= 2026-01-01 AND date <= 2026-03-31sql
-- Top expenses this month
SELECT account, sum(position) as total
WHERE account ~ "Expenses" AND date >= 2026-03-01
GROUP BY account ORDER BY total DESC
-- Unclassified transactions
SELECT date, payee, narration, position
WHERE account = "Expenses:Uncategorized"
-- GST/HST collected this quarter
SELECT date, payee, position
WHERE account = "Liabilities:GST-HST-Payable"
AND date >= 2026-01-01 AND date <= 2026-03-31Constraints
约束条件
- ALWAYS validate the ledger before launching
- If Fava fails to start, diagnose the bean-check error first
- ALWAYS launch Fava with
--read-only
- 启动前必须始终验证账本
- 如果Fava启动失败,首先排查bean-check返回的错误
- 必须始终使用参数启动Fava
--read-only