Skills2026年5月20日·1 分钟阅读

Beancount — Plain-Text Double-Entry Bookkeeping

A Python-based double-entry bookkeeping system that uses plain-text files as the data source, with a focus on correctness, auditability, and extensibility through plugins.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
Beancount Bookkeeping
直接安装命令
npx -y tokrepo@latest install 13e62947-5426-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run 确认安装计划,再运行此命令。

Introduction

Beancount is a double-entry bookkeeping system where financial data lives in plain-text files. Written in Python, it emphasizes correctness through strict validation and offers Fava, a companion web interface, for interactive exploration of financial reports.

What Beancount Does

  • Validates and processes plain-text ledger files with strict double-entry enforcement
  • Generates income statements, balance sheets, and trial balances from transaction data
  • Tracks multiple currencies, commodities, and investment lots with cost basis
  • Provides Fava, a web-based dashboard for browsing accounts, charts, and reports
  • Supports extensibility through Python plugins for custom validation and transformation

Architecture Overview

Beancount parses a ledger file into an in-memory stream of directives (transactions, balance assertions, open/close events). A processing pipeline applies plugins that validate, transform, or augment the directive stream. The output is consumed by reporting tools like bean-report or the Fava web server, which renders interactive dashboards using Flask.

Self-Hosting & Configuration

  • Install Beancount and Fava via pip in a Python virtual environment
  • Store ledger files in a Git repository for version-controlled audit trails
  • Configure operating currency and account hierarchies with option directives
  • Write Python plugins to automate recurring entries or enforce custom rules
  • Run Fava locally or on a server for shared access to financial dashboards

Key Features

  • Strict validation that catches unbalanced transactions and account errors at parse time
  • Fava web interface with interactive charts, account drill-down, and query language
  • Python plugin system for custom importers, transformations, and validation rules
  • Multi-currency support with automatic cost tracking and unrealized gains reporting
  • Deterministic processing: same input always produces the same output

Comparison with Similar Tools

  • Ledger — C++ original with faster parsing; Beancount has stricter validation and Fava web UI
  • hledger — Haskell-based with its own web UI; Beancount offers Python extensibility
  • GnuCash — GUI desktop app; Beancount is text-first with version control integration
  • Firefly III — Web-based personal finance; Beancount is developer-oriented with plain-text storage

FAQ

Q: What is Fava? A: Fava is a web frontend for Beancount that visualizes accounts, balances, and reports in a browser.

Q: Can I import bank statements? A: Yes, Beancount has an importer framework and community tools for converting CSV/OFX to Beancount format.

Q: Is Beancount suitable for business accounting? A: Yes, it handles multi-currency, invoicing workflows, and tax reporting for small businesses.

Q: How does Beancount differ from Ledger? A: Beancount requires accounts to be explicitly opened, enforces stricter balancing rules, and uses Python instead of C++.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产