Release notes
Preserve cost basis syntax, cost basis export examples, faster valuation, commodity tags, more robust paging, fixes.
hledger 1.52
Features
-
aregisterandregisternow support--dropfor trimming leading account name components,
like thebalancecommand.
(Caleb Maclennan) -
printnow 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, likeincome: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
addandimportcommands once again read all-ffiles, not just the first.
This fixes a regression in 1.51.2 which broke autocompletion inadd,
and multi-file reading inimport, when multiple-foptions were given.
#2553 -
In balance reports, accounts revealed by
--empty --declarednow 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
runcommand 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
--roundor-f) now give a clear error if the value is missing
(rather than trying to consume a following flag).
#2556 -
Postings generated by
--infer-equityno 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,COMMwith daily reports
over long periods and large price databases.
(Oleg Bulatov) #2511 -
date:queries can now include a report interval, egdate:weeklyordate:'weekly from last month',
like the-p/--periodoption. -
Smart dates now understand
last|this|next WEEKDAYandlast|this|next MONTHNAME. -
When
addorimportare 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-eofflag is no longer added when running the less pager (and our less flags are better documented). -
Improvements to the
setupcommand:- 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 (likearegister).hledger-fancyassertions: useshowMixedAmountfor 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/Kkeybindings move down/up 10 rows at a time.
(Rahul Shankar V, Simon Michael) #1911, #2551 -
The
defaulttheme has been renamed tolight.
(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%, likeC:\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 --versionshould show 1.52echo # >> .hledger.journalto 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. - hledger or hledger-web may fail to run if there is not enough memory available.
Next steps
Once installed, run hledger, and perhaps read hledger.org: Quick start.