hledger-textual
A full-featured terminal user interface for hledger plain-text accounting. Manage transactions, recurring rules, budgets, and investments — with multi-period reports, account drill-downs, and git sync — all from your terminal.
Built with Textual and Python.
✨ Feature highlights
- 📊 Multi-period reports — monthly, quarterly, yearly, and custom ranges, with charts
- 🔁 Recurring transaction rules with calendar view and one-shot generation
- 💰 Budgets with overview screen and per-category drill-down
- 📥 CSV import wizard with separator/header detection and rule editor
- 📈 Investment tracking with cost basis and market value conversion
- 🔄 Git sync and cloud sync support for the journal
- 🧩 Custom report builder with saved filters
- 🏦 Account hierarchy with directives (notes, metadata)
- 📄 PDF / CSV export of every view
Why hledger-textual?
hledger-textual is the most advanced TUI in the hledger ecosystem, with feature parity for budgets, recurring transactions, investments, and reports. Everything lives in plain-text files you already own — the journal, a budget.journal for budgets, CSV rules for imports — so no database, no lock-in, and git-friendly versioning of your finances.
Stack
- Python 3.12+
- Textual - TUI framework
- hledger - plain-text accounting (must be installed separately)
- uv - package manager (no
requirements.txtneeded, dependencies are inpyproject.toml) - pytest - testing
Requirements
- Python 3.12+
- hledger installed and available in
PATH
⚡ Performance
hledger-textual launches independent hledger queries concurrently (with a
global cap so large journals cannot exhaust CPU or memory), caches results
until the journal or one of its include files changes, paints the Summary
cards before preloading the rest, loads the investment portfolio with a single
balance -O json query, and updates report tables incrementally. A
persistent disk cache makes restarting on an unchanged journal effectively
instant.
Measured on an Apple M4 (10 cores), macOS, Python 3.12, Textual 8.2.8 and hledger 1.52, with journals generated by the bundled script:
| Metric | 10k txns | 50k txns | 100k txns |
|---|---|---|---|
| Summary ready, before (all sections) | 2.95 s | 13.11 s | 25.97 s |
| First Summary figures (cards), after | 0.56 s | 2.22 s | 4.75 s |
| All Summary sections, after | 0.85 s | 3.54 s | 7.61 s |
| All tabs preloaded in background, after | 1.38 s | 6.37 s | 12.82 s |
| Summary refresh (cache warm), before | 1.50 s | 6.70 s | 13.90 s |
| Summary refresh (cache warm), after | 0.07 s | 0.10 s | 0.15 s |
| Reload Summary after a journal change, after | 0.78 s | 3.61 s | 7.66 s |
| Reload Transactions after a journal change, after | 0.41 s | 1.63 s | 3.30 s |
| Restart with warm disk cache (Summary) | 0.19 s | 0.20 s | 0.26 s |
| Restart with warm disk cache (all tabs preloaded) | 0.19 s | 0.26 s | 0.35 s |
The Summary shows its cards as soon as the first queries return; the portfolio, breakdown tables and the other tabs keep loading in the background behind a spinner that also displays elapsed seconds.
The persistent cache lives under the platform cache directory
(~/Library/Caches/hledger-textual on macOS, $XDG_CACHE_HOME/hledger-textual
on Linux). Entries are keyed by the hledger arguments, the journal and every
include file, the hledger version and the calendar date. Outputs larger than
8 MiB are not stored, and the cache is pruned to 512 entries / 128 MiB. Set
HLEDGER_TEXTUAL_NO_DISK_CACHE=1 to disable it, or
HLEDGER_TEXTUAL_CACHE_DIR=/path to move it. The first run after a journal
change pays the usual load plus a small write overhead (<10%); every later
start reads the cached output instead of re-parsing the journal.
Absolute timings depend on hardware, disk and journal shape; the ratios are what matters. Reproduce them with:
# Generate a deterministic synthetic journal and benchmark it
uv run python scripts/benchmark_perf.py --transactions 50000 --repeat 2
# Measure a restart served by the persistent disk cache
uv run python scripts/benchmark_perf.py --transactions 100000 --disk-cache
# Or benchmark an existing journal and save JSON for comparison
uv run python scripts/generate_synthetic_journal.py -n 100000 -o /tmp/100k.journal
uv run python scripts/benchmark_perf.py --journal /tmp/100k.journal --output perf.json
The benchmark reports startup, tab switches, cold reloads after a simulated journal change, and cold/warm timings for the main hledger loaders. It exits non-zero only on measurement errors; compare its JSON output across commits.
Installation
# With pipx
pipx install hledger-textual
# With uv
uv tool install hledger-textual
Usage
hledger-textual -f path/to/your.journal
The journal file is resolved in this order:
-f/--fileCLI argumentLEDGER_FILEenvironment variable~/.config/hledger-textual/config.toml(journal_filekey)~/.hledger.journal
Default currency
For multi-currency journals, the default currency is resolved in this order:
- The first
commoditydirective declared in the journal (followingincludefiles), e.g.commodity €1,000.00. - The
default_commoditykey in~/.config/hledger-textual/config.toml.
When resolved, the Accounts and Summary views convert balances to that
currency using hledger -X --infer-market-prices, so P price directives in
the journal are honored (see examples/multicurrency-prices.journal).
Commodities without a price are shown in their original currency, and the
Summary's Income / Expenses / Liabilities breakdowns show — instead of a
percentage for them (a note names the excluded commodities). Percentages are
always computed on converted amounts, so rows in different currencies are
never compared one-to-one.
When nothing is resolved, the Accounts view shows each account's balances in
their original currencies (stacked within the cell), the Reports view's flat
multi-period mode marks multi-currency accounts with a ◆ prefix, and the
Summary overview shows a per-currency balance line under each card (marquee
scrolling when it overflows). The Reports view's stacked mode (M) always
expands each currency into its own row. Summary breakdown percentages stay
hidden (—) for journals that mix currencies in that case, since there is no
common denominator; single-currency journals are unaffected.
To pin a currency via config instead:
default_commodity = "€"
Configuration
Full reference: the Wiki documents every option. A minimal ~/.config/hledger-textual/config.toml:
journal_file = "~/finance/all.journal"
default_commodity = "€"
theme = "nord"
# Reorder the tabs (any subset; missing tabs keep their default order)
tab_order = ["summary", "accounts", "transactions", "budget", "recurring", "reports"]
Documentation
See the Wiki for the full documentation: feature overview, configuration, investment tracking, and per-tab reference.
Roadmap
Planned work is tracked as enhancement issues — vote, comment, or pick one up.
Contributing
Contributions are welcome! See CONTRIBUTING.md for the development setup, test suite, and pull-request flow.
Development
git clone https://github.com/thesmokinator/hledger-textual.git
cd hledger-textual
uv sync
Testing
# Run all tests
uv run pytest
# Run with verbose output
uv run pytest -v
# Run with coverage report
uv run pytest --cov=hledger_textual --cov-report=term-missing
Metadata
Release files for hledger-textual 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hledger_textual-1.0.0.tar.gz | 167.2 kB | With provenance | Details for hledger_textual-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hledger_textual-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for hledger_textual-1.0.0-py3-none-any.whl |
Total release size: 377.7 kB
Release files / hledger_textual-1.0.0.tar.gz
| Download URL | hledger_textual-1.0.0.tar.gz |
|---|---|
| Size | 167.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
31aec1f611ff1c1147e2b7d21fc5ec89d8d4d8057802cf5a4dfa007519e6e56d
|
|
BLAKE2b-256 checksum How to use checksums |
e5457b06293eb2abe0dcf91dbadf39af684aea8ebfc1333fe29961303c0b7e2a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 17, 2026.
Transparency logRelease files / hledger_textual-1.0.0-py3-none-any.whl
| Download URL | hledger_textual-1.0.0-py3-none-any.whl |
|---|---|
| Size | 210.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8af6a971f54df35b2fa5db1ef1d211494b3dddc7e62e06499290aa3a58e1320c
|
|
BLAKE2b-256 checksum How to use checksums |
621632d4e7c687d7927316388e7578c2e66b30d44ce2b8784ff841076b37700b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 17, 2026.
Transparency logSecurity for hledger-textual 1.0.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for hledger_textual-1.0.0.tar.gz
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 Nov 17, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.