Skip to main content

Fava Account Maintenance

Fava Account Maintenance is a read-only Fava extension for understanding a large Beancount chart of accounts. It combines an account tree with operational views for dormant or unused accounts, account lifecycle, historical boundaries, Pad usage, and temporary buffer accounts.

The report UI is currently written in Traditional Chinese. The source and the example ledger contain only synthetic account names and amounts.

What it shows

  • A collapsible tree built from the ledger's Assets, Liabilities, and Equity roots.
  • Open, closed, future, unused, dormant-zero, and dormant-nonzero accounts.
  • Activity includes ordinary transaction postings and Balance assertions. Future-dated Balance assertions count as maintenance activity without changing the report's as-of inventory or price calculations.
  • Whether an account explicitly started at zero, was seeded from Equity, or began with Pad.
  • Late or repeated Pad directives that may indicate a historical gap.
  • Configurable investment, buffer, and Equity-role conventions.

The extension does not edit the ledger and does not make network requests.

Compatibility

Version 0.2.2 is tested with Fava 1.30.12, Beancount 3.2, and Python 3.12. The dependency is intentionally limited to Fava 1.30.x until newer versions are tested. Fava describes its extension API as unstable, so test upgrades before deploying them to a production ledger.

Install

Install the package into the same Python environment that runs Fava:

python -m pip install fava-account-maintenance

If Fava was installed with pipx, inject the extension into that environment:

pipx inject fava fava-account-maintenance

To install a tagged GitHub version directly:

python -m pip install \
  "git+https://github.com/hsiuhsiu/fava-account-maintenance.git@v0.2.2"

For a local checkout:

python -m pip install ./fava-account-maintenance

Then enable the extension in the main Beancount file:

2000-01-01 custom "fava-extension" "fava_account_maintenance"

Fava also searches the directory containing the main Beancount file. For a drop-in installation, copy the complete fava_account_maintenance package directory next to that file; keep UpdateGuidance.js and the templates directory inside the package.

Docker

The extension and ledger can remain in separate repositories. Mount the source directory read-only and add it to PYTHONPATH:

services:
  fava:
    volumes:
      - ./ledger:/ledger
      - ./fava-account-maintenance/src:/extensions:ro
    environment:
      PYTHONPATH: /extensions

Recreate the container after changing the extension version. A production image can instead install a tagged release during its build.

Ledger metadata

2020-01-01 open Assets:Household:Checking:Example USD
  nickname: "Daily checking"
  purpose: "Household cash flow"

Supported open metadata:

Key Meaning
nickname Short label displayed beside the full account name.
purpose Reminder of why the account exists.
maintenance_kind Overrides the account-kind component for this account.
maintenance_buffer TRUE or FALSE override for buffer detection.
maintenance_role Equity role override; see the configuration section.

For example:

2020-01-01 open Equity:Opening-Balances
  maintenance_role: "opening_history"

2020-01-01 open Assets:Household:Clearing:Transfers USD
  maintenance_buffer: TRUE

Extension configuration

Configuration is optional. Fava passes the last string in the custom directive as a Python-literal mapping:

2000-01-01 custom "fava-extension" "fava_account_maintenance" "{'dormant_days': 180, 'buffer_components': ['Buffer', 'Clearing'], 'equity_roles': {'Equity:Opening-Balances': 'opening_history'}, 'source_mode': 'basename'}"
Option Default Meaning
dormant_days 365 Inactivity threshold for dormant accounts.
kind_component_index 2 Zero-based account component used as kind; Assets is component 0.
investment_kinds common investment labels Kinds whose commodity balances and prices are checked individually.
buffer_components ['Buffer'] Exact account components treated as temporary buffers.
equity_roles {} Account-prefix to Equity-role mapping. Longest prefix wins.
source_mode 'basename' Source display: 'hidden', 'basename', or 'relative'.
source_root unset Root removed from source paths in 'relative' mode.

Allowed Equity roles are technical, modeled_asset, opening_history, untraceable, dust, revaluation, buffer, and other.

The default kind index works for both Assets:Bank:Checking and Assets:Owner:Checking:Bank. Use maintenance_kind when a particular account does not follow the general convention.

Privacy and deployment boundary

The repository does not need, include, or transmit a ledger. At runtime, however, the report necessarily sends its derived model to the browser. That model includes account names, native-currency inventories, lifecycle and activity dates, Pad sources, counterpart accounts, and—unless hidden—source basenames and line numbers.

Therefore:

  • Protect the Fava instance with the same care as the ledger.
  • Do not publish a saved report page, browser archive, screenshot, cache, or application log made from a real ledger.
  • Do not expose the Fava server directly to the public internet.
  • Use {'source_mode': 'hidden'} if source locations are not useful.

The source-path formatter never returns an absolute path. In relative mode, paths outside source_root fall back to their basename. These settings control this extension's model only; Fava itself may expose ledger filenames in its standard page data, which is another reason the Fava instance must remain private.

Development

python -m venv .venv
. .venv/bin/activate
python -m pip install -e ".[dev]"
ruff check .
pytest
python -m build

The wheel must contain both UpdateGuidance.js and templates/UpdateGuidance.html; Fava loads those files directly without a Node build step.

License

MIT

Metadata

Release files for fava-account-maintenance 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fava-account-maintenance 0.2.2
File Size Uploaded
fava_account_maintenance-0.2.2.tar.gz 26.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fava-account-maintenance 0.2.2
File Interpreter ABI Platform
fava_account_maintenance-0.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 46.2 kB

Release files / fava_account_maintenance-0.2.2.tar.gz

Download URL fava_account_maintenance-0.2.2.tar.gz
Size 26.1 kB
Tags Source
SHA-256 checksum
How to use checksums
505a1ae835a71a8597a8c000921bcb1b82187cff2db5e866905ecb5923a1c2a6
BLAKE2b-256 checksum
How to use checksums
5e6a11a0f2b34738adafaf74853c944bb90b28c1474e10fa5070a27a1532b2b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.

Transparency log

Release files / fava_account_maintenance-0.2.2-py3-none-any.whl

Download URL fava_account_maintenance-0.2.2-py3-none-any.whl
Size 20.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5e40685077e63602f68baf1f9c23654f4b62696f13b2b475861adb68b6bf49c3
BLAKE2b-256 checksum
How to use checksums
bdf91681cd90cc22af313035c12d7c8d6476d02fb7a445189c51ff79c82061b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.

Transparency log

Release history Release notifications | RSS feed

0.3.0

2 release files

This release

0.2.2 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page