Releases: hledgerorg/hledger
Release list
1.99.4
Release notes
(2.0 preview 4)
holdings command,
better lot tracking,
command aliases,
reorganised help command,
run/repl improvements,
barewide balance layout,
hledger-ui --watch memory leak fixed,
hledger-web security fixes.
hledger 1.99.4
Breaking changes
-
In journal format, a single tab is also now accepted as the separator between account and amount, for improved compatibility with Ledger. This also means account names can no longer contain tab characters.
-
In CSV rules, when a directive like
date-formatorseparatoris declared more than once, the last declaration now takes precedence, as the manual describes, rather than the first.
(Except forskip, where the first declaration still wins, also as the manual describes.)
This makes it possible to override an included rules file's directives by writing new declarations after theincludeline.
If any of your rules files relied on the old undocumented behaviour, declaring a directive before anincludeto override the included file, you should move that declaration below theinclude. [#2539] -
The
accountscommand now more strictly respects transaction-specific query terms
such asdate:,status:,desc:; these prevent matching a declared
but unused account, which doesn't have those fields. (Previously they were ignored in that case.)
Onlyacct:,depth:,type:ortag:can match an unused account. -
The
payeescommand gets similar query fixes:payee:now matches
declared payees as expected (previously it matched none of them, so
apayee:query could hide them from the report),
and transaction-specific query terms likedate:ordesc:no longer match
a declared but unused payee. -
any:andall:queries now also work in posting-oriented reports
like register, balance and aregister; previously they had an effect only in
commands which show whole transactions, like print.
So those reports can now select postings based on their siblings: eg
hledger balance expenses any:cashshows expenses which were paid
with cash - previously this required a two-command pipeline.
Also aregister with these queries now behaves more consistently,
showing the same transactions as print would. -
Config files can no longer specify the command to run via a bare first word in the general section.
Since config files can now define command aliases (which can run shell commands), letting a config file also select the default command was too risky.
The command to run must now always be given on the command line. -
The
democommand, which played asciinema recordings, has been removed. -
The
--tldrflag has been renamed to--examples. -
stats's-1flag has been renamed to--oneline.
Config files
-
Command aliases: you can now define custom commands by adding
NAME = COMMAND...to the[alias]section of your config file.
COMMAND can be a builtin command, an addon command, another alias, or a shell command prefixed with!, and can be continued on multiple indented lines.
(Shell commands will run only from your user config file, or one specified explicitly with--conf.) -
In config files, a
#inside single or double quotes is no longer misparsed as a comment start. -
Leading whitespace before a section header, and a trailing line containing whitespace with no final newline, are now accepted.
-
--conf/--no-confflags inside a config file are now dropped, instead of being passed along and causing trouble later. -
Config file errors now follow hledger's standard FILE:LINE-and-excerpt format, and parse errors are displayed properly.
Command line
-
Colour handling is more robust:
- ANSI colour is no longer used when
TERM=dumb, eg in an Emacs shell, which was leaking escape codes into piped or redirected output.--color=yescan still override. - Colour output now works in terminals where the background lightness can't be detected, eg inside Emacs (a light background will be assumed).
- In terminals without truecolor support, eg Emacs vterm or a stripped
COLORTERMover ssh/tmux, we now downgrade to the nearest xterm 256-colour.
- ANSI colour is no longer used when
-
Command line arguments are now passed to addon commands exactly as you
typed them, fixing cases where apostrophes, empty strings or other special
characters were mangled or silently dropped (Kevin F. Konrad, [#2696]).
(Except on Windows, where addons are still run through the shell, so
that .bat and other script addons keep working; there, arguments can
still be mangled.)
Quoting is also improved on the other paths which still build a shell command line:
addons run fromrunandrepl, and!shell aliases (Arthur Cinader). -
Options written after
--are passed through to an addon command rather than consumed by hledger;
additional--arguments are also passed through;
and--written in a config file section or a command alias now works as it does on the command line.
(Kevin F. Konrad, Arthur Cinader, [#2696]) -
hledger no longer rejects a flag with "needs a value" when that flag
belongs to some other command. Eg--sorttakes a value inregister,
sohledger help --sortused to fail with "--sort needs a value";
nowhelpreports the more accurate "Unknown flag: --sort", and an
addon given--sortreceives it.
(Kevin F. Konrad, [#2696]) -
Abbreviating
print's--locationsflag, egprint --loc, now works as expected. -
Balance assertion failure messages show a better troubleshooting command:
- regex metacharacters (eg the curly braces in
{2026-07-12, 2.5 €}) will be escaped -Eis added, so zero-amount postings will also be shown- instead of
-I, the more precise--ignore-assertionsis used.
- regex metacharacters (eg the curly braces in
-
acc,comm,descare now official short spellings for theaccounts,commodities, anddescriptionscommands.
Help
-
helphas been reorganised and is now an entry point for all hledger docs.helpwith no arguments (orhledgerwith no command) shows a quick reference card.help commandsshows the full commands list.help examples [CMD]shows command examples (like--examples).help usage [CMD]shows command options and docs (like-h).help manual [TOPIC]orhelp TOPICshows the full manual, in several formats, now including the HTML versions at hledger.org.help install/docs/support/home/sponsor/relnotesopen the corresponding hledger.org page in a web browser.
-
help's matching of manual topics is more powerful.
help manual TOPIC(orhelp TOPIC) now matches by exact match or unique prefix, with all viewers.
It now also searches the hledger-ui and hledger-web manuals.
A topic matching several headings, or nothing, now warns or lists the candidates instead of failing or being ignored. -
help manualhas a new-lflag which lists manual topics rather than showing them.
Andhelp manualwith no further arguments lists all topics, indented to show some of their hierarchy. -
When
TERM=dumb, or in Emacs shells that don't support TUIs,help manualnow defaults to showing plain text instead of failing to run a manual viewer. And it shows only the introduction, not the whole manual. -
helpnow hashas its official alias. -
The new browser-opening features (
help home,--webmanand friends)
work on all platforms, using the open-browser library: the Win32 API
on Windows,openon mac,xdg-openor other launchers on Linux.
(Arthur Cinader) -
The commands list can now be limited to particular categories of
command withhelp commands --builtins,--addonsor--aliases;
the flags can be combined. (--builtinhas been renamed to
--builtins, but still works as a unique prefix.)
Data entry
-
addwill no longer suggest default amounts having ambiguous digit group marks
(such as1.000or1,000), which if accepted could be misparsed later. Instead it will
add a trailing decimal mark to disambiguate (eg1.000,or1,000.). [#2656] -
Numbers can now also use
_or'as digit group marks. (Kevin F. Konrad, [#273], [#1489])
Data import
-
In CSV data, characters which journal format can't represent are now
replaced, with a warning: a semicolon in a description is replaced
with.,(it would otherwise start a comment when read back,
truncating the description), and a right parenthesis in a
transaction code is replaced with](it would otherwise end the
code early). [#2413] -
CSV rules files'
includedirectives are handled more robustly
[#2537]: include cycles, and unreadable included files, are now
reported with a proper error message showing the include directive's
location; errors in included files are reported at the right file
and line (previously they were reported against the top-level file);
included files now handle BOMs and CRLF line endings like the
top-level file; and whitespace around the included file path is
ignored. -
A CSV rules file's data-generating command (
source | cmd) failing
no longer aborts the whole run; instead it warns and continues, as
if no data was found. So whenimportprocesses several rules
files, one flaky external source won't block the rest. Data-cleaning
commands (source PATTERN | cmd) still fail hard, since they
operate on a file that was actually found. -
importwitharchiveenabled, if there are multiple downloaded copies of the source file,
now properly deletes processed files and always makes progress.
(Previously it could stall, reprocessing the oldest file each time.) -
import --dry-runno longer wrongly archives data files when the flag
is given abbreviated, eg asimport --dr. Also,import's
special file handling - preferring the oldest file matching a
sourceglob, and honouring thearchiverule - now happens only
whenimportitself reads its data files; pr...
1.52.4
Release notes
hledger-web packaging fixes for stackage; misc dependency and doc updates
hledger 1.52.4
Improvements
- Allow megaparsec 9.8.1+ (but not 9.8.0, because of megaparsec#572).
Docs
- csv: the manual now correctly documents that most top-level rules are evaluated first-wins, not last-wins as previously stated.
(Accepting the status quo, unlike hledger 2.x where they are changed to last-wins.) #2539
hledger-ui 1.52.4
Improvements
-
Allow megaparsec 9.8.1+ (but not 9.8.0, because of megaparsec#572).
-
Allow vty 6.6+, and drop the upper bounds on vty, vty-crossplatform and vty-windows.
hledger-web 1.52.4
Fixes
- Raise aeson's lower bound to
>=2.2.5.1, avoiding versions vulnerable to denial-of-service.
(https://haskell.github.io/security-advisories/advisory/HSEC-2026-0007.html)
Improvements
-
The yesod-static and hjsmin dependencies have been dropped;
hledger-web now serves its static files itself, using wai-app-static
and file-embed. (yesod-static doesn't currently build with crypton
1.1+, which has kept it, and hledger-web, out of stackage nightly.)
Static file urls no longer include an?etag=...cache buster;
instead the files are served with an ETag header, and conditional
requests are answered with 304 Not Modified.
(Cherry picked from an AI-assisted change in hledger 2.x.) -
Allow megaparsec 9.8.1+ (but not 9.8.0, because of megaparsec#572).
-
Allow yesod-core 1.7.0.0.
project changes 1.52.4
Doc updates
- Github release install instructions have been fixed and simplified. #2707
credits 1.52.4
Simon Michael.
Install
The hledger Install page lists the easiest ways to install a recent release,
such as brew on macos, choco/scoop/winget on Windows, or eget on all platforms.
Or, follow these instructions to install the specific release binaries below:
Updates to binaries:
- 2026-01-12: Fixed the hledger-linux-x64.tar.gz asset below, it previously contained a dev build. #2526
GNU/Linux, 64-bit Intel
At the command line:
curl -fL https://github.com/hledgerorg/hledger/releases/download/1.52.4/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.4
Prefix tar with sudo if /usr/local/bin is not writable.
Mac, 64-bit ARM or Intel
Open a terminal window.
(Don't download these binaries with your web browser - they won't get authorised.)
On ARM macs:
sudo mkdir -p /usr/local/bin
curl -fL https://github.com/hledgerorg/hledger/releases/download/1.52.4/hledger-mac-arm64.tar.gz | sudo tar -xzv -f- -C/usr/local/bin hledger hledger-ui hledger-web
hledger --version; hledger-ui --version; hledger-web --version # should show 1.52.4
On Intel macs:
sudo mkdir -p /usr/local/bin
curl -fL https://github.com/hledgerorg/hledger/releases/download/1.52.4/hledger-mac-x64.tar.gz | sudo tar -xzv -f- -C/usr/local/bin hledger hledger-ui hledger-web
hledger --version; hledger-ui --version; hledger-web --version # should show 1.52.4
If the version check shows an older version, you have another hledger earlier in $PATH; which -a hledger will find it.
Windows, 64-bit ARM or Intel
In a powershell window (press WINDOWS-R, powershell, ENTER).
(Don't download the zip with your web browser - programs downloaded that way may be blocked when you run them.)
cd ~
curl.exe -fLO https://github.com/hledgerorg/hledger/releases/download/1.52.4/hledger-windows-x64.zip
Expand-Archive hledger-windows-x64.zip -Force -DestinationPath "$env:LOCALAPPDATA\Programs\hledger"
$env:LOCALAPPDATA\Programs\hledger (ie C:\Users\YOURNAME\AppData\Local\Programs\hledger) is not in $env:Path by default,
so if $env:Path doesn't show it, add it once:
[Environment]::SetEnvironmentVariable('Path', "$env:LOCALAPPDATA\Programs\hledger;" + [Environment]::GetEnvironmentVariable('Path','User'), 'User')
$env:Path = "$env:LOCALAPPDATA\Programs\hledger;$env:Path" # for this window; new windows will pick it up automatically
Then:
hledger --version; hledger-ui --version; hledger-web --version # should show 1.52.4
If the version check shows an older version, you have another hledger earlier in $env:Path; where.exe hledger will find it.
These are 64-bit Intel binaries; they also run on ARM machines (emulated).
They may also work on Windows 7:
use Windows Explorer to extract hledger-windows-x64.zip into a folder of your choice,
then open a command window (WINDOWS-R, cmd, ENTER) and run the hledger programs.
Next steps
Once installed, run hledger,
and see the hledger Docs.
1.52.3
Release notes
hledger 1.52.3
- Uses hledger-lib 1.52.3.
hledger-ui 1.52.3
- Uses hledger 1.52.3.
hledger-web 1.52.3
Fixes
-
Another XSS (cross-site scripting) vulnerability has been fixed, in
the add transaction form's error message. Any web page visited while
hledger-web was running could use it to run javascript in
hledger-web's origin, and from there read the whole journal, or
alter it. All hledger-web users should upgrade. See also:
GHSA-vq7r-8w52-jv84. (Arthur Cinader, Simon Michael, #2700) -
A newline submitted in a transaction's description, code or account
name is no longer written into the journal file. This removes the
possibility of the user inserting an include directive, which could
expose system files readable by the hledger-web server. See also:
GHSA-vq7r-8w52-jv84. #2704Note: as with #2698 in 1.52.2, these fixes were backported from
AI-assisted fixes in hledger 2, under the security exception in
https://hledger.org/AI.html; they have been reviewed and tested. -
hledger-web's official binaries, and builds from the hledger source
tree, now use aeson 2.3, avoiding a denial of service bug.
(https://haskell.github.io/security-advisories/advisory/HSEC-2026-0007.html)
credits 1.52.3
Simon Michael,
Arthur Cinader.
Install
The hledger Install page lists the easiest ways to install a recent release,
such as brew on macos, choco/scoop/winget on Windows, or eget on all platforms.
Or, follow these instructions to install the specific release binaries below:
Updates to binaries:
- 2026-01-12: Fixed the hledger-linux-x64.tar.gz asset below, it previously contained a dev build. #2526
GNU/Linux, 64-bit Intel
At the command line:
curl -fL https://github.com/plaintextaccounting/hledger/releases/download/1.52.3/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.3
Prefix tar with sudo if /usr/local/bin is not writable.
Mac, 64-bit ARM or Intel
Open a terminal window.
(Don't download these binaries with your web browser - they won't get authorised.)
On ARM macs:
sudo mkdir -p /usr/local/bin
curl -fL https://github.com/plaintextaccounting/hledger/releases/download/1.52.3/hledger-mac-arm64.tar.gz | sudo tar -xzv -f- -C/usr/local/bin hledger hledger-ui hledger-web
hledger --version; hledger-ui --version; hledger-web --version # should show 1.52.3
On Intel macs:
sudo mkdir -p /usr/local/bin
curl -fL https://github.com/plaintextaccounting/hledger/releases/download/1.52.3/hledger-mac-x64.tar.gz | sudo tar -xzv -f- -C/usr/local/bin hledger hledger-ui hledger-web
hledger --version; hledger-ui --version; hledger-web --version # should show 1.52.3
If the version check shows an older version, you have another hledger earlier in $PATH; which -a hledger will find it.
Windows, 64-bit ARM or Intel
In a powershell window (press WINDOWS-R, powershell, ENTER).
(Don't download the zip with your web browser - programs downloaded that way may be blocked when you run them.)
cd ~
curl.exe -fLO https://github.com/plaintextaccounting/hledger/releases/download/1.52.3/hledger-windows-x64.zip
Expand-Archive hledger-windows-x64.zip -Force -DestinationPath "$env:LOCALAPPDATA\Programs\hledger"
$env:LOCALAPPDATA\Programs\hledger (ie C:\Users\YOURNAME\AppData\Local\Programs\hledger) is not in $env:Path by default,
so if $env:Path doesn't show it, add it once:
[Environment]::SetEnvironmentVariable('Path', "$env:LOCALAPPDATA\Programs\hledger;" + [Environment]::GetEnvironmentVariable('Path','User'), 'User')
$env:Path = "$env:LOCALAPPDATA\Programs\hledger;$env:Path" # for this window; new windows will pick it up automatically
Then:
hledger --version; hledger-ui --version; hledger-web --version # should show 1.52.3
If the version check shows an older version, you have another hledger earlier in $env:Path; where.exe hledger will find it.
These are 64-bit Intel binaries; they also run on ARM machines (emulated).
They may also work on Windows 7:
use Windows Explorer to extract hledger-windows-x64.zip into a folder of your choice,
then open a command window (WINDOWS-R, cmd, ENTER) and run the hledger programs.
Next steps
Once installed, run hledger,
and see the hledger Docs.
1.52.2
Release notes
hledger 1.52.2
- Uses hledger-lib 1.52.2.
hledger-ui 1.52.2
- Uses hledger 1.52.2.
hledger-web 1.52.2
Fixes
-
An XSS (cross-site scripting) vulnerability has been fixed in the add
transaction form's autocomplete. Journal data from an untrusted source
could execute javascript when shown as a completion suggestion. All
hledger-web users are encouraged to upgrade. Full technical details:
GHSA-538p-cvc4-4qjm.
(Arthur Cinader, Simon Michael, #2698)Note: this bug was detected, and the original patch was generated, by
Arthur Cinader with AI assistance, for hledger 2.x. Because the
vulnerability is in theory quite severe, and the fix is small and
obvious, and I don't want to add risk by redoing it from memory, and
no-one else volunteered promptly to do that work - and after
discussion in the chat and mail list (see today's thread), and careful
human review and testing - I manually backported the same fix to
hledger 1. And, updated the project's AI policy
to allow this for needed security-related fixes like this one.
credits 1.52.2
Simon Michael,
Arthur Cinader.
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.
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.2/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.2
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.2/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.2
On Intel macs:
curl -fLOC- https://github.com/simonmichael/hledger/releases/download/1.52.2/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.2
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.2/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.2
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.52.2echo # >> .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.
1.99.3
Release notes
(2.0 preview 3)
conventional file layout for rules/data/prices,
get command,
commodity aliases,
print aligns by decimal mark,
more intuitive precision behaviour,
more robust lot detection,
average cost basis methods,
customisable report titles,
prices --summary report,
more robust roi report.
hledger 1.99.3
Breaking changes
-
CLI:
--verbose-tagsis no longer a general flag, it is now a
command-specific flag forprintandrewrite. -
Commodities & prices:
commodities --usednow only shows
commodities used in transactions; use--pricedto see commodities
used in P directives. -
Data import: The CSV
sourceandarchiverules now read from/write to a
journal-adjacentdata/directory by default. -
Journal: Inferred missing amounts no longer affect display precisions or
entry balancing precisions. -
Journal: account names whose final part is enclosed in curly braces
(likeassets:{foo}) are expected to have a valid lot subaccount
name within the braces, and will raise an error if not. This is now
documented. Also this error checking (and the hiding by default) of
explicit lot subaccounts can now be disabled with-I/--ignore-lots. -
print:
printnow aligns posting amounts by decimal mark, by default.
--layout=hledger1restores the old layout.
Command line
-
We now show a clear error when no value is provided for a
value-requiring option. (Eg,hledger import -f --dry-runno
longer tries to use--dry-runas-f's value.) -
Bad option values are now reliably reported as an error.
Previously, some invalid option values triggered an error only if
the option was actually used by the command being run. -
On Windows, file paths containing spaces are now quoted properly
when invoking external helpers (info, man, tldr, pager,$EDITOR,
hledger-iadd). This affected hledger-ui'sAandEkeys, and
hledger's help/pager invocations.
[#2646]
Commodities & prices
-
Commodity aliases:
In journal files, commodity directives can now define one or more
aliases for the commodity. Eg here USD has three aliases:commodity USD 1.00 ; alias: $ US$ "us dollars"A 1:1 market price is inferred for these, so you can use
-Xto
freely convert between them. This is useful eg if your journal and
your downloaded market price data use different symbols for a currency.cur:COMMqueries now match COMM or any of its commodity aliases.
To match only a specific symbol without considering aliases, usesym:SYM. -
commodities:--usednow only shows commodities used in transactions;
a new--pricedflag shows commodities used in P directives.
Separating these makes--usedmore useful with a date query. -
commoditiesnow supportsdate:queries (and/or-b/-e/-p
report period options), affecting the--usedand--pricedreports. -
priceshas a new--summarymode. -
priceshas a new--locationsflag, showing the file and line number
of each price's directive or transaction from which it was inferred.
Data entry
-
addandimportnow test for faulty filesystems before writing.
Some filesystems, eg an Android shared filesystem in Termux, overwrite when you tell them to append.
hledger now tests for this before writing to the journal, to reduce risk of data loss.
[#2577] -
addnow offers useful default amounts after entering a balance assignment.
Previously, amounts entered via= BALANCEAMOUNTwere not affecting
subsequent postings' default amounts, making it difficult to
complete data entry. Now, appropriate balancing amounts are offered. -
addno longer restarts at posting 1 if the final transaction checks fail.
So if the entered transaction fails to balance or satisfy balance assertions,
it now just reprompts for another posting, instead of discarding the postings
entered. (This is most visible when entering balance assignments.) -
add's default amounts are now displayed with the journal's commodity
display styles, helping to avoid misparsing of decimal marks. [#2645]
Data import
-
getis a new command for fetching transaction data and market prices.
It runs two helper scripts which you can customise:data/getdatato gather transaction data (eg CSV) files indata/prices/getpricesto download market prices, to be saved inprices/
Or with
--transactionsor--prices, only the selected phase is run.
The data and prices directories are autocreated if needed, next to the main journal file.
Sample scripts can be found in https://github.com/simonmichael/hledger/tree/main/bin.
The samplegetpricesrequirespricehist. -
importwith no file arguments now reads from all.rulesfiles in
therules/directory next to the main journal file, by default.
Files whose name begins with.or_are skipped (this is useful
for included files which should not be read directly.) -
import -g/--getruns thegetcommand before importing. So
with appropriate helper scripts, a complete import workflow can be:
hledger import -g [--dry-run] -
importnow archives only when new transactions were actually
imported. This avoids creating duplicate archives, eg with a
data-generatingsourcerule likesource | paypalcsv .... -
The CSV
sourceandarchiverules now read from/write to the
journal'sdata/directory by default:sourcelooks for bare filenames/relative paths first indata/,
then in~/Downloads.
(Except paths beginning with./or../- these are relative
to the rules file, as before.)archivesaves todata/archive/, autocreating that if needed.
(A breaking change; previously it saved in a data dir next to the rules file.)
-
On Windows,
sourcefile paths with a drive letter likeC:\foo
are now properly recognised as absolute paths (not relative). -
A
#character in asourcerule now always starts a same-line
comment, even if it appears after|.
Error messages
-
Balance assertion errors: in the suggested troubleshooting command,
commodity symbols containing regex metacharacters (like $) are now
properly quoted for the shell. -
In error messages which compare two amounts (balance assertions,
recorded gain,check basis), when the rounded amounts look
identical, we now show more decimal places to make the difference
visible. [#2636] -
Certain errors when reading a CSV or rules file
(eg a missing date rule, or encoding/skip/timezone errors)
now show the path of the problem rules file. -
import's "no data files" error message is improved. -
With an unrecognised command argument, the error message now shows
the bad argument, and the config file path if it came from a config
file. [#2489]
Journal
-
Inferred missing amounts no longer affect display precisions or the
entries' local balancing precisions. So a high-precision inferred
amount won't affect the number of decimals displayed in reports, or
the precision required to balance the entry. So,- An unseen high-precision balancing amount, eg inferred from a
precise@price, no longer makes it harder to balance the entry. - Some reports that used to add unnecessary decimal zeros no longer do so.
- Reports more consistently show amounts smaller than their
commodity's display precision as0.
- An unseen high-precision balancing amount, eg inferred from a
Lots & gains
-
In command line help,
--lotshas moved from "General input flags"
to "General output flags". -
hledger can now detect gain postings heuristically, without
requiring that their account is declared astype:G. Five styles
for writing disposal transactions are documented in the manual's
"Recording disposals" section. -
The
G/GainandU/UnrealisedGainaccount types are now
inferred from conventional English names, like the other types. Eg
revenues:gain,income:capital-gains,equity:unrealised-gain,
equity:unrealized gainsare recognised as type G, G, U, U. -
Gain amounts are now inferred or checked at the gain commodity's
local precision within the entry. This makes it easier to read
inferred gain amounts and to write explicit gain amounts.
As a special case, if the local precision is zero but the gain is a
non-integer, 2 decimal places are assumed.
Inferred gain amounts preserve their full precision internally, so
they can be viewed more precisely with a command likeprint -c '$1.000000' --round=soft. -
Lot transfer destinations are now checked more carefully: any
specified lot details on the destination annotation (date, label,
cost) must match the source lot, or an error is raised. (Previously,
this would silently disrupt lot identities.) -
The
AVERAGE/AVERAGEALLcost basis methods now properly
recalculate the pool-wide average cost after each acquisition.
And when they are used, lot subaccount names now omit the cost
({2026-01-15}rather than{2026-01-15, $50}), so account names
remain stable as new lots are acquired.
[#2581] -
check basisno longer fails because of non-terminating decimals in
the unit cost (eg$50/7 = $7.142857...).
[#2636] -
Harmless commodity style differences in explicit lot subaccount
names are now ignored (eg$60vs$ 60). -
Explicit lot subaccounts are detected more robustly, tolerating
colons or curly braces within the label or commodity symbol. -
Explicit lot subaccounts now require a comma after the date.
-
The
--ignore-lots/-Iflags disable explicit lot subaccounts
detection and error checking. [#2649] -
When disposing a single lot with a balance assertion, we no longer
generate an unnecessary new assertion posting. -
If a Ledger-style
(LOTNOTE)annotation contains double quotes,
these are now stripped so they don't clash with hledger's cost basis
syntax and break round-trip parsing. -
When generating label...
1.99.2
Release notes
Lot tracking refinements.
hledger 1.99.2
Breaking changes
-
Lot processing and checking is now performed by default when reading a journal with lot entries.
The--lotsflag is now a display toggle; without it, lot subaccounts are hidden from reports. -
The
G(Gain) account type is no longer auto-detected from account names
(to avoid breaking hledger 1 journals using those names).
And aU(UnrealisedGain) account type has been added (a subtype ofEquity). -
Disposal transactions now produce a balanced pair of gain postings:
a transfer between the firstUaccount and the firstGaccount.
(If none are declared, the namesequity:unrealised-gainandrevenues:gainwill be used.)
The special exception for gain postings during transaction balancing,
and the separate disposal balancing step, have been dropped. -
Amountless explicit gain postings are no longer allowed; if you write gain
postings in the journal, you must write their amounts also.
Features, Improvements
-
The new
--ignore-lotsflag disables lot processing. This can be useful
to avoid errors when working with incomplete journals. -
The
-Iflag is now a shorthand for--ignore-assertions --ignore-lots. -
Capital gain is now computed more robustly, from disposal postings only
(not from the entry's cost basis residual). -
Cost amounts in lot subaccount names like
assets:x1:{2026-01-15, $1,500}
are now styled with the canonical commodity styles.
Likewise for inferred gain posting amounts. -
Lot transfer transactions with a priced fee posting will be automatically
split into a transfer portion and a disposal portion (for the fee), if possible. -
A new optional
hledger check basischeck verifies that each acquire posting's
cost basis matches its transacted cost ({B} = @T).
This prevents typos in cost basis which could silently cause wrong capital gain to be calculated. -
print's-x/--explicitflag now implies--lots, so you can just
typehledger print -xto see lot details. (To see all possible details,
add--verbose-tags.) -
print --verbose-tagsnow shows some new lot postingptypetag values:rgainandugainon generated realised- and unrealised-gain postingslot-parent-assertionon generated postings preserving balance assertions across lot splittingsplit-postingon the disposal portion of auto-split lot transfers.
-
When inferring a transacted price to balance a two-commodity transaction,
if one of the postings is lotful, hledger will attach the price to that one,
rather than always picking the first posting.
#2571 -
Transaction-balancing error messages have been improved, and now show the summed amounts
to help with troubleshooting. -
In CSV rules, a
%(FIELD)interpolation syntax with parentheses is now accepted.
This is useful when the field name needs to be delimited from adjacent text.
Eg:account1 assets:%(type)checking. -
When using the
lesspager, hledger no longer duplicates options in theLESSenvironment variable. -
addnow date-weights similar transactions by absolute distance from today,
not from the journal's latest date. This prevents a future date typo from skewing defaults. -
setupnow also checks for theG(Gain) andU(UnrealisedGain) account types.
Also output related to thelesspager, lot-related data, and strict checking has been improved.
Fixes
-
The
G(Gain) account type's spelling has been fixed (it'sGain, notGains). #2570 -
addno longer breaks when the journal contains postings to a typeGaccount.
#2572 -
registerandaregisternow omit postings whose amount couldn't be inferred
instead of showing blank entries and report layout problems. (Shouldn't occur in practice.)
#2571 -
Equity conversion postings generated by
--infer-equityno longer break
transaction balancing in lot disposals. -
{{TOTALCOST}}annotations may now contain a date and label too. -
{{TOTALCOST}}annotations now preserve decimal digits (capped at 8 digits)
when converted to{UNITCOST}.
Scripts/addons
hledger-fancyassertions: add-s/--strictflag. (Joshua Chapman)
Docs
- Cost basis, Lot reporting: many updates.
hledger-ui 1.99.2
Fixes
- Navigating to lot subaccounts (with names like
{2026-01-01, $50}) no longer
fails with "invalid regular expression" — regex metacharacters in account
names are now properly escaped.
Improvements
-
Allow brick 3.x.
-
Uses hledger 1.99.2.
hledger-web 1.99.2
Improvements
-
Allow yesod-static 1.6.1.1 and later again.
-
Uses hledger 1.99.2.
project changes 1.99.2
Doc updates
- AI: ongoing edits, new monitoring scripts and notes, FOSS credit, link cleanups
- ACHIEVEMENTS, ANNOUNCE, DECISIONS, DEVFAQ, README, RELEASING: edits
- SPEC-lots: edits and cleanups
- SPEC-special-postings: converted to markdown tables
- relnotes/ghrelnotes: AI doc url fixes, edits
- references to the master branch updated to main
Infrastructure/tools
- stack configs: bumped to nightly-2026-04-17
- workflows: fix stack.yaml path in binaries-windows
- justfile: ccusage scripts
- justfile: functest uses more threads
- general --help options doc updated
credits 1.99.2
Simon Michael,
Joshua Chapman.
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.
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.99.2/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.99.2
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.99.2/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.99.2
On Intel macs:
curl -fLOC- https://github.com/simonmichael/hledger/releases/download/1.99.2/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.99.2
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.99.2/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.99.2
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.99.2echo # >> .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...
1.52.1
Release notes
hledger 1.52.1
Breaking changes
- The
Gain(G) account type is no longer auto-detected from account names like
revenue:gainsorincome:capital gains; it must now be declared explicitly with; type: G.
Also, theUnrealisedGain(U) account type, a subtype of Equity, has been added
(spellingsU,UnrealisedGain, andUnrealizedGainare all accepted).
These improve compatibility between hledger 1 and 2.
Docs
- The "Cost basis / lot syntax" section has been renamed to "Cost basis",
and updated to mention hledger 2.
hledger-ui 1.52.1
Improvements
-
Uses hledger 1.52.1.
-
Allow vty-crossplatform 0.5.
hledger-web 1.52.1
Improvements
- Uses hledger 1.52.1.
credits 1.52.1
Simon Michael.
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.
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.1/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.1
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.1/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.1
On Intel macs:
curl -fLOC- https://github.com/simonmichael/hledger/releases/download/1.52.1/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.1
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.1/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.1
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.52.1echo # >> .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.
1.99.1
Release notes
(2.0 preview 1)
Automated lot tracking and capital gains calculation, improvements to print's beancount output, and a new policy for AI-assisted development.
hledger 1.99.1
Breaking changes
-
This 2.0 preview is the first hledger release to explore AI-assisted development.
Please check out the evolving AI policy/FAQ: https://hledger.org/AI.md.
There's also a new "AI usage" section below. -
hledger now recognises certain transactions as lot disposals;
and in these, postings to accounts with the Gain type (declared or auto-detected)
are excluded from normal transaction balancing.
This means it's possible for existing journal entries to be rejected.
Eg, this entry (though nonsensical and unlikely) is ok in hledger 1.x but an error in 2.x:2026-02-01 sell stock assets:stocks -1 AAA {$50} @ $60 assets:cash $50 revenue:gains $10hledger 2.x recognises the
assets:stocksposting as a lot disposal,
andrevenue:gainsas a Gain account,
so it excludes the $10 from transaction balancing,
and then fails to balance the $-60 and $50.
To fix it you could: rename therevenue:gainsto something else,
or explicitly declare it as typeR(Revenue) instead ofG(Gain),
or omit the $10 amount (allowing hledger to infer it).Here's a more realistic entry for 2.x, to explain the two balancing steps:
2026-02-01 sell stock assets:stocks -1 AAA {$50} @ $60 assets:cash $60 revenue:gains $-10By default, 2.x will check just the $-60 and $60 (transaction balancing).
And in lots mode, it will also check the $-50,$60, and $ -10 (disposal balancing). -
Posting's
ptypefield has been renamed topreal(andPostingTypetoPostingRealness),
to avoid confusion with the newptypetag. This changes JSON output.
Features
-
hledger now understands, and prints, a Beancount-like cost basis syntax:
{DATE, "LABEL", COST}, with the parts in that order, all optional.
Ledger-compatible{COST} [DATE] (NOTE)syntax is also accepted,
and can be printed usingprint's newledgeroutput format. -
Lot-related postings are detected,
from a{COSTBASIS}annotation, or a:{LOTNAME}subaccount,
or alotstag on their account or commodity, or in a few other ways.
Their type (acquire, dispose, transfer-from, transfer-to, gain) is saved
in a hidden_ptypeposting tag; or with--verbose-tags, in a visibleptypetag.
(For examples, seehledger print --verbose-tags -f examples/lots/lot-entries.journal) -
Transacted cost (
@) is inferred from cost basis ({}) if needed,
and vice versa. So writing either one is often sufficient. -
Internally, every lot has its own subaccount.
These can be left implicit, or recorded explicitly.A new
--lotsflag enables "lots mode", which calculates and checks lot movements,
and makes lot subaccounts visible in reports. -
Lot identities and balances are tracked across transactions and accounts
(and between year files, withclose --clopen --lots).
Wrong or ambiguous lot movements are reported. -
The reduction method (booking method) for transfers and disposals
can be configured per account or per commodity, using thelotstag.
Per-account FIFO, LIFO, HIFO, AVERAGE
and globally-scoped FIFOALL, LIFOALL, HIFOALL, AVERAGEALL methods are supported. -
Disposals automatically calculate or check capital gain/loss,
which can be left implicit or recorded explicitly.
Transaction balancing behaviour has been updated to allow this (see Breaking Changes above). -
The
checkcommand has a newlotscheck,
which is another way to validate lot movements.
Eg to run the usual strict checks and also the lot checks:hledger check -s lots.
Alsocheck accountsnow ignores lot subaccounts.
Fixes
-
printnow preserves empty{}cost basis annotations.
Improvements
-
commoditiesnow supportstag:queries, eghledger commodities tag:lots. -
print's beancount output has been improved:- it converts single-letter commodity symbols
- it converts the no-symbol commodity (to "CC")
- it converts a top-level "revenue" or "revenues" account to "Income"
- it converts balance assignments to explicit amounts
- it converts market prices
- it sets booking methods based on accounts'
lotstag value - it generates a (commented) tolerance option
- it handles account and commodity tags better
- it shows cost basis before transacted cost, as Beancount requires.
Docs
- Cost basis / Lot syntax: updated
- Lot reporting: added
- Lot postings with balance assertions: added
- Reporting concepts > Detecting special postings: added
Examples
- lot-entries.journal: sample journal entries involving lots
- hledger.conf: how to hide explicit lots
AI usage
This 2.0 preview is the first hledger release to explore AI-assisted development.
There is an AI policy document/FAQ: https://hledger.org/AI.md
In this release, I used claude models to help me design, plan, implement, test, debug and document the lot tracking and capital gains features.
Mostly opus 4.6, plus some experimentation with the cheaper models and the more expensive modes.
Each commit is relatively small and clear and was reviewed and tested by me.
Approx. estimated claude token use (in+out), and cost, for the lots work in this release:
- 2026-01: 133Mt, $85
- 2026-02: 598Mt, $551
- 2026-03: 299Mt, $256
- Total: ~1Gt, ~$900
Approx. human dev time: ~150h, market value ~$10k-30k
hledger-ui 1.99.1
- Uses hledger 1.99.1
hledger-web 1.99.1
Breaking changes
- Posting's
ptypefield has been renamed topreal(andPostingTypetoPostingRealness),
to avoid confusion with the newptypetag. This changes JSON output.
Fixes
-
Uses hledger 1.99.1
-
Require yesod-static <1.6.1.1 to avoid a build breakage with cabal
(psibi/crypton-conduit#3).
project changes 1.99.1
Doc updates
- site: upgrade to latest mdbook
- site: move pages' tables of contents to sidebar
- AI: new project AI policy doc, with links and discussion notes
- IMPACT: new project "external impacts" doc
- README(hledger2 branch): describe the 2.x branch and plans
- REGRESSIONS
- SPEC-lots: specification for lot-related functionality, lot subaccount parsing technique, balance assertions
- SPEC-finalising: retroactive specification for journal finalising
- SPEC-print: document some print behaviours as a specification
- SPEC-special-postings: document patterns of postings recognised by hledger
- PLAN-lots: planning and design notes from implementing SPEC-lots
Infrastructure/tools
- Shake: fix build error with GHC 9.12.2 by using newer shake
-
just devtag-pushrenamed tojust devver - stack configs: 9.14 made default, 9.12 made non-default, both cleaned up and bumped
credits 1.99.1
Simon Michael,
Juliano Solanho.
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.
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.99.1/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.99.1
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.99.1/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.99.1
On Intel macs:
curl -fLOC- https://github.com/simonmichael/hledger/releases/download/1.99.1/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.99.1
Windows, 64-bit ARM or Intel
In a powershell window (press WINDOWS-R, powershell, ENTER):
cd ~
curl https://github.com/simonmichael/hledger/releases/download/2.0pre1/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.99.1
1.52
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.
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 ...
Test binaries
Here you can find unreleased test binaries, which are updated occasionally. By using these and providing feedback, you can help to make the next release better.
These binaries have the following changes since the 1.51.2 release: 1.51.2...testlatest
Install
All platforms
If you have eget, that's a convenient way to download the right binaries for your machine:
eget simonmichael/hledger --pre-release --all
Otherwise:
GNU/Linux, 64-bit Intel
At the command line:
cd /usr/local/bin
curl -fLOC- https://github.com/simonmichael/hledger/releases/download/testbin/hledger-linux-x64.tar.gz
tar xzf hledger-linux-x64.tar.gz
cd
hledger --version; hledger-ui --version; hledger-web --version # should show a recent .99 version
Mac, 64-bit ARM or Intel
In a terminal window (don't use your web browser to download, it won't authorise the binaries):
For ARM macs:
cd /usr/local/bin
curl -fLOC- https://github.com/simonmichael/hledger/releases/download/testbin/hledger-mac-arm64.tar.gz
tar xzf hledger-mac-arm64.tar.gz
cd
hledger --version; hledger-ui --version; hledger-web --version # should show a .99 version with the testbin release's date
For Intel macs:
cd /usr/local/bin
curl -fLOC- https://github.com/simonmichael/hledger/releases/download/testbin/hledger-mac-x64.tar.gz
tar xzf hledger-mac-x64.tar.gz
cd
hledger --version; hledger-ui --version; hledger-web --version # should show a .99 version with the testbin release's date
Windows, 64-bit ARM or Intel
In a powershell window (press WINDOWS-R, powershell, ENTER):
-
Make a place to keep installed binaries. You only need to do this once, not for every release:
mkdir -force $HOME\bin >$null $ENV:PATH += ";"+$HOME+"\bin" [Environment]::SetEnvironmentVariable("Path", [Environment]::GetEnvironmentVariable("Path", [EnvironmentVariableTarget]::User)+";"+$HOME+"\bin", [EnvironmentVariableTarget]::User) -
Download and install the release binaries:
cd $HOME\bin curl https://github.com/simonmichael/hledger/releases/download/testbin/hledger-windows-x64.zip -OutFile hledger-windows-x64.zip Expand-Archive hledger-windows-x64.zip -DestinationPath . -Force cd $HOME hledger --version; hledger-ui --version; hledger-web --version # should show a .99 version with the testbin release's date; if not: where.exe hledger -
Ensure a default journal file exists, and without a problematic encoding (I'm not sure if/why "ascii" was needed here).
This will allow you to start hledger-web by double-clicking on its icon if you wish.out-file -append -encoding ascii $HOME/.hledger.journal