hledger

simonmichael · simonmichael.hledger

Robust, fast, intuitive plain text accounting tool with CLI, TUI and web interfaces.

hledger is lightweight, cross platform, multi-currency, double-entry accounting software. It lets you track money, investments, cryptocurrencies, invoices, time, inventory and more, in a safe, future-proof plain text data format with full version control and privacy.

winget install --id simonmichael.hledger --exact --source winget

Latest 1.52

Release Notes

Release notes Preserve cost basis syntax, cost basis export examples, faster valuation, commodity tags, more robust paging, fixes.

hledger 1.52 Features

  • aregister and register now support --drop for trimming leading account name components, like the balance command. (Caleb Maclennan)
  • print now preserves and reproduces Ledger-style lot syntax (cost basis annotations) in text and json output, and (converted to Beancount syntax) in beancount output.
  • Tags can now be declared on commodities, and you can query for postings by their commodity's tags.
  • A new Gain (G) account type has been added, as a subtype of Revenue. Certain account names, like income:gains, revenue:capital-gains, income:losses, are auto-detected as Gain type. This provides a language-independent way of matching capital gain/loss accounts specifically. (It is used more in hledger 2.) (g. nicholas d'andrea) #2522 Fixes
  • The add and import commands once again read all -f files, not just the first. This fixes a regression in 1.51.2 which broke autocompletion in add, and multi-file reading in import, when multiple -f options were given. #2553
  • In balance reports, accounts revealed by --empty --declared now respect account display order, instead of being shown last. (Juliano Solanho) #2564
  • balance --budget's csv/tsv output now properly suppresses digit group marks (eg thousands separators), preserving valid CSV structure. #2555
  • The run command now properly returns a non-zero exit code if there's an error while commands are being provided on standard input. (Previously it always returned exit code 0 in this mode.) #2557
  • Options requiring a value (like --round or -f) now give a clear error if the value is missing (rather than trying to consume a following flag). #2556
  • Postings generated by --infer-equity no longer inherit the source posting's tags, comment, or real/virtual type. (The posting's date and status are still inherited.) #2535

Improvements

  • When converting to value, price lookups are now optimised with pre-built indexes. This replaces O(n log n) re-sorting on every valuation date with O(log n) indexed lookups, significantly improving performance for --value=end,COMM with daily reports over long periods and large price databases. (Oleg Bulatov) #2511
  • date: queries can now include a report interval, eg date:weekly or date:'weekly from last month', like the -p/--period option.
  • Smart dates now understand last|this|next WEEKDAY and last|this|next MONTHNAME.
  • When add or import are autocreating a requested journal file that did not exist, they will also create any required parent directories.
  • The less pager is now invoked more robustly; we catch and report more kinds of failure clearly, and/or fall back to unpaged output with a warning. #2544
  • The --quit-at-eof flag is no longer added when running the less pager (and our less flags are better documented).
  • Improvements to the setup command:
    • improve top info's layout
    • show the OS version, architecture, and compiler version
    • show if hledger is wrongly built without OS thread support
    • show the value of $LESS more accurately
    • test that it runs with the configured options
    • print a warning before making a http request
    • show more compact output if the http request fails Docs
  • Account tags: new separate section
  • COMMON TASKS: Setting LEDGER_FILE: updates
  • Cost basis / lot syntax: new section and edits
  • Costs: rewrite
  • csv: if: field matchers: clarify
  • Inferring equity conversion postings: note account tags limitation
  • journal: code: mention valid characters, recommend tags #2563
  • Regular expressions: note no lazy quantifiers
  • Tag names: clarify --verbose-tags Examples
  • csv: Fidelity, Open Collective updates
  • csv: Interactive Brokers example CSV rules files #2508 (Ilja Kocken)
  • csv/cctax: notes and sample files related to exporting to cryptocurrency tax calculators
  • debconf: DebConf ledger files 2017-2025, adapted for hledger
  • investing/export-lots-workflow: doc and examples for exporting to Beancount, Ledger or rustledger for lots/gains calculation Scripts/addons
  • bashrc: drop clashy month aliases; fix LEDGER_FILE typo; cleanup.
  • fix compilation errors in bin/ scripts (Dmitry Astapov) #2497
  • hledger-smooth: accept ACCTPAT, matching case-insensitively as infix (like aregister).
  • hledger-fancyassertions: use showMixedAmount for properly formatted output. (Joshua Chapman)
  • ledgereval: evaluate Ledger value expressions at the command line

hledger-ui 1.52 Fixes

  • List screens with no items now correctly appear empty on all platforms. (An unguarded division by zero was disrupting the display on non-ARM machines.) (Tuong Nguyen Manh, Simon Michael) #2476, #2550
  • The less pager (used for displaying help, eg) is now invoked more robustly; we catch and report more kinds of failure clearly. #2544

Improvements

  • New capital J/K keybindings move down/up 10 rows at a time. (Rahul Shankar V, Simon Michael) #1911, #2551
  • The default theme has been renamed to light. (Rahul Shankar V, Simon Michael) #2168, #2551
  • The selection colour has been changed to cyan, for better visibility in typical terminals. (Rahul Shankar V, Simon Michael) #2175, #2551

hledger-web 1.52 Fixes

  • The less pager (used for displaying help, eg) is now invoked more robustly; we catch and report more kinds of failure clearly. #2544

Docs

  • openapi.yaml (the OpenAPI spec for hledger-web's JSON API) has been updated. (n0vdd)

project changes 1.52 Doc updates

  • ACHIEVEMENTS, ANNOUNCE, README, REGRESSIONS, RELEASING
  • Github issue template improvements Infrastructure/tools
  • fix URLs in github test binaries release doc
  • github issue templates updated
  • Justfile scripts
    • specify and require (newish) bash as default shell #2527
    • depend less on ghc in PATH
    • add compile.sh to build Haskell scripts
    • just ghrel-bin-upload -> ghrel-upload, fix
    • just google-search-console
    • just perfhelp (Simon Michael, Marko Kocić)
    • just perftest
    • just test: run doctests last to reduce double compilation (Marko Kocić) #2528
    • just tools
    • replace gsed with sed (Marko Kocić)
  • github workflows
    • binaries-windows: update for new GHC
    • binaries-linux: caching, cleanup improvements
    • nightly -> testbin
    • ensure linux binary uses fixed haskeline #2410
    • testbin: update, use testlatest tag / testbin branch

credits 1.52 Simon Michael, Caleb Maclennan, Dmitry Astapov, Marko Kocić, RahulShankarV52, Tuong Nguyen Manh, Ilja Kocken, Jens Petersen, Joshua Chapman, Juliano Solanho, Oleg Bulatov, g. nicholas d'andrea, n0vdd.

Install For all install options, see hledger.org: Install. You can install hledger from most package managers (but check for a green badge indicating it's up to date). Or you can build it from source yourself. Or you can install up to date binaries from this page, by following the appropriate instructions below. If you find problems with these instructions, please let us know. Updates to binaries:

  • 2026-01-12: Fixed the hledger-linux-x64.tar.gz asset below, it previously contained a dev build. #2526

All platforms If you have eget, that's a convenient way to download the right binaries for your machine: eget simonmichael/hledger --all Otherwise:

GNU/Linux, 64-bit Intel At the command line: curl -fLOC- https://github.com/simonmichael/hledger/releases/download/1.52/hledger-linux-x64.tar.gz | tar -xzv -f- -C/usr/local/bin hledger hledger-ui hledger-web hledger --version; hledger-ui --version; hledger-web --version # should show 1.52

Mac, 64-bit ARM or Intel In a terminal window (don't download the binaries with your web browser, they won't get authorised): On ARM macs: curl -fLOC- https://github.com/simonmichael/hledger/releases/download/1.52/hledger-mac-arm64.tar.gz | tar -xzv -f- -C/usr/local/bin hledger hledger-ui hledger-web hledger --version; hledger-ui --version; hledger-web --version # should show 1.52 On Intel macs: curl -fLOC- https://github.com/simonmichael/hledger/releases/download/1.52/hledger-mac-x64.tar.gz | tar -xzv -f- -C/usr/local/bin hledger hledger-ui hledger-web hledger --version; hledger-ui --version; hledger-web --version # should show 1.52

Windows, 64-bit ARM or Intel In a powershell window (press WINDOWS-R, powershell, ENTER): cd ~ curl https://github.com/simonmichael/hledger/releases/download/1.52/hledger-windows-x64.zip -OutFile hledger-windows-x64.zip Expand-Archive hledger-windows-x64.zip -Force -DestinationPath AppData\Roaming\local\bin hledger --version; hledger-ui --version; hledger-web --version # should show 1.52

Windows 7, 64-bit Intel These instructions have not been tested recently, please let us know if they work for you:

  • click hledger-windows-x64.zip below
  • choose Open with Windows Explorer, OK
  • click Extract all files
  • choose a destination folder - ideally one that appears in echo %PATH%, like C:\Windows (though that one will require administrator permission); otherwise, your home directory (C:\Users\YOURNAME)
  • check "Show extracted files when complete"
  • click Extract, wait for the destination folder to open
  • find the hledger, hledger-web icons (if you extracted to \Windows, you'll need to scroll down)
  • for each icon: double-click, uncheck "Always ask before opening this file", click Run
  • close those Explorer windows
  • open a command window (press Windows-r, type CMD, press enter)
  • hledger --version; hledger-ui --version; hledger-web --version should show 1.52
  • echo # >> .hledger.journal to ensure a default journal file exists. (Important: the doubled >> is needed to avoid overwriting existing data.) Problems:
  • Starting hledger by double-clicking its icon won't work because it needs arguments; run it from the command window instead.
  • Starting hledger-web by double-clicking its icon may fail eg because Explorer's command window is too small; configure that to be larger, or run hledger-web from a command window instead.

Installer type: zip

Architecture Scope Download SHA256
x64 Download 3AD0DC01299CE40588C0382AC8B67D59CC1B6B2B758B8245A552EB94FE8D2A70

Details

Homepage
https://github.com/simonmichael/hledger
License
GPL-3.0
Publisher
simonmichael
Support
https://hledger.org/support.html
Moniker
hledger

Tags

accountingbountiesbountycommand-line-toolconsole-applicationfinancehaskellhaskell-applicationledgerplain-textplain-text-accountingplaintextplaintext-accountingtuiweb-application

Older versions (19)

1.51.2
Architecture Scope Download SHA256
x64 Download 10B7DA22A2893065159FCB28325CCED05C63D745E20B48E26ECFA9E9B8F711F0
1.51.1
Architecture Scope Download SHA256
x64 Download 8FAEC443FAA955C8FD78A846B35803726C78B74E43122777FD960784FC980781
1.51
Architecture Scope Download SHA256
x64 Download E34C3B8C88A00F59EF71E461D18F240A79D9D16A9C354751051B117B0C62EF46
1.50.5
Architecture Scope Download SHA256
x64 Download 79157A87BD3DC01C567D47CAFF08768227A5D74BDA74C18B39EF16B5AD8F9764
1.50.4
Architecture Scope Download SHA256
x64 Download BBD51598C9D09F4727834B1B5A249379C115D2D710E123F7ADDD8EDDBAA33EE8
1.50.3
Architecture Scope Download SHA256
x64 Download C3ACFF2EF6831D5AF4FED6C8EE2829632F8072FE40871ECABB61E087D46804FD
1.50.2
Architecture Scope Download SHA256
x64 Download 97A35522D2C6232989D85832C42F5F5359C09D95A2DA741425D768C98E6FA38A
1.50.1
Architecture Scope Download SHA256
x64 Download DFDDDA92B0DA578CE65499407D86B570D1A96A05E237B57AF6C1BBF8BA2F5BE7
1.50
Architecture Scope Download SHA256
x64 Download 210188D1D526AEFDA572A473C7C03A16910504A0FE0D655DAAD98D4C1E518427
1.43.2
Architecture Scope Download SHA256
x64 Download 2281A04EE0313C84430FC6D1BF8323B061CA0C3E4B2176D7EDF2F7568FE539B1
1.43.1
Architecture Scope Download SHA256
x64 Download 84E78880BC0FB0977BA36B103786ABEBB619D37A0256D087C8E18C56D5FDED32
1.42.1
Architecture Scope Download SHA256
x64 Download 6A62E3DC9FFE92F122D6ADBDCA7392ACFD4E65F4BBF0711625FD5F7B7E35E0C9
1.40
Architecture Scope Download SHA256
x64 Download 666BBBF2228DC1CAA492F4A0917988CCF33CC297030EA1FB43328C0D39E6A13C
1.34
Architecture Scope Download SHA256
x64 Download 7F99D34F89611143103D760EBF3E45482AD56A32101B5B1EF8917CDE9213D2CB
1.33.1
Architecture Scope Download SHA256
x64 Download 657A63FDAF51E7DC26DA65705192D9F67E089449B756241D52AC3E65D0D3CA1E
1.30
Architecture Scope Download SHA256
x64 Download 2F31DE09E050912ABF019BC8BA32F5C01F06D259ADBC4CD21E7A916AC6F288D1
1.29.2
Architecture Scope Download SHA256
x64 Download e47dc6536c41acd09e724e5591197ac320a4d529c029d9c54bfba38ae12529af
1.28
Architecture Scope Download SHA256
x64 Download F04AFA61E736DE18CB7418913662B8B7B7D298B4C67AE96B0ED2538F34AA8005
1.27.1
Architecture Scope Download SHA256
x64 Download 2467EBDB60C89A6877B735EC34DB05D8BF95BF051D38DD4394860BF9EFC79F90