ScriptsMay 20, 2026·3 min read

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 ready

This asset can be read and installed directly by agents

TokRepo exposes a universal CLI command, install contract, metadata JSON, adapter-aware plan, and raw content links so agents can judge fit, risk, and next actions.

Native · 98/100Policy: allow
Agent surface
Any MCP/CLI agent
Kind
Skill
Install
Single
Trust
Trust: Established
Entrypoint
Beancount Bookkeeping
Universal CLI install command
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

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets