Cette page est affichée en anglais. Une traduction française est en cours.
ScriptsMay 20, 2026·3 min de lecture

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.

Prêt pour agents

Cet actif peut être lu et installé directement par les agents

TokRepo expose une commande CLI universelle, un contrat d'installation, le metadata JSON, un plan selon l'adaptateur et le contenu raw pour aider les agents à juger l'adaptation, le risque et les prochaines actions.

Native · 98/100Policy : autoriser
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
Beancount Bookkeeping
Commande CLI universelle
npx tokrepo install 13e62947-5426-11f1-9bc6-00163e2b0d79

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

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.