
Beancount
CLI用文本文件记录复式记账交易的记账语言与工具集:bean-check 校验账本、bean-format 统一格式,配合 Fava、beanquery 出报表与查询;账本是纯文本,便于 agent 生成和版本管理。
======================================================== beancount: Double-Entry Accounting from Text Files
.. contents:: .. 1 Description 2 Documentation 3 Download & Installation 4 Versions 5 Filing Bugs 6 Copyright and License 7 Donations 8 Sincerely, thank you. 9 Author
Description
A double-entry bookkeeping computer language that lets you define financial transaction records in a text file, read them in memory, generate a variety of reports from them, and provides a web interface.
Documentation
Documentation can be found at:
https://beancount.github.io/docs/
Documentation authoring happens on Google Docs, where you can contribute by requesting access or commenting on individual documents. An index of all source documents is available here:
http://furius.ca/beancount/doc/index
There's a mailing-list dedicated to Beancount <https://groups.google.com/forum/#!forum/beancount>. Please post questions
there, so others can share in the responses. More general discussions about
command-line accounting also occur on the Ledger mailing-list <https://groups.google.com/forum/#!forum/ledger-cli> so you might be
interested in that group as well.
Download & Installation
You can obtain the source code from the official Git repository on Github:
| https://github.com/beancount/beancount/
See Installing Beancount__ for more details.
__ http://furius.ca/beancount/doc/install
Versions
There are three versions
-
Version 3 (
branch v3 <http://github.com/beancount/beancount/tree/v3>_): The current stable version of Beancount since June 2024. Use this. Note that this version is trimmed down from v2 and most of the tools the v2 branch included have been moved to their own independent projects on Github. -
Version 2 (
branch v2 <http://github.com/beancount/beancount/tree/v2>_): The previous stable version of Beancount, in maintenance mode from 2020 until 2024 and now frozen and obsolete. This was a complete rewrite of the first version, which introduced a number of constraints and a new grammar and much more. -
Version 1 (
branch v1 <http://github.com/beancount/beancount/tree/v1>_): The original version of Beancount. Development on this version halted in 2013. This initial version was intended to be similar to and partially compatible with Ledger. Do not use this.
Filing Bugs
Tickets can be filed at on the Github project page:
https://github.com/beancount/beancount/issues
Copyright and License
Copyright (C) 2007-2025 Martin Blais. All Rights Reserved.
This code is distributed under the terms of the "GNU GPLv2 only". See COPYING file for details.
Donations
Beancount has found itself being useful to many users, companies, and foundations since I started it around 2007. I never ask for money, as my intent with this project is to build something that is useful to me first, as well as for others, in the simplest, most durable manner, and I believe in the genuinely free and open stance of Open Source software. Though its ends are utilitarian - it is about doing my own accounting in the first order - it is also a labor of love and I take great pride in it, pride which has pushed me to add the polish so that it would be usable and understandable by others. This is one of the rare areas of my software practice where I can let my desire for perfection and minimalism run untamed from the demands of time and external constraints.
Many people have asked where they can donate for the project. If you would like to give back, you can send a donation via Wise (preferably):
https://wise.com/share/martinb4019
or PayPal at:
https://www.paypal.com/paypalme/misislavski
Your donation is always appreciated in any amount, and while the countless hours spent on building this project are impossible to match, the impact of each donation is much larger than its financial import. I truly appreciate every person who offers one; software can be a lonely endeavour, and those donations as well as words of appreciation keep reminding me of the positive impact my side projects can have on others. I feel gratitude for all users of Beancount.
Thank you!
Author
Martin Blais blais@furius.ca
相關資源

hledger
CLI纯文本复式记账工具:记录收支、投资与工时,一条命令生成资产负债表、利润表与预算报表,支持 CSV 导入和 JSON 输出,便于 agent 对账出报表;可与 Beancount 账本互转。
hledgerorg/hledger4.8k
rustledger
CLIBeancount 纯文本复式记账的 Rust 实现,命令是 rledger:校验账本、跑 BQL 查询、出资产负债表与收支表,能导入银行 CSV/OFX 对账单、对比预算、计算投资收益和资本利得;另有 MCP 服务,GitHub 发行包还附带输出 JSON 的 ag-rledger,便于 agent 调用。账本需是 Beancount 格式,报表与涉税数字需会计复核。
rustledger/rustledger409
Ledger
CLI经典的纯文本复式记账命令行工具:账目写在文本文件里,直接生成余额、明细、预算等报表,没有数据库和隐藏状态,方便 agent 读写账本、对账和出报表。
ledger/ledger6.1k
hledger-flow
CLIhledger 的自动记账流程工具:把银行、信用卡导出的 CSV 对账单按固定目录归档,套用分类规则一键生成账本,改规则后可重新生成,适合会计批量整理流水。需先安装 hledger,再从 Releases 页面下载程序(仅 macOS、Linux);账目结论需会计复核。
apauley/hledger-flow219
beanquery
CLIBeancount 官方账本查询工具 bean-query,用类 SQL 语句查询纯文本复式账本,出余额、收支分类汇总和账户明细,适合会计让 agent 核对账目、整理报表。需 uv 或 Python 3.8+ 和 Beancount 格式账本;报表结论需会计复核。
beancount/beanquery65
OpenBB Platform CLI
CLIOpenBB 开源投资研究平台的命令行版,在终端查询股票行情、财报、宏观经济等金融数据,可用 Routine 脚本批量自动取数。官方维护,部分数据源需自备 API Key。
OpenBB-finance/OpenBB74.3k