Skip to main content

One post tagged with "software migration"

View All Tags

Beancount v3: What's New?

· 3 min read
Mike Thrift
Mike Thrift
Marketing Manager

Beancount version 3, released in mid-2024, marks a significant architectural evolution for the popular plain-text accounting tool. While it maintains backward compatibility for user ledger files, the underlying structure and accompanying tools have undergone substantial changes. Here’s a breakdown of what’s new in Beancount v3.

A More Modular and Streamlined Architecture

2025-06-06-whats-new-in-beancount-v3

The most significant change in Beancount v3 is the move to a more modular ecosystem. Several key functionalities that were previously bundled with the core have been spun off into separate, independent projects. This makes the core of Beancount leaner and allows for more focused development on individual components.

The key components that are now separate packages include:

  • beanquery: The powerful SQL-like query tool for your ledger files is now in its own package.
  • beangulp: This is the new home for the data importing framework, replacing the former beancount.ingest module.
  • beanprice: A dedicated tool for fetching prices of commodities and stocks.

This separation means that users will need to install these packages in addition to beancount itself to retain the full functionality they were used to in version 2.

Changes to Command-Line Tools and Workflows

Reflecting the new modular architecture, there are some notable changes to the command-line tools:

  • bean-report is gone: This tool has been removed. Users are now encouraged to use bean-query (from the beanquery package) for their reporting needs.
  • New Importer Workflow: The bean-extract and bean-identify commands have been removed from the core. The new approach with beangulp is script-based. Users will now create their own Python scripts to handle the importing of data from external sources like bank statements.

Syntax and Feature Enhancements

While the core accounting principles remain the same, Beancount v3 introduces some welcome flexibility to its syntax:

  • More Flexible Currency Codes: The previous restrictions on the length and characters for currency names have been relaxed. Single-character currency symbols are now supported.
  • Expanded Transaction Flags: Users can now use any capital letter from A to Z as a flag for transactions, allowing for more granular categorization.

Importantly, these changes are backward-compatible, so your existing Beancount v2 ledger files will work without any modifications.

The C++ Rewrite and Performance

One of the long-term goals for Beancount has been a rewrite of its performance-critical components in C++. While this work is ongoing, the initial release of Beancount v3 does not include the C++-based core. This means that for now, the performance of v3 is comparable to v2. The C++ code remains in a separate development branch for future integration.

Migrating from v2 to v3

For most users, the migration from Beancount v2 to v3 is relatively straightforward:

  1. Ledger Files: No changes are needed for your .beancount files.
  2. Installation: You will need to install the new, separate packages like beanquery and beangulp using pip.
  3. Importer Scripts: If you have custom importers, you will need to update them to use the new beangulp API. This mainly involves changing the base class your importers inherit from and adjusting some method signatures.
  4. Fava: The popular web interface for Beancount, Fava, has been updated to be compatible with v3. Ensure you have the latest version of Fava for a seamless experience.

In essence, Beancount v3 is a foundational release that streamlines the project's architecture, making it more modular and easier to maintain and extend in the long run. While it requires some adjustments to user workflows, especially around data importing, it sets the stage for the future development of this powerful accounting tool.