Preview release notes
Release notes for the hledger 2 preview releases, 1.99.1 to 1.99.6, and hledger 2.0's changes since the last of them. For all of hledger 2.0's changes since hledger 1.52, see the Release notes.
2026-12-01 hledger-2.0 (since 1.99.6)
hledger 2.0
Breaking changes
In brief; each is described more fully in its section below.
-
register now hides zero-amount postings unless
-Eis used. (Reports) -
Account names with an empty part (beginning or ending with
:, or containing::) are now an error. (Journal format) -
apply yearis now scoped, as in Ledger, and anend apply yearwith no matchingapply yearis an error. (Journal format) -
Ledger-style
assert EXPRdirectives, previously ignored, must now use hledger's assert syntax. The hledger-check-fancyassertions add-on is removed, replaced by assert rules. (Assert rules) -
More than one
sourcerule in a CSV rules file (including its included files) is now an error. (Data import)
Error messages
-
Fixed: a failing balance assertion's suggested troubleshooting command had its arguments in the wrong order.
-
Fixed: errors about a posting followed by comment lines (eg an undeclared account) now report and mark the correct line.
Data entry
- Fixed:
addno longer saves an entry which would make the journal unreadable. It now runs all enabled journal checks with the new entry (eg lots must be valid, and with--strict, the strict checks must pass), and if there's a problem, it shows the error and goes back a step, so you can correct the entry. The check is done in the background, while showing the entry preview, to minimise delay with large journals. (#2869)
Data import
-
Fixed:
importno longer writes entries which would make the journal unreadable. It now runs all enabled journal checks with the new entries (eg balance assertions, valid lot movements, and with--strictthe strict checks), and if there's a problem, it shows the error, writing nothing. (#2869) -
Fixed: a CSV rules
source | CMDcommand no longer reads hledger's standard input. This could hang, waiting for terminal input, or consume input meant for something else (eg a shell loop). -
A new
initcommand creates starter files for a new hledger setup, in the current or a given directory.--layoutselects from several file layouts:simple(one journal file),default(separate account/commodity/payee declaration files, data/prices/rules directories, startergetscripts and csv rules), oryears(a journal file per year, combined by all.journal).hledger init FILE.journalwrites just one self-contained journal. Existing files are never changed, so init can be re-run to restore missing files.--dry-runshows what would be created. -
filesimprovements, useful for tools which need to know a journal's input files:-t/--treeshows included files indented below the file that includes them, with their paths relative to it. With a REGEX argument, the files including a matched file are also shown.- It now also lists the rules files used to read CSV data, the rules files they include, and the data files read by their
sourcerules. -O jsonlists the files in JSON format, with each one's path, depth, and the file that included or used it.filesno longer process the data, so it doesn't runsourcecommands, and it does not require balanced entries or passing checks (but does require valid syntax). And a missing included file now just gives a warning, not an error (or in JSON output, an entry with"exists": false).
-
CSV rules'
currencyandcurrencyNnow set a default commodity, like aDdirective, instead of prepending text to amounts. So amounts which already have a commodity symbol keep it (previouslycurrency $with€7gave a$€commodity). The value can be an amount showing the symbol's position and spacing, likecurrency 1 USD; its number style (eg1.000,00 EUR) is used as the commodity's default display style. A value which is not a commodity symbol or amount, likecurrency 123, is now an error. Rules that worked before give the same output as before. -
CSV amount values can be amount expressions, like
amount1 %price + %fee, as in journal format. A value counts as an expression if it contains an operator: a*,/, or a+or-which is not a leading or exponent sign. Within an expression, parentheses group (so-(%price + %fee)is the sum negated). If there's no operator, values follow the traditional sign conventions (eg parentheses mean negative); -
More than one
sourcerule in a CSV rules file is now an error, suggesting to use one rules file per data file. Previously all but onesourcerule was silently ignored. (#2862) -
Errors about a CSV record, or an entry converted from CSV, now name the rules file, which helps when importing several sources.
-
With
--debug=2, the if rules that matched a CSV record are shown with their rules file and line number.
Journal format
-
Fixed:
apply accountignores a trailing colon, as in Ledger:apply account Assets:now givesAssets:Bank, notAssets::Bank. (#2858) -
Account names with an empty part are now an error: they can no longer begin or end with
:, or contain::. Such names caused confusion and wrong reports (egbsomitted an empty top-level account, anda:b:was a different account froma:b). This is checked in journal, timeclock and timedot files, CSV rules, and the add command and hledger-web's add form (but not in names produced by aliases or--pivot). In CSV, the usual cause is an empty field interpolated in an account name, likeexpenses:%nosuchfield. (ledger#3348) -
apply yearis now scoped, as in Ledger:end apply yearrestores the previous default year, so following year-less dates no longer get the block's year.apply yearblocks can be nested, and one left open lasts until the end of its file. Anend apply yearwith no matchingapply yearis now an error. (Previouslyapply yearwas a deprecated alias forY, andend apply yearwas ignored.) (#2852) -
A bare
endorend apply, which in Ledger closes the innermost apply block, now gives a clear error, listing theend applydirectives which hledger supports. (#2852) And anend apply accountwith no matchingapply accountnow gives a clearer error, at the right line. -
Amount expressions can now also be used in costs, eg
1 GBP @ (1 / 1.14 EUR)or3 X @@ $450 + $5, in journal files and CSV rules. A cost calculated with*or/is kept exact, and shown in full (or with 8 decimal places, if it's a repeating decimal). (#2857) -
In amount expressions, a number can now be divided by an amount, eg
1 / 1.14 EURto invert an exchange rate. As in Ledger, the result is in the amount's commodity. (#2856)
Assert rules
-
The new
assertdirective declares rules, written as queries, which hledger checks whenever it reads the journal, like balance assertions. Eg:assert none daily type:A balance:<0 ; no asset accounts are negative at end of day assert some monthly income:salary ; there's a salary transaction every month assert none expenses:petty amt:>+500 ; no single petty expense exceeds 500Each rule's query is run as
hledger bal -E QUERYwould run it, over the whole journal, or in each period of its period expression, and must match no rows (none) or at least one row (some). Newbalance:andchange:terms (see Queries) can be used to test the rows' balances and changes; otherwise, a rule is about which postings exist. Assert rules are part of the assertions check:-Idisables them,-sorcheck assertionsre-enables them. Their scope is the file tree they are declared in. (#1738, #2719) -
hledger checkcan also check assert rules given as arguments, eghledger check 'assert none daily type:A balance:<0'. This is handy for trying out a rule, or for rules you don't want to keep in the journal. They apply to all the files read. -
A periodic assert rule can be followed by indented
skiplines, naming dates or periods to skip checking, egskip 2026-03-04..2026-03-08 ; transfer delayed by the bank holiday. (These skip checks, not data: postings in a skipped period still count in later balances.) -
When an assert rule fails, the error shows the rule, every period in which it failed, up to 10 of the matching balances, changes or postings, and a report command to see more.
-
The hledger-check-fancyassertions addon script is removed, replaced by assert rules. And Ledger-style
assert EXPRdirectives, which hledger used to ignore, are now an error unless adapted to hledger syntax.
Lot tracking
-
Fixed: a disposal with an empty
{}selector and a total cost (@@), spanning several lots, counted the total once per lot, so its generated gain was too large, and a correctly written gain was rejected. (#2839) -
Fixed: a same-account lot transfer written with explicit cost bases (as
print -xshows it) was given an inferred cost, making it unbalanced. -
Fixed: a transfer fee written as a separate posting (or re-read from
print -xoutput) now selects lots the same way as when hledger splits off the fee itself. Lot postings are now processed in the order written.print -x/-a/--lotsshow an auto-split fee before the transfer, reflecting this. -
Fixed:
--verbose-tagsshowed alotsplit-postingtag on postings merged back from several lots, andtag:lotsplitmatched it, but in other reports that query matched nothing. Now this tag appears only with--lots. -
Fixed: a cost basis or lot selector with trailing zeros, like
{$46.00}, is now compared at its written precision (2 decimal places). Previously the zeros were ignored, so{$46.00}could select a lot costing $45.56, consuming the wrong lots and recording the wrong gain; and{$46.00} @ $45.56was accepted, silently replacing the written cost basis. -
When a disposal or transfer spanning several lots is shown as one posting (without
--lots), its cost basis annotation now keeps the details its lots share, eg{2023-06-25, 123.02 USD}, instead of just{}. (#2843) -
A "no lots available" error now names a later entry on the same date which would have supplied the lots, and explains that same-date entries are processed in the order they are read. This may happen when a transfer is recorded as two entries through a clearing account. (Recording lot movements with a single entry is preferred.) The manual's new "Transfers recorded in two entries" section suggests ways to make these reliable. (#2866)
Holdings
-
Fixed: the XIRR of lots received by transfer (or in an opening balance) is now measured from their acquisition date, not the transfer date (which could make it far too high), consistent with UGain and Age.
-
Fixed: holdings with
-Bshowed lots' costs as their units, a wrong Total cost, and no value or gains. Now-Bdoesn't change the report, as documented; it only makesbalance:andchange:terms with a commodity symbol test cost instead of value (see below). -
With
balance:andchange:queries, holdings tests each line's units, or its value if the query term has a commodity symbol (or its cost, with-B). Egholdings balance:'>1000'shows holdings of more than 1000 units,holdings balance:'>$1000'shows holdings worth more than $1000, andholdings -B balance:'>$1000'shows holdings that cost more than $1000. The totals cover just the lines shown. -
When the report period has a start date (
-b,-p,date:), the UGain, UGain%, RGain and XIRR columns now show the gains during the report period, instead of since acquisition, and the title names the period. Eg:hledger holdings -p today today's gains hledger holdings -b yesterday yesterday's and today's gains hledger holdings -p 2026-q3 gains in a past quarterGains are measured from the previous day's closing prices, so consecutive periods' gains add up. Units, costs, values and Weight still show the holdings at the end of the period.
-
With a report interval, the gain columns' period can be selected with
--change(gains during each period),--cumulative(gains since the report start) or-H(gains since acquisition, the default). And when the holdings are of a single commodity (eg withcur:), Units, Avg cost and Unit price columns are shown for each period. -
With a report interval and no end date, holdings' periods now continue up to today, since values change with market prices (previously they stopped at the last transaction).
-
With a report interval, the title now names the interval, like other reports' titles, eg "Quarterly holdings, 2026-03-31..2026-06-30, ..." (instead of "Holdings at period ends, ...").
-
When some holdings have no market price, the totals now show the other holdings' value and gains, and a note below the table names the ones excluded. Previously, one unpriced holding blanked the totals' Total value, UGain, UGain% and XIRR, from its acquisition until it got a price. With a report interval, the periods whose totals exclude some holdings are starred, in the table and the chart, and the JSON, CSV and TSV output list the excluded commodities for each period (
unpriced). A period's gains exclude the holdings unpriced at either its start or its end, so that they compare the same holdings. -
The Weight column is now shown even when some holdings have no market price; those are left out of the weights.
-
When closed positions (fully disposed commodities or accounts) are hidden, as they are without
-E, a note below the table now says how many, since the RGain and XIRR totals include them. -
A sold-off holding (shown with
-E) now shows $0 cost, value and UGain, instead of blanks, and a zero Total cost is shown with its commodity symbol. -
With
-S/--sort-amount, holdings are sorted more usefully. In list mode, every line (one commodity in one account) is sorted by its Total value, largest first, so that the Total value column reads in order. In tree mode, sibling accounts are sorted by their subtotals, and the holdings within each account by their Total value. Holdings with no market price come last, sorted by their Total cost. With-B, everything is sorted by Total cost instead. -
With colour, gains are shown in green and losses in red.
-
holdingsis faster with a report interval or start date, and XIRR calculation is faster (inroitoo): eg whereholdings -Mon a 5-year, 40-commodity investment journal took 13.1s, it now takes 6.2s.
Queries
-
Fixed: the prices command ignored
find:(::) queries. Now eghledger prices ::todayshows only today's prices, andhledger prices ::EURshows only the prices of EUR, or in EUR. -
find:(::) now also searches hidden tags, and tags inherited from account and commodity declarations. So eg::disposefinds lot disposals (by their hiddenptypetag), in any report.print --verbose-tagsshows hidden tags, when a match needs explaining. -
amt:can now include a commodity symbol, to compare only amounts in that commodity:amt:'>$100',amt:'<200 EUR'. This is easier than adding acur:term, which needs regular expression escaping (cur:'\$' amt:'>100'). The manual is also corrected:amt:without a commodity symbol matches multi-commodity postings if any of its amounts match. -
New
change:andbalance:query types match report rows by their summed amounts, unlikeamt:which matches individual posting amounts.change:tests a row's change (the sum of its postings);balance:tests its historical balance at the end of its period. Eg:hledger bal expenses change:'>+100' # expense accounts where more than 100 was spent hledger bal assets balance:'<0' # asset accounts with a negative balance hledger reg gifts -M change:'>100' # months with more than 100 in gifts hledger areg checking balance:'<0' # transactions after which checking was overdrawn hledger print not:change:0 # entries with a tolerated imbalance or unbalanced virtual postingsAs with
amt:, a commodity symbol (change:'>$100',balance:'<0 EUR') compares just that commodity. And an unsigned number tests the magnitude, ignoring sign (sochange:'>100'also matches a change of -150), while a signed number (or 0) does a signed comparison (egchange:'>+100',balance:'<-500'). Amounts are tested with their real sign, as shown bybalance(not the adjusted sign shown by--invertorbs/cf/is).balance:always means the historical balance, ie calculated from the start of the journal (with or without-H). In balance reports, non-matching accounts are left out, as with an account query, so parent balances and totals include just the matching accounts.
Reports
-
Fixed: with
-B,cur:andamt:match the original commodity and quantity again, as in 1.x and as documented. (Since 1.99.5,-Bconverted to cost before matching, so eghledger reg cur:AAPL -Bfound nothing.) The exception is a posting split across several lots (eg a sale from several lots, without--lots), which is matched as converted. Also,print -Bnow displays converted lot amounts with the configured display style (eg $1000.00, not $999.999980346). -
Fixed:
--value=WHEN,with nothing after the comma now values in the no-symbol commodity (previously it was read as--value=WHEN).-Xand--valuealso accept a double-quoted commodity symbol, so""also selects the no-symbol commodity. (#2844) -
Fixed: in roi, a failed IRR or TWR now shows "error" in its own cell, with the rest of the report (and any
--cashflowdetails) still shown. The reasons are shown as a warning after the report, and the exit status is 0. Also, some special cases have an answer instead of an error: when money is put in and nothing comes back (eg a write-off), IRR is -100%, and same-day cash flows that add up to zero have an IRR of 0%. Other errors are explained better. holdings' XIRR now uses the same solver, so a lot that has lost all its value shows -100%, and one bought on the report date at its market price shows 0%. (Dmitry Astapov, Arthur Cinader, #2845) -
register with no report interval now hides zero-amount postings unless
-E(or--average) is used, like register with a report interval, or aregister. This includes postings with amounts set by a balance assignment. (#2836)
Charts
-
Accounts are now always coloured by their account type, so a hue means the same in every chart, and an account keeps its colour when drilling down (eg from
isto its expenses). Each type now has eight shades instead of four, shared evenly between its accounts, and in single-period charts each account's bar has its own shade. Accounts of unknown type still get distinct hues. -
Charts now draw the net total line only when it's asked for, by including
netin--chart's value (eg--chart=net, or--chart=grouped,net,5000). Text charts still show it as a number on each row, and chart data (CSV, TSV, JSON) always includes it.--chart's KIND andnetcan be given in either order, before any SCALE amounts; giving two KINDs is now an error. -
balance --chart=groupednow draws a bar per account type in each period, side by side: assets, liabilities, equity, revenues, expenses, then any accounts of unknown type ("Other"). Previously, balance ignored grouped. The chart's JSON data now includes each series' group, and the groups' names. -
Compound reports' charts (
is,cf) now use the diverging layout by default, likebs's (all accounts stacked in one bar per period). The side-by-side layout can be selected with--chart=grouped. -
SVG charts over time now consistently show the net or total as a continuous line (when enabled).
-
Charts of end balances (eg
bs) now also show an average with-A, below the chart, and in graphical charts, as a dashed line. -
A single-period balance chart (a bar per account) now shows the report's total below the chart, eg "Total $2" (except with
-Nor--percent). -
A chart now also shows its legend when there is just one account.
-
In SVG charts, a line's tooltip (eg the net line's, or the dashed average line's) now shows anywhere along it, not just near its points. And the tooltip of an "other (N accounts)" series lists the accounts it combines, largest first, up to ten.
-
The single-period holdings chart is now drawn as horizontal bars, with every holding's gain percent at its right, and room for long account and commodity names.
-
With a report interval and
--changeor--cumulative, the holdings chart now shows the gains which the table shows: realised gains solid and unrealised ones hatched, losses below zero, and the net gain. Previously it always showed the cost basis and value, whose gain is since acquisition. -
In holdings charts, gain percents are shown in green and loss percents in red.
Other commands
-
Fixed:
check ordereddateswith--forecastnow ignores generated forecast transactions, which could make it fail. -
accounts --show-aliasesshows each account's aliases (declared by alias: tags or Ledger-style alias subdirectives), as a comment. And with it, account name queries also match aliases, so eghledger accounts --show-aliases chkfinds the account aliased as chk. -
accounts --locationsnow also shows locations for undeclared accounts, eg "undeclared, first used at main.journal:12". And locations are now shown as FILE:LINE, without the column number. -
When
check accountsfinds an undeclared account name which is an account alias not in effect there (eg declared in another file tree, or after the entry), the error is now more helpful, explaining alias scope.
Performance
-
Journals with many balance assertions, or quoted commodity symbols, are parsed faster: eg 2.05s -> 1.09s for a 38k-transaction journal with assertions in half its transactions. (Dmitry Astapov)
-
Journals with lots are processed faster: eg 2.54s -> 2.09s with a real 38k-transaction journal. (Dmitry Astapov)
-
Tables with many-line cells, eg register with a many-commodity running balance, are rendered faster: eg 10.7s -> 8.2s with a real 38k-transaction journal. (Dmitry Astapov)
Examples
- examples/templates is now examples/file-layouts, with simple, default, years and year-dirs layouts, a readme, and a check script.
The simple, default and years layouts are what
hledger initwrites. - examples/lots/investments-5y.py generates a large investment journal, for measuring holdings, roi and lots performance.
- examples/hbcexample.journal is a copy of bcexample.journal with current dates and valid hledger 2 lot entries.
Scripts/addons
- bin/git-pre-commit-hook is an example git hook which runs
hledger checkon your journal when its files are being committed. - hledger-check-fancyassertions is removed (see Assert rules).
Docs
- Amount expressions are no longer marked experimental.
- The Commodity aliases section is reorganised and clarified, including their two scopes:
they convert amounts only within their own file tree, but act as last-resort exchange rates in all file trees with
-X. - Lots: new "Basis and transacted cost must agree" and "Transfers recorded in two entries" sections;
plain
@costs create lots only for lotful commodities (#2855); Capitalising fees moves from Transfer to Acquire. - roi: lots without
--pnl, and checking values with balance. (Dmitry Astapov) - Smaller fixes: Command aliases (Andreas Pauley), CSV Matchers, CSV functions, the payee directive, and a link to the CSV workflows comparison.
hledger-ui 2.0
Fixes
- Fixed: with
--pivot, re-enabling checks withIdid not really recheck them, so failures went unreported.
Improvements
-
hledger-ui supports the new assert rules (see the hledger changelog). They are checked when the journal is loaded or reloaded, and when checks are re-enabled with
I. They always see future-dated ordinary transactions, even when those are hidden behind theFkey. They see transactions generated by periodic rules only when--forecastis used. -
CTRL-cnow quits, likeq, from any screen or mode, including while the help or a minibuffer is open. Previously it was ignored. -
Clicking a background hledger-ui window now just brings it forward, without also selecting or entering the item under the pointer.
-
Allow brick 3.1. (GuillaumedeVolpiano)
hledger-web 2.0
Fixes
- Fixed: the add form, JSON API (PUT /add), edit and upload now refuse a change which would make the journal unreadable.
They check it as the next read (with hledger-web's startup options) would, and on failure leave the file unchanged.
Eg /add can no longer add unbalanced transactions, the add form now checks balance assertions,
and edit and upload now respect
--strictand-I. (#2864, #2869)
Reports
-
hledger-web now opens on the balance sheet, rather than the journal, and with a default report interval, chosen to suit the period shown (monthly for up to two years, quarterly for up to six, otherwise yearly). To remove the interval, choose None in options or press the current interval's hotkey again.
-
hledger-web now shows depth 1 by default: just the top-level accounts, so that tables and charts start simple and readable.
depth=all(the deepest Depth link, or the last+step) means no limit. -
Deeper accounts are easier to reach:
-and+steps beside a table's Account heading change the depth by one level (in tree mode, folding or opening a level of the whole tree), with a List/Tree switch beside them. -
The Options panel's summary (when closed) now consistently shows the depth and interval. Some options are shown muted when they don't affect the current page.
-
The Show options row now lists Balance changes, Cumulative totals and Ending balances, in the same order as hledger's
--change,--cumulativeand--historical. -
Search supports hledger's new
change:andbalance:query terms, andamt:with a commodity symbol, and::(find:) also searches hidden and inherited tags. The search help is updated. (See the hledger changelog.)
Holdings
-
When the report period has a start date, the gain columns show the gains during that period, and the heading names it.
-
The holdings page can show a report interval, like
holdings -M: the holdings' totals at each period's end, with a bar per period in the chart. Each date links to the holdings on that date. The holdings page shows current holdings, with no interval, by default; it keeps its own interval, independent of the other pages. A Gains option chooses what the gain columns cover: each period, the time since the report start, or the time since acquisition (the default), like--change,--cumulativeand--historical. TheHkey switches between the first and last of these. -
The
zkey shows or hides closed (fully disposed) positions. When they are hidden, a note below the table says how many, with a link which shows them. -
Gains and losses (UGain, UGain%, RGain and XIRR, and their totals) are shown in green or red, like the holdings command.
-
Other holdings command improvements (sorting, charts, handling unpriced holdings) apply here too (see the hledger changelog).
Sidebar
-
The sidebar has a button, visible on all screen sizes.
-
The sidebar now always lists the full account tree, for navigation. It has its own independent persistent account depth, defaulting to 1, adjustable with the fold carets or
-and+controls or a shift-DIGIT key. -
The sidebar balances are now hidden by default, making pages with a large journal about twice as fast, and smaller. Clicking the Balances heading, or pressing the
bkey, toggles them. They are now historical balances, as of the current report end date, which is shown. The total's label and tooltip has been improved.
Charts
-
Charts and data tables now have a visible clickable heading to toggle them.
-
Charts can be switched between Diverging (default) and Grouped layout at runtime with the Chart option.
-
Charts' net total lines are now hidden by default, and toggleable with the
Nkey. -
hledger-web --chartnow accepts the same values as the commands'--chart: a layout,net, and SCALE amounts. Withnet, net total lines are shown at first (but a viewer's own choice withNtakes precedence). SCALE amounts fix the scales of the report and register charts, so that they can be compared. -
Charts are redrawn smoothly when the sidebar or full window mode are toggled or the window is resized, utilising the available space.
-
Charts now show clearer, immediate tooltips, and with support for touch screens.
-
The chart improvements in hledger apply here too (see the hledger changelog).
Navigation and keys
-
The
nandpkeys go to the next and previous page, with nogprefix required. (nno longer opens the add form; useafor that). -
The
deleteandbackspacekeys clear the search, as in hledger-ui.
project changes 2.0
Docs
- AI: using AI tools efficiently
- ai/README: heading and link updates
- DECISIONS: why a same-day lot entry reordering proposal #2866 was declined; why error positions show only file and line
- PERFORMANCE: benchmark with realistic account names and commodities
- PLAN-gain-terms: short-term/long-term capital gains planning
- PLAN-release-2.0: the 2.0 release
- RELEASING, changelogs skill: updates from the 1.99.6 release
- SPEC-assert, SPEC-balance-change-queries: the design of assert rules and change:/balance: queries
- TESTS: how to drive hledger-ui from a script, with tmux
Tools/infrastructure
- ANNOUNCE: approximately-sized versions for Mastodon and Bluesky/X
- binary-badges skill: site commits carry the AI usage line
- chartsdemo:
just chartsdemo-page FILEandjust chartsdemo-images DIRsave the demo charts (html, SVG and PNG), eg for the site; the demo uses examples/hbcexample.journal, and includes holdings, grouped and net charts - pcc skill: hledger's pre-commit checks
- stack: stack.yaml and stack912.yaml use the latest nightly snapshot
credits 2.0
Simon Michael, Dmitry Astapov, Andreas Pauley, GuillaumedeVolpiano.
2026-11-01 hledger-1.99.6
(2.0 preview 6)
Built-in terminal/svg/html charts, --view flag, multi-report html, amount expressions, CSV rules functions, holdings and roi improvements, hledger-web power user features, twelve UI languages.
hledger 1.99.6
Breaking changes
In brief; each is described more fully in its section below.
-
The test command is now an option,
hledger --test. (Command line) -
aliasdirectives are now applied beforeapply account, as in Ledger. (Journal format) -
A repeated commodity declaration now adds to the earlier one instead of replacing it, and with several
-ffiles the last file's display style is used, not the first's. (Journal format) -
An unquoted commodity symbol can no longer begin with
(before the number, or/after it, because of the new amount expressions. (Journal format) -
activity now shows transactions per week, as a chart;
activity --postings -D -0gives the old report. (Reports)
Command line
-
Fixed: stats with
-o FILEwrote only the last part of its output (the run time line) to the file. Now the file gets all of the output. -
Fixed:
print -o FILE.ledgerwrote journal format; now it selects ledger format, like-O ledger. Also print's default output format is now called "journal" ("txt" is still accepted). -
The quick reference card (
hledgerorhledger help) and commands list (hledger help commands) are reorganised and updated. -
The test command is now an option:
hledger --test[=PATTERN]runs the built-in unit tests (or those matching PATTERN). -
--help,--versionand--testnow work despite config file errors, and config file errors say how to run without the config file (-n). -
When an
-Ovalue looks like a file name, the error suggests-oinstead. -
The
--ignore-lotshelp says more clearly what it skips: lot checks, inferred cost bases and gain postings. -
Queries like
desc:or::, where the regular expression pattern is left empty, now match anything. (Previously they gave an error.)
Data import
-
getnow shows the getdata script's output on stderr rather than stdout, and labels the helper commands it runs ("running: ...", or "would run: ..." with--dry-run). -
When a CSV rules file's
sourcecommand is run, the message now names the rules file responsible, eg "bank.rules: running source command: CMD", distinguishing it from get's messages. -
In CSV rules, a hledger field's value can now be referenced in value assignments. This means you can now append to a comment, building it up from several if rules.
-
CSV rules now can transform values by calling functions in
%{...}expressions; upper, lower, capitalize, trim, negate, abs, concat, default, replace, substr, join are supported. Eg%{capitalize(%desc)},%{default(%payee, %desc)},%{replace(%desc, "ref#[0-9]+", "")},%{join(", ", %note, %ref)}. -
In CSV rules, if tables use a new
ifskeyword, which allows aligning their delimiters (the oldif<DELIMITER>...still works). The header line can have spaces around field names, spaces around values are ignored, and a blank value no longer assigns that field. Error messages say "if rule" and "ifs table", and are worded more clearly.
Journal format, accounts
-
Fixed: account declarations now accept the full type name, Gain (not just G).
-
Fixed: when several accounts were declared with the Gain (or Conversion) type, generated gain and conversion postings used the alphabetically first; now they use the first declared, as documented.
-
Fixed: a subaccount-inclusive balance assignment like
a =* $0could also change other commodities' balances in subaccounts. Now it changes only the assigned commodity. (#2772) -
Fixed:
end aliasesalso cancelled--aliasoptions, for the rest of that file and the files it included. Now it cancels only the account aliases declared in the journal. -
aliasdirectives/subdirectives/tags are now applied beforeapply account, as in Ledger, so that a file's aliases keep working when it is included underapply account. If you hadapply account Xand thenalias X:foo = ..., that alias should now be writtenalias foo = ....--aliasoptions still apply last, to the full account names. (#2733) -
check accounts (and strict mode) no longer require declaring the accounts that hledger chooses for generated postings.
Journal format, commodities
-
Fixed: amounts written in a commodity alias which converts inexactly (eg
10 minto hours) could fail balance assertions or get inexact costs, and once converted they kept the alias's display style. Now they are exact, with the commodity's style. -
A repeated commodity declaration (in the same file, an included file, or another
-ffile) now adds to the earlier one, instead of replacing it: commodity aliases are combined, a display style replaces the earlier one only if given, and later tags take precedence. With several-ffiles, the last file's display style is now used (previously the first's);--debug=1shows any that differ. Redeclaring a commodity alias with a different quantity is an error. -
Commodity aliases are now used as a last resort exchange rate (for
-V,-X,--value), so eg-Xcan value amounts written in an alias declared by another-ffile.prices --show-aliaseslists these rates, and--debug=2shows when they are used. An alias declared differently by different files can't be used for conversion. -
Amounts in a commodity alias (shown eg with
-X ALIAS, or by print) are now displayed with the canonical commodity's number format (precision, decimal mark, digit groups), unless the alias has its own commodity directive. (Previously they used the format of the amounts written with the alias.)
Journal format, other
-
We now support posting amounts written as arithmetic expressions, like
$50.20 + $16.54,$800.00 * 1.05or($92.00 + $15.00) / 3.+,-,*,/and parentheses are supported. The results of*and/are rounded to the entry's decimal places. See Amount expressions in the manual for full details. To avoid clashing with these, an unquoted commodity symbol can no longer begin with(when written before the number, or with/when written after it; eg(A) 10or10 /kgmust now be written like"(A)" 10or10 "/kg". (Martin, #2648, a bounty funded by James Shubin) -
A
date:ordate2:tag with an empty value in a posting comment is now accepted, setting no date. This helps when reading Ledger journals.
Transaction balancing
-
Fixed: in entries with balance assignments,
check balancedand strict mode didn't catch implicit commodity conversions, and--txn-balancinghad no effect. Now they work as expected. -
Fixed: an inferred unit cost could be shown with too few decimal places (eg
@ 33.33 B), soprint -xoutput could be rejected as unbalanced when read back. Now it is shown exactly, or with 8 decimal places if it's a repeating decimal. In other cases too, print shows repeating decimals with 8 decimal places, not 255. -
--txn-balancing=exact|oldis now--txn-tolerance=entry|display, meaning "balance transactions within the entry's precision" (preferred) or "within display precision" (to keep old hledger 1 journals working). The old spelling still works. -
--infer-imbalanceaddsequity:imbalancepostings to exactly balance entries which are balanced only when rounded to the entry's precision (eg because of a rounded @ cost). So totals at cost become exactly zero, and the accumulated imbalance can be seen. A new Imbalance (M) account type, a subtype of Equity, can be used to select a different account.
Lot tracking
-
Fixed:
close --lotsoutput couldn't be read back when lots used AVERAGE or AVERAGEALL, since their lot names had no cost. Now close adds the pool's average cost to each lot name. -
Cost basis annotations and lot subaccount names with their parts out of order, eg
{$50, "note"}, now give an error stating the required order,{DATE, "LABEL", COST}, instead of a confusing parse error. -
Explicitly-written gain amounts which are within the entry's precision of the calculated gain, are now replaced internally by the exact calculated gain, so bal -B totals are exactly zero.
Time logging
-
Timedot's mo and y units were 7 times too large; now they are 30 and 365 days, as documented. (Wrong since hledger 1.4.)
-
Timedot and timeclock durations are no longer rounded to 0.01 hours, so totals don't drift, and a timeclock session crossing midnight no longer loses a second.
Reports
-
Fixed: roi's TWR is now computed from the investment's value at the end of each day, exactly, at daily granularity. The previous linked-IRR method's choice of valuation dates was error-prone, and its solving could fail. Results change for most journals with cash flows between valuations; if you record valuations only occasionally (eg with
--pnltransactions), record one around large deposits and withdrawals. Also, cash flows are now measured from the investment's perspective (other postings in the transaction, eg fees, no longer affect them), a holding without a market price is valued at the price of its latest purchase or sale, the value at the end of a period uses the prices of its last day, and--cashflowshows each cash flow and the TWR steps, for checking the results. These can change IRR results too, eg with fees not matched by--pnl. See the roi docs. (Dmitry Astapov, #2824, #2825) -
Fixed:
--countreports showed counts in the journal's no-symbol commodity style (eg 1.00), rounded their averages to whole numbers, and bs/bse/is showed negative counts in some sections. Now counts are shown as whole numbers, averages have one decimal place, and bs/bse/is show positive counts in every section, and their sum as the net total. balance--countreports are now titled "Posting counts". -
activity now shows transactions per week by default, and uses the new chart engine (see below).
--postingscounts postings, per account;activity --postings -D -0gives the old report. It now supports-w/--width,-S,-T,-A, and svg, html, csv, tsv and json output. -
--viewopens a report in the system's default viewer for the report's format. It writes an output file if you did not specify one (in hledger's cache directory), and chooses html format if you did not specify that. This is convenient for viewing reports, eghledger is -M -o is.fods --vieworhledger is -M --chart --view. It works with print, register, aregister, the balance commands, holdings, activity and run. -
runwith-O html,-o FILE.htmlor--viewnow writes its commands' outputs as one combined html page, with a folding section for each command, and links to show just titles, charts, or all data. Eg:hledger run --view -- is -M --chart -- bs -Q --chart. -
In html output with
--base-url, register links now name the account with anaccountparameter, can convert amounts as the report did (with-B/-V/-X), and work for account names containing double quotes (eg labelled lots). Tree mode account cells havedepth-Nclasses (the account's depth), and the row indent classes are nowindent-N(notdepth-N). (Arthur Cinader, Simon Michael)
Charts
-
hledger now has easy charting built in. Most reports can be shown as charts, with
--chart. In the terminal, these will be bar charts, using colour and Unicode block characters when supported. Charts adapt to the report options and data, showing subperiods, stacked bars, net amount/end balance marks, contra amounts hatched, largest amounts prioritised, totals/averages, etc. Each commodity gets its own chart. If csv, tsv or json output is selected, the chart's data is shown instead. -
Charts can also be SVG images, with tooltips and light/dark variants, enabled by a new svg output format (
-O svgor-o FILE.svg). Or, SVG charts can be added to html reports (-o FILE.html --chart). See also--viewandrunbelow. (Simon Michael, Arthur Cinader) -
When colour is available, accounts are coloured by type: assets blue, liabilities amber, equity violet, revenues green, expenses red. In a multi-period chart whose accounts are all of one type (eg
bal --chart -M type:X), accounts get stable unique colours instead, to help distinguish them. -
In compound reports like bs and is, you can override the default layout of subreport amounts by writing
--chart=grouped(side by side) or--chart=diverging(opposite sides of the axis). -
By default, each chart uses all available space. Or you can write
--chart=SCALE(eg--chart=5000) to draw them at a fixed scale, allowing separate charts to be compared visually. Chart layout and scale options can be combined, with the layout first, eg--chart=grouped,5000.
Holdings
-
Fixed: holdings' totals row left out the realised gains of accounts which had sold all their holdings, in list mode (the default) and with
--lots, so its RGain and XIRR could differ from tree mode or-E. Now they always include them, as documented. (#2769) -
holdings' tree mode now groups holdings into account sections: an account with subaccounts or several commodities is a heading row showing its subtree's totals, followed by its own holdings and its subaccounts. Previously there was a row per account and commodity at every level, which made the tree much larger. Its csv, tsv and json output is now the same as list mode's: one record per holding (or lot, with
--lots), without the heading rows. (Arthur Cinader, #2779) -
holdings is now faster when there are many lots, eg 1.1s -> 0.3s with ~700 holdings. (Arthur Cinader)
-
With a report interval (eg
-M,-Y), holdings now shows the totals at each period end. -
holdings has a chart, showing a bar per holding (or lot) with its cost basis, unrealised gain or loss, and gain percentage. Or with a report interval, it shows the overall stats per period.
Translations
-
hledger, hledger-ui and hledger-web can now be shown in 12 languages: English, Brazilian Portuguese, Chinese, French, German, Hawaiian, Irish, Italian, Japanese, Russian, Spanish and Ukrainian. Gaps in human translations are filled by machine translations, which are marked for review. Native speakers' help is welcome; see TRANSLATING. (Daniil Iaitskov (Russian), Diego Depaoli (Italian), Henning Thielemann (German), Chunhui Ouyang (Chinese), Simon Michael)
-
hledger --write-lang=LANGwrites the current po file for a supported language, or a starter po file for a new language, into hledger's config directory. This is an easy way to start improving or adding a translation; edit the file, then run hledger with--lang LANGto test it.
Performance
-
Regex replacement no longer takes quadratic time in the length of the text. With hledger's typically short account names and CSV fields there may be a small speedup; unusually long ones (eg regex aliases on 2000-character account names) are much faster than before.
-
check accounts, check payees and check tags are faster with many declarations (eg 0.63s -> 0.20s with 10k transactions and 10k declared accounts).
Examples
- hledger.conf.sample is updated, with command-listing helpers.
- bcexample's beancount prices are converted to P directives, so -V works.
Docs
- The manual has new Charts, Amount expressions, Amount arithmetic, Transaction balancing and Built-in tests sections, and updated lots, reconciling, troubleshooting lots, commodity aliases and hledger 1 vs hledger 2 sections.
- The CSV docs are reorganised, with clearer explanations of reading the data, finding the data, if rules and ifs tables, and rules examples moved into Working with CSV.
- The alias directive, account aliases and directive scopes are explained more clearly, including combining file trees.
- The commands chapter is grouped like the commands list.
hledger-ui 1.99.6
Fixes
-
Pressing B to turn off cost now works when hledger-ui was started with -B. (Broken since 1.99.5.) (Arthur Cinader, #2812)
-
With lot detail hidden (the default), B showed a sale that took from several lots at its sale price, instead of at the lots' cost basis. Now it agrees with the command line. (Broken since 1.99.4.) (Arthur Cinader)
Improvements
- hledger-ui can be shown in more languages (see the hledger changelog).
hledger-web 1.99.6
Breaking changes
-
Startup options and query arguments now set up the opening page, as url parameters, instead of acting as invisible server-side defaults and filters. So every view is described by its url, and a shared link shows the same view to everyone. But a startup query no longer restricts what hledger-web serves: it becomes the first page's search, which a viewer can edit or clear, and the JSON API serves the whole journal. To serve a restricted view, serve a restricted file. (Arthur Cinader)
-
Some keyboard shortcuts have changed, to match hledger-ui; see below.
Navigation and keys
-
Navigation links are now also shown at the top of the page, so you can navigate with the sidebar closed. (Arthur Cinader)
-
gthen a key goes to another page via a dropdown menu, so you can navigate to most places with the keyboard. -
Keyboard focus is managed better; after a page load or a search, keyboard scrolling or keyboard shortcuts work, without having to click the page first.
-
ato open the add form now works on all pages, not just the journal. -
ftoggles full window mode, showing only the report. -
/positions the cursor at the end of the search field, for easier editing. -
escapeexits the search field, or full window mode, in addition to cancelling things, and without exiting the browser's full screen mode. (A second press will exit full screen mode). -
The help popup has been cleaned up, and now links to hledger-web's manual on the website. (Arthur Cinader, Simon Michael)
-
Keyboard shortcuts for adjusting report options are provided, similar to hledger-ui's. (Arthur Cinader, Simon Michael)
Reports
-
The report pages have a new Options panel, offering most of hledger's report options and filters, so reports can be reshaped in the browser. The options are kept as you move between pages, and every view has a shareable url. (Arthur Cinader, Simon Michael)
-
Report urls are simpler, and queries and parameters are used more consistently, eg
/register?account=assets:bankorinterval=monthly. Old bookmarks still work. (Simon Michael, Henning Thielemann) -
hledger's holdings report is now available in hledger-web, for journals using lots. In tree mode, accounts are heading rows with subtotals, and lots fold beneath their holdings. (Arthur Cinader, Simon Michael)
-
A Lots option is provided for journals using lots, allowing display of lot subaccounts to be toggled. (Arthur Cinader)
-
In list mode, account names show their parent path dimmed, and a prefix shared by all the accounts is shown once. (Arthur Cinader)
-
Tree mode now folds items at the requested depth, and you can click individual items to expand them. Boring parent accounts are squashed, and the depth limit corresponds to account depth not indent depth, as on the command line. (Arthur Cinader, Simon Michael)
-
Percentages that can't be calculated now show plain amounts with an explanation, instead of an error page. (Arthur Cinader)
-
A long sidebar balance no longer covers its account name. (Arthur Cinader)
-
In the sidebar, an account name stays beside the first line of a multi-commodity balance. (Arthur Cinader)
-
A register's running balance of many commodities now shows just the row's own commodities, eliding the others. (Arthur Cinader, #2784)
-
Amounts and their commodity symbol no longer break across lines. (Arthur Cinader)
-
Journal and register headings name the search's dates, like other pages.
-
There's now just one balance sheet page, with Equity as an option.
-
The balance report is now called All accounts, as in hledger-ui.
Charts
-
hledger-web's reports now show a chart at the top.
canddtoggle display of the chart and the data (persistently), so you can use hledger-web with either or both visible. (Simon Michael, Arthur Cinader) -
The register chart has been replaced with hledger's new SVG implementation. jQuery and Flot are no longer used, so pages load about 155KB less javascript. The chart shows one commodity at a time. (Arthur Cinader, #2800, #2784)
-
When there's more than one commodity, the
[and]keys steps between their charts.
Other
-
hledger-web now supports more languages (selected with --lang at startup; see the hledger changelog). And the add form's validation messages use the chosen language in more cases.
-
hledger-webs running at different ports on one host remember their own report and display options, and pages keep their scroll position. (Simon Michael, Arthur Cinader)
-
Browsers now check for updated scripts and styles, so they don't keep using old ones after an upgrade (which could eg cause new keys to do nothing).
-
hledger-web now requires wai-app-static >=3.1.9 and yesod-form >=1.4.12.
-
The manual has been updated, with a rewritten REPORTS section and a new URL PARAMETERS section.
project changes 1.99.6
Docs
- updated: Upgrading, Charts, Beancount, Ledger
- CODE: queries vs report options; report periods, intervals and date spans
- PERFORMANCE: updated for Tackler 26.10.1; why the flat balance report is compared; measured build labelled 1.99.5
- RELEASING: lessons from the 1.99.5 release; previews also get release notes, a manuals snapshot and announcements
- SPEC-charts: the built-in charts' design and decisions
- TESTS: hledger-web's server tests and browser tests compared
- TRANSLATING, locale/README: updated for the current translation workflow and translator credits
Tools/infrastructure
- build: git changes now recompile only the GitInfo module (7.8s -> 4.8s for hledger); hledger-ui and hledger-web drop githash
- chartsdemo:
just chartsdemo,just chartsdemo-htmlshow a representative set of charts - functest: tests are isolated from the user's home directory; sorting uses LC_COLLATE=C, as in CI
- i18n: the template is in source order, grouped by program, with key terms noted; i18n-merge runs without fuzzy matching or wrapping;
just i18n-web LANGshows hledger-web's pages in a language; added a translations skill for AI assistants; all machine translations are marked - Justfile: recipes now recompile ./Shake when needed, avoiding stale scripts
- Shake changelogs: skips announcement and version-bump commits
- systemd: hledger-web service file updated (Patrick van de Glind)
- doc/ai: the journal is rewritten with all known data; usage is now imported from commits' AI usage lines; more disclosure styles are recognised;
the README now shows usage, cost, equivalents and forecast reports; the ai just recipes moved here, run with
just ai ...
credits 1.99.6
Simon Michael, Arthur Cinader, Henning Thielemann, Dmitry Astapov, Martin, Daniil Iaitskov, Diego Depaoli, Patrick van de Glind, Chunhui Ouyang. The amount expressions work was a bounty funded by James Shubin.
2026-10-01 hledger-1.99.5
(2.0 preview 5)
The fastest hledger yet (4x faster than 1.99.4, 2x faster than 1.52), UI translations (--lang), find-anywhere query ( :: ), compact transactions report, lossless print --export, CSV multi-record merge rule, includable CSV/rules files, simpler balancing and gains using cost-basis, lot tracking fixes, short positions, hledger-ui auto-updates by default, hledger-web balance reports/paging/dark mode.
hledger 1.99.5
Breaking changes
These can affect journals and rules files that work with hledger 1:
-
With a decimal-mark directive (or CSV rule) in effect, a number using a different decimal mark (1,000.00 when decimal-mark , is declared), or using the declared mark more than once (1.2.34, previously read as 1234), is now an error. #1985, #1904
-
In CSV rules files, * at the start of a line is no longer a comment character; comment lines begin with # or ; only. (Previously a matcher line beginning with * was silently read as a comment, disabling the if block. Now it is rejected as an invalid regexp, with a suggestion to escape it.
-
A lot acquisition's {} cost basis and @ transacted cost must now agree; a difference is an error (and
basischeck is removed). Legacy files with a decorative {} different from the transacted cost still load. if you use -I or --ignore-lots.
Some other breaking changes only affect behaviour introduced in a 2.x preview release, and are documented in the sections below.
Command line
-
setup: detects terminal colour support and explains the colour verdict; the "accounts of all types exist" check has been simplified; and minor display improvements.
-
A new --lang=LANG general option for hledger, hledger-ui and hledger-web (also usable in config files) shows report titles, headings, month names etc in another language. English (--lang=en, default), German (--lang=de) and Simplified Chinese (--lang=zh) are built in; or --lang=auto will choose based on your system locale. You can add or override a translation by installing a gettext PO file at $XDG_CONFIG_HOME/hledger/locale/LANG.po; no compilation is needed. New translations are welcome ! See the manual's Languages section. (Arthur Cinader, Henning Thielemann, Chunhui Ouyang, Simon Michael, #2736)
-
Multi-period reports with more than 10000 periods, or a --forecast generating more than 100000 transactions, now print a warning, so you can cancel. Such numbers usually mean a mistyped date, and could use many gigabytes of memory. #1683
-
hledger is now built with GHC runtime system options enabled. So eg you can use
hledger +RTS -M2G -RTS ...to cap memory use (an overflow will raise an error rather than consuming all memory). Or+RTS -cto use 20-40% less memory at the cost of speed. Previously only statistics options like -s were accepted. -
A hyphenated date range like 2026-13 is no longer interpreted as "from 2026 to the 13th of this month"; it is rejected as a mistyped date instead. (To express that date range, use 2026..13).
-
-o - now writes to stdout, as documented. And when using -o FILE, an error no longer leaves an empty or truncated file behind.
-
On Linux, output redirected to a file on a network drive (eg a CIFS mount) could be silently truncated; this is now fixed.
-
The --infer-costs and --infer-equity had their help strings swapped; fixed.
-
check: an unknown check name is now reported right away, instead of only after reading the journal and passing other checks.
Journal format
-
Commodity aliases now require individual alias tags, and single-quoted symbols are no longer accepted. So
; alias: $ US$ 'US dollars'should now be written as; alias: $, alias: US$, alias: "US dollars". -
A commodity alias can optionally specify a multipler, for expressing differently-sized units. Eg
commodity h 1.00 ; alias: 60 minorcommodity $ ; alias: 0.000001 megabucks. -
Amounts using a commodity alias are now automatically converted to the canonical commodity symbol. So with
commodity USD 1.00 ; alias: $, $100 and 100 USD are both treated as USD, and can balance against each other. print still shows the symbols as written, whereas print -x shows them converted. The sym: query is removed. -
Like commodity directives, account directives can now declare aliases via alias tags. Eg
account assets:bank:checking ; alias: checkingis equivalent to writingalias checking = assets:bank:checkingdirective at that point in the file. For Ledger compatibility, an indentedalias NAMEsubdirective is also accepted. -
One or more adjacent comment lines directly above a transaction (a "preceding comment") are now considered part of the transaction, and will be shown when the transaction is printed.
-
Single tab is once again not sufficient as the separator between account and amount (reverting 1.99.4's change). Instead we keep the consistent hledger 1 syntax: two or more spaces or tabs are needed.
-
check tagsnow also checks commodity directive tags. Andaliasandlotsare recognised as builtin tags, and need not be declared. -
An old limitation has been lifted: journal files can now
includeCSV/SSV/TSV files or CSV rules files.include FILE.csvalways uses a nearby FILE.csv.rules file; for more flexibility, include the rules file and specify the data with a source rule.
Data import
-
CSV rules files allow more flexible commenting. Comment lines or blank lines can be used inside if block, and comment lines inside if tables can be indented.
-
A new merge rule combines several CSV records into one transaction.
merge(ormerge N) appends the next record(s) to the current record, naming their fields with a _ROWNUM suffix: %description_2, %4_2, etc. This is useful for banks and brokers which export a currency conversion or stock trade as multiple rows. -
CSV error messages are much improved, making troubleshooting easier. They show the CSV file and record position with an excerpt; the record's field values with their numbers and names; where each field's rule was defined, and any rules it overrode; and if a CSV-converted entry is rejected later (eg by balancing), the record it came from. This also affects balance assertion errors and print --location.
-
hledger getnow preserves the format of existing prices when merging new prices.
Lot tracking
-
--ignore-lots or -I now silence lot errors without adding new ones; previously some valid lot entries failed to balance with it.
-
Lot error messages are now clearer and more compact: they point at the problem posting, the explanation comes first, and long lot lists are elided. Also lot errors are now reported before balance assertion failures, since they usually indicate the more fundamental problem.
-
Lot disposals now balance at cost basis, using just a single realised gain posting. The equity:unrealised-gain counter-postings used by the earlier 2.0 previews are no longer used; if you have written any of these explicitly, you'll need to remove them. (And the UnrealisedGain account type remains supported, but is not currently used.) This is historical cost accounting, as used in hledger 1, and it preserves the accounting equation and bse's zero total. Also amountless gain postings are allowed once again, and the amount will be inferred, as expected. #2731
-
--infer-equity in disposals now records the units sold at cost basis rather than sale price, so
bal --infer-equitytotals zero instead of minus the realised gains. #2751 -
print now always shows lot postings with an explicit cost basis by default, eg
10 AAPL {$50} @ $50or-5 AAPL {2026-02-01, $50} @ $70, so that plain print output stays re-readable now that disposals balance at cost basis. print --lots, print --export and rewrite show entries as they were written. -
-B/--value=cost now converts lot postings at their cost basis. Non-lot amounts are unaffected. But for lot balances, -B now shows the cost of the units still held, and bse -B balances to zero. The old behaviour of -B can be enabled for lot balances by using --value=transacted, which shows proceeds and net cash invested.
-
--gain now shows value minus cost basis, however costs were written: with @ or @@, with or without --lots. #2751
-
Short positions (units sold before they are bought) are now supported, as lots in a Liability-typed account, where the lot flow is reversed: a negative posting opens a short lot, whose cost basis is the short-sale price, and a positive one covers it, with the gain calculated like any disposal's. Balancing, print --lots, -B, -V, --gain and holdings all work for shorts. #2756
-
Miscellaneous fixes: a {{TOTAL}} basis on a negative posting gave a negative unit basis, so the disposal never matched its lot; closing lots to equity (close --lots) could book to a wrongly-named lot subaccount when the closing entry omitted hledger's generated label, as when combining yearly files; a multi-lot stock split could be misread as a transfer; auto-generated lot labels could be reused after disposal; a zero-cost lot's name lost its commodity symbol; and balance assertions on a lot's base account were dropped in the collapsed view.
Holdings
-
holdings' column headings now clearly say whether they are per unit or a total: Unit cost, Unit price, Total cost, Total value. (In CSV/TSV/JSON output and HTML cell classes: unitcost, unitprice, totalcost, totalvalue).
-
The totals row now shows the overall average cost per unit, and the total units, if all holdings are in one commodity.
-
Fixes: when lots were held in both an account and its subaccount, the parent's row was dropped in list mode, losing its lots from the totals; Units could include a non-lot-tracked account's units; and Avg cost and RGain could show the wrong number of decimal digits.
Reports
-
A new "find anywhere" query, written as
find:PATTERNor::PATTERN, tries to match a regular expression in any of a transaction's fields (code, description, comment, account name, or amount); and if PATTERN can be parsed as a period expression, it will also match dates within that period. This allows many queries to be written more briefly, especially when you're not sure where some text might be. Eg::2025 ::foodmatches things in 2025 (or mentioning "2025") and mentioning "food", in any field. -
A new transactions (tx) command lists transactions on one line each. It replaces the print --oneline flag that was added in 1.99.4. It's like print but better for seeing a quick overview.
-
The commodities, tags and payees command now have a --directives flag, which shows directives ready to paste into a journal. (Use with --undeclared to generate directives satisfying strict mode.)
-
In html or fods output, with --base-url, every balance report amount now links to the correponding register view, so you can click to see where an amount comes from. Links carry correct period terms, and a title saying where they lead. Totals link to the register of the whole report, or of the section's account types. (Arthur Cinader)
-
HTML output now uses CSS classes instead of inline styles, and negative amounts get a "negative" class (Arthur Cinader).
-
FODS multi-period and compound reports have the correct number of header columns (Henning Thielemann).
-
aregister now supports the -A/--average flag, showing the running average change per transaction instead of the running balance. It implies --empty, and makes aregister cumulative by default; add -H to include earlier transactions in the average.
-
aregister: a new --matched flag shows the matched account(s) in each row instead of the other account(s). The -r/--related and --matched flags are opposites, and the last one wins. (Caleb Maclennan, Simon Michael, #2540)
-
aregister: with historical balances, a date2: start date in the query is now honoured; previously such a register started from zero. (Note: secondary dates are supported but deprecated in hledger, as usual.) (Arthur Cinader)
-
register: with a report interval, account-specific depth limits (--depth REGEXP=N) now work correctly; and account names are no longer clipped twice, which gave wrong names when an account-specific rule matched. #2423
-
register: with multiple files, the transaction indexes visible in csv/tsv/fods/html/json output now continue across files instead of restarting.
-
stats: the --oneline flag now has a -q short spelling, and it and the -1/--depth 1 option now work as expected, independently.
-
stats: the elapsed time and txns/s figures once again cover the whole run (from 1.51 to 1.99.4 they covered only the journal-reading phase, so the time was too low and the txns/s was up to 20% too high).
-
stats now produces its report faster on large journals.
-
stats now says "1 day ago", not "1 days ago". (Arthur Cinader)
-
A two-year interval's report title now says "Biennial", not "Biannual". (Arthur Cinader)
Export
- print now makes reformatting or exporting easier: with --export, it
reproduces the whole journal losslessly, preserving directives,
comment lines and blank lines. Included files are inlined (see the
manual for a workaround). With --forecast and/or --auto, the
generated transactions and postings are exported instead of their
=and~rules. With ledger output format selected, it uses Ledger's lot syntax and comments out directives Ledger does not support. With beancount output format selected, it generates the directives Beancount needs (options, commodity, open, prices directives), and accounts whose top-level name is not one of Beancount's are now prefixed with one based on their hledger account type, if known. (Without --export, print -O beancount now prints transactions only.)
Error messages
-
More error messages use the standard layout, with a position and an excerpt, and are detected correctly by editor addons like flycheck-hledger and flymake-hledger (and those emacs packages have been updated). And single-line positions now show the line number just once (FILE:5, not FILE:5-5).
-
Very long "expecting" lists in parse errors are now abbreviated.
-
date: query parse errors now show the actual error.
-
Errors inside a cost amount are now reported more specifically.
-
Balance assertion failures' suggested troubleshooting command now includes -e, to end the register at the assertion.
Performance
-
hledger has been optimised, and this the fastest and most memory-efficient version yet. On a 100k-transaction synthetic journal with simple transactions, balance is 4x faster than 1.99.4, 3x faster than 1.52 and 2x faster than 1.25, and it uses a third less memory than 1.52. On a messy real world journal, it is about 2x faster than 1.52. Unnecessary work is avoided, so you pay only for the features you are using. Detailed stats, performance tips, and a new set of benchmarks comparing the plain text accounting apps, are in doc/PERFORMANCE.md: https://hledger.org/PERFORMANCE.html.
-
--debug=1 now prints a timing line for each phase of hledger's work, with its run time and allocation; also, it shows how much of the journal was parsed by the new fast-path parser.
-
hledger release binaries are built with megaparsec 9.8.3, which contains our fix for a performance regression in megaparsec 9.3 to 9.8.2, making hledger ~10% faster. Packagers who want the speedup should use megaparsec 9.8.3+.
-
hledger now avoids searching PATH for add-ons when the command is a builtin command, allowing faster startup. Eg
hledger --versionnow takes 23ms instead of 32ms on my machine. -
Interval reports no longer slow down quadratically with the number of periods (a daily register over 100 years spent 2.5s in that alone, and a mistyped five-digit year could hang hledger for a day), and register and --forecast use constant memory however many periods there are. #1683
Other
-
hledger's source tarball no longer ships the benchmark suite's 1.6MB journal.
-
hledger no longer depends on lucid; blaze-html is used for HTML output #2737 (Arthur Cinader).
-
Haskell API changes: Hledger.Cli.Anchor gains LinkOpts and link builders; Balance exports its report specs, spreadsheet parts and titles, with shared functions in Balance.Internal; balanceReportAsText returns Text; setDisplayCommodityBare's parameters are swapped. (Henning Thielemann, Arthur Cinader)
Docs
-
The hledger manual is reorganised, with more getting started info at the start; Options and Config files consolidated; COMMANDS moved before DATA FORMATS; detailed Command line tips moved to PART 5; a new "hledger 1 and hledger 2" section on migrating/interop; and a shorter, better grouped topic list in the website sidebar. Also many edits, cleanups, and link fixes.
-
The "Lot reporting" section is renamed "Lots and capital gains" and rewritten/reorganised: example first, the notations compared, lot movements and other lot events (gifts, bonus shares, stock splits), gains, lot reports (including unrealised gains and --gain), troubleshooting. #2751
Examples
-
hledger.conf.sample: show a custom 'watch' command
-
csv: new paypal-json.rules, demonstrating paypaljson/paypalcsv; simplefin download notes in unify-*.rules; new kraken.rules, demonstrating multi-record merge
Scripts/addons
- getdata: more simplefin/paypal/rules explanation
- krakencsv: new script to help convert Kraken CSV
- bashrc: holdings, tx aliases.
hledger-ui 1.99.5
Breaking changes
-
Watch mode is now enabled by default: hledger-ui watches for data and date changes, and reloads automatically. The new --no-watch flag disables this, reloading only with the g key. The rightmost --watch/--no-watch flag wins, so a config file setting can be overridden on the command line.
-
-B/--value=cost now converts lot postings at their cost basis (see hledger changelog).
Fixes
-
The mouse wheel now scrolls all the way. Wheeling up or down moved the viewport at most to the current selection and then stopped; you had to move the selection with the arrow keys to get any further. Scrolling down now stops with the last item at the bottom of the window, like the END key.
-
The transaction screen now always shows the whole journal entry. Previously with a cur: or amt: query in effect, it showed the entry without the non-matching postings. (A long-standing bug, since hledger 1.23.)
-
Pressing L to hide lot detail while on a lot subaccount's transaction or register screen no longer leaves a broken display; such screens now show the lot's base account, where the collapsed postings appear, and pressing L again restores the lot subaccount view.
Improvements
-
The new --lang option translates the menu and accounts screen names to supported languages (currently en, de, zh; see hledger changelog). The help dialog and the register screen's labels are not yet translated. (Arthur Cinader)
-
hledger-ui can now read the journal from stdin (-f-), on unix-like systems. With a stdin journal the data can't be re-read or edited, so the g, a, A and E keys and watch mode have no effect. On Windows, stdin input remains unsupported.
-
With more than one of --cash/--bs/--is/--all/--register, the last one wins, so a config file's choice can be overridden on the command line. (Previously they had a fixed priority order.)
-
See the hledger changelog for other changes, such as: improved commodity aliases, sym: query removed, the new :: find-anywhere query, support for GHC runtime options, faster starts and reloads.
-
Allow brick 3.0, doclayout 0.6.
Docs
- The manual's KEYS section is grouped like the help dialog; the depth keys, help dialog keys, CTRL-z and editor variables are documented; the watch mode and BUGS sections are updated; and various typos and stale statements are fixed.
hledger-web 1.99.5
Fixes
-
hledger-web no longer exits prematurely due to being in a background browser tab. Browsers may run the timers of background tabs much less often, so with the old 2 minute timeout hledger-web could exit while a Safari tab was still open. Now the timeout is 15 minutes, and a page pings as soon as it is foregrounded again. (Arthur Cinader)
-
When hledger-web is failing to ping the server, the page shows a notice saying hledger-web is no longer running and how to continue, instead of failing silently on the next click. (Arthur Cinader)
Improvements
-
hledger's balance, balance sheet, balance sheet with equity, income statement, and cashflow reports are now also available in hledger-web. Every amount links to the register it is derived from, column headings link to the report for that period, and a "Report:" row links the five pages to one another. A report interval can be selected, and the balance report can show either balance changes or end balances. (Henning Thielemann, Arthur Cinader)
-
The register can start from the balance brought forward (accum=historical), so its running balance is the account's balance rather than a total of the transactions shown. The oldest row shows the brought-forward balance, and links to the earlier transactions. (Arthur Cinader)
-
The register view now properly shows the to/from account names, when restricted by a type: query, instead of blank cells. (Arthur Cinader)
-
The journal and register views are now paged, showing the newest 1000 matching transactions and page navigation links. When the matches span more than one year, a years row links to each year (grouped by decade when there are more than twenty). Account links from a transaction open the account register at the appropriate page. (Arthur Cinader, #586)
-
hledger-web now has a dark mode, enabled automatically when the browser or system is in dark mode. (Arthur Cinader, #2706)
-
Pages are shown in the viewer's language, when a translation is available (currently en, de, zh; see the hledger changelog). The language is chosen by a _LANG query parameter (which saves a browser cookie); a previously saved _LANG cookie; or the browser's Accept-Language header. Or, it can be overridden at startup by the
--langoption. See the manual's LANGUAGE section. (Arthur Cinader) -
Links in the journal, register and sidebar now behave consistently: an account name opens its view, an amount opens the register it comes from, and a date narrows to that day. The sidebar's amounts are now links, and its Journal link keeps the current search. (Arthur Cinader)
-
Transaction tooltips, shown when hovering a transaction in the journal or a register, are now drawn by hledger-web in a fixed-width font, so amounts and comments line up as in the journal; long lines wrap at the window edge, and the tooltip stays within the window #2716 (Arthur Cinader).
-
Remove some outdated browser-specific CSS rules for input placeholders and transitions. (AidenTHu)
-
See the hledger changelog for other changes, such as: improved commodity aliases, sym: query removed, the new :: find-anywhere query, support for GHC runtime options, faster starts and reloads.
-
hledger-web no longer depends on lucid #2737.
Docs
- The manual has a new WEB UI section (views, sidebar, search, add form, shortcuts), describes the report pages, paging, dark mode and languages, says --allow=edit / --allow=add instead of the old "capability" terms, and has an updated JSON API section.
project changes 1.99.5
Docs
- dev docs: general cleanup and consolidation; added "last updated" lines to docs more than a year old
- AI: rewrote the copyright/license discussion as prose; other edits
- BENCHMARKS: renamed to PERFORMANCE and rewritten for both users and developers, with performance tips and detailed stats for hledger and other PTA apps
- CODE: added module maps, reading order, conventions and debug output; fixed stale links and paths; condensed the haddock section
- DECISIONS: recorded some dev decisions
- errors/README: clarifications, updates
- FINANCE: dropped regression bounties and funded projects; added paid review; clarified the reports' scope
- ISSUES: fixed table labels; described label families; issues.hledger.org redirects to the issue tracker again
- NOTE-performance: new note recording performance findings and remaining ideas
- PULLREQUESTS: noted the maintainer exception for security fixes on hledger 1
- README: use the generated sponsor avatars, replacing the stale Open Collective slots
- RELEASING: updated the release script with lessons from the 1.52.4 and 1.99.4 releases; run the manual anchor check when updating manuals
- SPEC-lots: added a tested comparison of lot handling in Ledger, Beancount and hledger; notes on lot tracking in other software, and more
- TRANSLATING: a new guide for translators, plus rules and tooling details for developers (Arthur Cinader)
Website
- On hledger.org, the hledger manual's sidebar sections are properly indented, and there are 10 top level entries instead of 48.
Tools/infrastructure
- ai:
just ai-session SESSIONID [SINCE]andjust ai-sessions [DATE]report one Claude Code session's output tokens, or each session's on a day - benchmarking scripts moved into bench/, updated;
just perftestadded - checkanchors (
just anchortest): checks that #anchor links in the manual sources point to existing headings, using mdbook's heading id rules - errors tests: converted to shelltest v3 format;
make testsnow only drafts missing tests; hledger2shelltest drafts v3 tests; added tags, lots, basis and timedot error examples - generatejournal: --start and --days, for sparse and dense journals; new sample journals century-sparse and dense-year (Arthur Cinader)
- generaloptionshelp: also generates the hledger-web manual's general options, without --lang (hledger-web lists its own)
- i18n: i18n-extract.py collects translatable strings into hledger-lib/locale/hledger.pot, writes a pseudo-locale catalog, and checks catalogs for stale and untranslated entries;
just i18n-pot,i18n-check,i18n-merge,i18n-pseudo(Arthur Cinader) - installpage: also updates get-hledger-installed's version example
- Justfile: etags recipes write control characters as escapes (the literal form feeds crashed just-lsp); profiling recipes fixed;
just site-update - Shake changelogs: accepts release tag resume points; skips release-day changelog and relnotes commits
- stack-prof.yaml: a profiling build config that works on GHC 9.14
credits 1.99.5
Simon Michael, Arthur Cinader, Henning Thielemann, Chunhui Ouyang, AidenTHu, Caleb Maclennan.
2026-09-10 hledger-1.99.4
(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: eghledger 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. (Rationale for detaching from tldr: "It might be better to disconnect from the tldr naming and tldr-pages project repo. It adds maintenance cost; restricts our content quite a lot, eg to commands only; and having such docs built in will always be preferable to needing to install and update a separate tool." and for renaming: "The people who need it most won't know the acronym, --examples is clearer.") -
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 from
runandrepl, 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 with
help 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 asourceglob, and honouring thearchiverule - now happens only whenimportitself reads its data files; previously any command could trigger it if the word "import" happened to appear in its arguments. -
--debug=2now shows clearer output when reading a CSV rules file.
Lot tracking
Lot tracking has been reworked extensively since 1.99.3. In summary:
-
How lot tracking is enabled has changed: a
lots:tag enables it only on commodities now, not accounts. An account'slots:tag now just sets that account's disposal method (FIFO, LIFO, etc - a value is now required), or opts the account out of tracking withlots: NONE(eg for tax-sheltered accounts). -
Many more real-world entries are now recognised and handled correctly: transfers involving multiple source or destination accounts, transfers written with
{}cost annotations, transfer fees that are unpriced or split across several postings, in-kind (priceless) disposals, and entries whose amounts are implied or set by balance assignments. -
In lot transfer entries, the source or destination amount can now be elided, like other amounts. #2724
-
Several bugs that could silently produce wrong numbers are fixed: a transfer's sent and received quantities must now match (previously lots could be silently dropped, or a shortfall silently treated as a no-gain fee); fees are now deducted before a transfer selects its lots, so FIFO/LIFO etc choose from the right lots; amounts stay correct when lot detail is collapsed for display (previously balances could be wrong or fees double-counted); and a transfer into an
AVERAGEpool now re-averages the pool's cost, as an acquisition does. -
Lot names are shown consistently and are always usable: a lot now displays the same name (same cost precision) when acquired, disposed, or transferred; inferred cost bases display enough digits to be exact; and any lot name shown in reports or errors can be used to reference that lot. Also,
print --lotsoutput can now always be read back by hledger. -
Error messages are clearer and more accurate: they show the entry as it was written, not hledger's processed version; "no lots available" errors list the lots actually available; quantity-mismatch errors suggest the likely cause; an unbalanced entry is reported as such instead of producing a confusing inferred cost; and incompatible mixes of global (
*ALLetc) and per-account disposal methods are now rejected. Also lot errors summarise how hledger interpreted the entry's postings. -
Balance assertions on lot subaccounts can't be checked correctly (assertions are checked before lots are calculated), and are now handled consistently: close --lots no longer generates them, and when lot detail is hidden (in print output or hledger-ui) existing ones are ignored instead of failing spuriously. The manual and the assertion failure message now explain this limitation.
-
closeno longer generates a spurious zero posting for some emptied accounts, andclose --lotsoutput is more readable (lot subaccount balances no longer show redundant costs). -
A new
holdingsreport shows your lot-tracked investment holdings, per account and commodity or per lot, with units, cost basis, current price and market value, portfolio weight, unrealised and realised gains, and XIRR annualised return. Multiple cost and value commodities are supported, and displayed separately, or as a single-currency view with-X COMM. -
The "no lots available" and "no lots matching" errors now show the attempted transaction's date, clarifying that lot availability is checked at that date.
-
holdings: the cost column's heading matches the lots shown: "Avg cost" on rows aggregating multiple lots, as before; and now also with --lots, when the lots shown all use the AVERAGE method (their per-lot rows show the pool's average cost). "Unit cost" when each lot shows its own cost, and "Unit/Avg cost" when both kinds of lot are shown together. The csv/tsv/html/json outputs keep the stable unitcost field name regardless.
-
holdings: show cost information for AVERAGE accounts. An AVERAGE account's Avg cost, Cost, UGain and UGain% columns were blank: holdings parses each lot's cost basis from its subaccount name, and AVERAGE lots' names deliberately omit the cost (staying stable across re-averaging). Now, when a lot's name has no cost part, holdings fills in the pool's running average as of the report end date, computed from the lot postings' cost basis annotations: sum of quantity * unit cost over the pool's postings (acquisitions carry their acquisition cost, disposals and transfers the then-current average), divided by total units. The sum spans the whole pool - the base account's lots for AVERAGE, all accounts' for AVERAGEALL - so with --lots, each pool lot's row shows the pool average, as in the lot state, where every pool lot carries the current average.
REPL & run
The repl and run commands have been improved since 1.99.3. In summary:
-
Most general flags given to
repl/runat startup (such as-I,--strict,-b/-e,--depth,--cost,--color) are now applied to every command in the session or script (overrideable by flags within the session). -
runscripts are more robust: successfully running an addon command no longer ends the script. -
File handling is more flexible: an
-fat startup sets the default journal file(s) for all commands, and is passed to addon commands; and a nonexistent default journal file is tolerated, as at the command line (soadd/importcan create it). -
The REPL now auto-reloads before each command, detecting changes in input files, the config file, or installed addon commands. This can be disabled with the
--no-watchflag. -
The REPL is friendlier: it shows a small startup banner, and the journal's base file name in the prompt; the help and quit commands are
handq; andechointerprets common backslash escapes like\nand\t. -
Getting help in the REPL works better:
helpandCMD -hnow show the same full, paged output as at the command line, andhelp(alsosetup) no longer fails when there's a problem in the journal. -
Quoted arguments in
run/replcommand lines and in config files are now tokenised more like the shell: quotes can enclose part of an argument, not just the whole of it, sodate:'1 to 15'is the single argumentdate:1 to 15, as at the command line. Also like the shell, a lone quote within an argument (egdesc:o'brien) must now be quoted or avoided. -
A
run/replcommand line that can't be tokenised, eg because of an unclosed quote, now shows a proper parse error with the position and the problem line, instead of a raw parse error dump. -
Changes to CSV rules files now trigger a reload. Automatic reloading watched only journal data files, so edits to a CSV rules file had no effect until restart. Journals now also record the other files their data came from - the CSV rules file, any rules files it includes, and the data file read by a
sourcerule - and these are watched too. This affectsrepl, hledger-ui and hledger-web.
Reports
-
printhas a new--onelineflag showing just each entry's first line, for a compact overview. -
Multi-period balance reports using
--treeand--transposetogether now show only the leaf accounts, for less confusing output. #1941 (JoeJoeflyn) -
balancehas a new--full-namesflag, which in tree mode shows full account names instead of the usual indented leaf names. (Henning Thielemann, #2429, #2661) -
balance's--no-elideflag now also has an effect in list mode: it adds the parents of the posted-to accounts, shown with their own exclusive balances (usually zero, so add-Eto see them). Egbal --no-elide -Eshows a complete table of every posted-to account and its parents. (Henning Thielemann, #2429, #2661) -
In
balance's single-period csv/tsv/html/fods output,--dropno longer causes the total row's "Total:" heading to be truncated. #2688 -
Omitting
roi's--pnloption now works as documented, selecting no postings; previously it selected all postings. (Dmitry Astapov, #2670) -
Repeating the
--transposeflag now toggles it, allowing a previous--transposeto be cancelled. -
setupno longer reports unused commodity aliases as undeclared commodities; it's now consistent withcheck commodities. -
balance --budgetreports no longer lose their goals when the command includes transaction or posting filters, such asstatus:,desc:or--cleared#2545. Instead only the attributes that meaningfully select goals (account, account type, depth, date, commodity) affect them. So now,bal --budget --clearedcompares cleared spending against the full goals. -
-X/--valuewith a commodity to which no conversion price can be found now prints a warning, instead of silently having no effect. An equivalent commodity symbol is suggested if one is known (eg$forUSD). -
Report titles in HTML output are improved:
balancenow shows the same default heading as its text output (for multi-period and budget reports),register,aregisterandholdingsnow show a title too, and in all of these--title=TEXTreplaces it and--title=suppresses it. Also, the title is now a<h3 class="report-title">element placed before the table, making it easier to style. -
In
print's csv/tsv/html/fods/sql output, the debit column now appears before the credit column, following convention. -
In
aregister's csv/tsv/html output, the "change" column has been renamed to "amount", matchingprint's output and making it easier to re-import with csv rules. -
HTML output now has newlines between elements, making it easier for humans to read and troubleshoot; rendering in browsers is unchanged. #2326
-
aregister's HTML output now has the same builtin table styles as the other reports. -
HTML output now prevents wrapping within all dates and individual commodity amounts, by default. (Multi-commodity amounts can still wrap between the amounts.) Each amount is wrapped in a
spanwith an "amount" class, and date cells are marked with a "date" class, for easier styling. -
In HTML output, a
hledger.cssfile now overrides the builtin styles (previously the builtin styles took precedence). An examplehledger.cssfile is provided in the repo. -
In
print's beancount output, underscores in account names are now converted to dashes rather than hex-encoded, giving cleaner names (assets:wells_fargobecomesAssets:Wells-fargo, notAssets:WellsC5ffargo). #2596 -
print's beancount output no longer emits price directives dated in year 0, which Beancount rejects. The 1:1 prices inferred from commodityalias:tags are now dated 0001-01-01; other output formats are unchanged. -
bal: A new
barewidelayout combines the bare and wide layouts: amounts are bare numbers, and each commodity gets its own column, with the symbol shown in the column heading. All column groups share the same set of commodity columns. Supported in single-period, multi-period and budget balance reports, with txt, csv and html output. (Henning Thielemann)
Other
-
rewrite's--diffoutput can now be applied bypatchorgit apply#2548. Previously its hunks contained no context lines, so they were rejected. Now each source file is diffed as a whole, with the standard three lines of context. And changed transactions which have no journal entry to patch (ones read from CSV or timeclock data, or generated by a periodic rule) are now left out of the diff and reported on stderr, instead of producing bogus or destructive hunks. -
statsnow shows the base currency's symbol as used in the journal, with the guessed ISO 4217 code alongside when that differs (eg$ (USD)). Previously it showed only the code, which looked like a journal commodity but wasn't usable in queries or-X. -
The aeson (JSON library) lower bound has been relaxed from 2.3 to 2.2.5.1, the oldest version not vulnerable to the HSEC-2026-0007 denial of service, easing installation while the ecosystem catches up with newer aeson.
-
Exclude megaparsec 9.8.0, to avoid a position marker bug in error messages (megaparsec#572).
Docs
- aregister: noted that transactions with multiple currencies may occupy more than one line
- balance, help: minor updates
- balance: html and fods output are not multi-period-only; they have been supported since 1.40
- Boolean queries: simplified and clarified
- check: move the basis check note to the end
- commodity/Directives: clarify commodity and
Ddirective scopes #2665 - decimal marks: clarify commodity/decimal-mark directive scope leakage #2664; simplify Trailing decimal marks
- Directives: fixed a link to the Ledger page
- First lots example: improved
- fixed some stray junk characters in the manual
- help flags: clarified
-i/-m/-wvs--info/--man/--webman; reduced line wrapping in 80-column terminals; misc edits - Lot reporting: various edits, including a holdings example and cross-reference
- lots: documented the consequences of changing the cost basis method, and two ways to make a change apply only going forward
- lots: documented how to record a transfer that received more than was sent
- PART 5's sections promoted to markdown-level-1 headings, consistent with the manual's other PARTs
- Period expressions: fixed outdated date adjustment info #2714
- quickref: consistent checks ordering
- rewrite: noted that --diff re-renders the transactions it changes, and that --layout can be set to minimise the diff
- roi vs holdings: added comparison examples and interop advice (see also Examples)
- Two-space delimiter: rewritten
- Dropped the "added in VERSION" and "experimental" labels throughout the manuals; notable behaviour changes still mention the hledger version.
Examples
examples/home-page-example.journalis the example journal from the hledger.org home pageexamples/lots/lots.journalis renamed (from lot-entries.journal), updated sohledger holdingsshows a full report, and contains notes comparing roi and holdings XIRRexamples/lots/irr.journalis another example comparing roi and holdings XIRRexamples/csv/banking/has new rules for SimpleFIN (json and csv exports) and for Unify Federal Credit Union
Scripts/addons
bin/check-fancyassertionsnow checks assertions in date order, avoiding spurious failures with journals recorded out of chronological order. #1742bin/hledger-barnow allows its flags to appear anywhere among the arguments, and sets scale with a new-soption.bin/getpricesnow has a small delay between requests, reducing failures with some providers.
hledger-ui 1.99.4
Fixes
-
Fixed a long-standing memory leak (and background CPU use) when reloading with --watch #1825. Now --watch mode has no extra memory/CPU cost, and can be used freely with large journals. It's safe (and recommended!) to enable by default, eg in your
~/.hledger.conffile add[ui] --watch. -
hledger-ui gracefully handles more reloading failures, such as failure caused by a changed CSV file or rules file, or by a file momentarily removed when your editor saves it. Instead of quitting, it now shows the error screen, allowing recovery.
-
Pressing DOWN at the last list item, or pressing C-l (recenter) when near the end of a list, no longer scrolls into blank padding space; hledger-ui now keeps as many items as possible on screen. (#2278, #2593, Juan Wajnerman)
Improvements
-
The L key now toggles showing lot subaccounts and per-lot detail (ie, it toggles the CLI's --lots flag). It resets to the startup state if ESC is pressed.
-
Changes to CSV rules files now trigger a reload, like changes to data files (see hledger changelog).
-
Warnings (eg the CSV data warnings, which could appear on every --watch reload) no longer scroll and disrupt the display; instead they are shown on the bottom line, until the next key press. Also the screen is now fully repainted after a reload, repairing any other stray terminal output.
-
The transaction screen now refreshes in place, when there's a reload #1825. Previously you had to exit and re-enter it.
-
Error screen reloading is less flickery and more robust.
-
Add the -? and --webman flags; rename --tldr to --examples (see hledger changelog).
-
Exclude megaparsec 9.8.0, to avoid a position marker bug in error messages (megaparsec#572).
hledger-web 1.99.4
Security
-
An XSS (cross-site scripting) vulnerability has been fixed in the add form's autocomplete. Journal data from an untrusted source could execute javascript when shown as a completion suggestion. All hledger-web users should upgrade. (Arthur Cinader, Simon Michael, #2698, advisory GHSA-538p-cvc4-4qjm)
-
A second XSS vulnerability has been fixed, in the add 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. (Arthur Cinader, Simon Michael, #2700, advisory GHSA-vq7r-8w52-jv84)
-
A newline submitted by a user in a transaction's description, code or account name is now removed, so the user can't inject an include directive to read arbitrary files accessible to the hledger-web server. (Simon Michael, #2704, advisory GHSA-vq7r-8w52-jv84)
-
hledger-web now sends a Content-Security-Policy header with every page #2703 (Arthur Cinader). This tells your browser to load scripts, styles, images and fonts only from hledger-web itself, and to run only hledger-web's own scripts - so if anything script-like ever reached a page, eg through data in your journal, the browser would refuse to run it and report it in the console. In normal use you should notice no difference.
-
hledger-web now sends the
X-Frame-Options: SAMEORIGINandX-Content-Type-Options: nosniffsecurity headers on every response, so other sites can't frame its pages for clickjacking, and browsers won't second-guess content types. Static files and error pages get them too. (Arthur Cinader) -
The unused Google Analytics hook has been removed (it was always disabled; no page ever loaded analytics). (Simon Michael)
Fixes
-
The upload form now shows the name of the chosen file. It never did before, because of an escaping bug that disabled its handler. (Arthur Cinader)
-
/favicon.ico and /robots.txt no longer return 404 when hledger-web is run outside its source directory; they are now built into the executable, like the other static files. robots.txt now also asks crawlers not to index the site. (Arthur Cinader)
-
The register chart no longer disappears when a commodity symbol contains a backslash or a double quote. Its legend has also moved out of the chart, where it could cover the start of the balance line, up to the title line above it. (Arthur Cinader)
Improvements
-
hledger-web now has its own favicon: a gold coin struck with an equals sign, in the palette of the hledger coin logo. It replaces the Yesod scaffold's blue "y". (Arthur Cinader)
-
The web UI's javascript has been modernised, replacing five vendored libraries with standard browser features (Arthur Cinader, #2702): autocomplete suggestions now use a native
<datalist>; the button beside the date field opens the browser's own date picker (typed smart dates like "today" still work); and keyboard shortcuts, sidebar state and transaction-link highlighting are handled by small standard code. Two dead third-party script tags (html5shiv, chrome frame) are gone, so nothing is loaded from a third party now. jquery and the flot library remain, for the register chart. Also, browser-drawn widgets like the suggestion list and date picker now stay light when the OS is in dark mode. -
The add and help dialogs now use the native
<dialog>element instead of bootstrap modals, so bootstrap.js is no longer loaded (Arthur Cinader). They keep the familiar look - rounded corners, shadow, dimmed backdrop - and open near the top of the window as before. -
The journal and register tables have been tidied up (Arthur Cinader). Digits in amounts are shown with equal width, so numbers line up neatly in a column; column headers are small and muted rather than bold black; and the zebra striping is replaced by a faint highlight on the row under the pointer. #2718
-
The account sidebar now keeps its scroll position when you click an account or navigate #2679 (Arthur Cinader). The sidebar and the main content also scroll independently, on wider screens.
-
Add the -? and --webman flags; rename --tldr to --examples (see hledger changelog).
-
hledger-web still opens the browser and exits two minutes after its last page is closed, by default, for cleanup and security; this is now done by a new implementation which fits better with the Content Security Policy. (Arthur Cinader, #2722)
-
--port 0 lets the OS choose a free port #2559 (Arthur Cinader). The chosen port is reported in the startup message and used in the default base url, so scripts can discover it. This now works in the default --serve-browse mode too, which previously required a fixed port; the browser is opened at the chosen port.
-
Changes to CSV rules files now trigger a reload, like changes to data files (see hledger changelog).
-
hledger-web no longer depends on the yesod-static and hjsmin packages for serving its css, js and font files. This is mainly a packaging fix: yesod-static doesn't build with crypton 1.1+, which had kept hledger-web out of stackage nightly. There is a behaviour change: static file urls no longer carry an
?etag=...suffix; instead browsers are told when their cached copy is still good. -
The aeson lower bound has been relaxed from 2.3 to 2.2.5.1, the oldest version not vulnerable to the HSEC-2026-0007 denial of service, easing installation while the ecosystem catches up with newer aeson.
-
Exclude megaparsec 9.8.0, to avoid a position marker bug in error messages (megaparsec#572).
project changes 1.99.4
- The hledger repo has moved to the hledgerorg github organisation: https://github.com/hledgerorg/hledger. Old links redirect. #2681
Docs
- ai.journal: updates
- RELEASING: revise release script with lessons from the 1.52.2 release
- AI: allow maintainer-discretion exceptions for hledger 1.x security fixes
- ai.journal: switch to simpler t/kt/Mt output-token units; import June/July usage; other edits
- AI: various edits and clarifications (extra usage notes, policy reference links)
- ANNOUNCE: edits
- CHANGELOGS: retired; superseded by RELEASING and changelogs/SKILL.md
- CONTRIBUTING: added a developer quick start; fixed test and benchmark links #2528
- CREDITS, .mailmap: various edits (headings, alignment, stats table; consolidated Alex Chen's commits; tidied committer names)
- DECISIONS: updates
- DEVFAQ, DEVWORKFLOWS, TESTS and other dev docs: updated for current tools, scripts and test suites; removed dead links; DEVFAQ now defers to install.md for build instructions #2528
- examples/lots: merge and refresh the roi-vs-holdings comparison notes; cross-reference lots.journal and irr.journal
- FUNDING: updated links
- ghrelnotes: note the updated Windows binary; fix the eget command
- hledger.conf.sample: edits
- html: document builtin styling in the manual; sample hledger.css now demonstrates customising it
- PULLREQUESTS, pull request template: many edits; link to the AI policy; first-time contributors' PRs may no longer use AI tools
- REGRESSIONS: discontinue the regression bounties; other edits
- release notes: fixed and simplified the binary install instructions - the mac/linux install command was discarding its download #2707, and the windows command now installs to a directory that can be on PATH; also noted what the install command needs, and updated the eget repo path
- relnotes/changelog: AI usage section edits; fix a link
- RELEASING: edits; consolidated to a single release script, grouped into phases
- RULES: new doc gathering repo policies, old and new, in one place
- SPEC-holdings: record decisions (future-dated postings stay included by default; XIRR's final cashflow is the displayed Value at the report date)
- SPEC-lots: add a roadmap section for future work (per-account lot-tracking opt-out, tax boundary declarations, AVERAGE vs transfers, non-local-method coherence checks)
- STYLE: new hledger-web doc recording the rules a change to the web UI's appearance should follow (no build step, nothing from a third party, no style attributes, how tabular and monetary data should read), for people and coding agents alike
- examples: added lots/average.journal
- README: dropped the gitscope.dev badges; that service is gone
Tools/infrastructure
- Changelog tooling improved:
just changelogsnow pre-cleans changelogs items (routine commits dropped, AI usage lines stripped, breaking changes lifted to the top, possible duplicates flagged); a stale resume point (eg after a rebase) is detected and reported with its fix; and a newjust changelogs-checkverifies resume points, issue links and leftover draft markers. Changelog section headings are simplified: Security, then Breaking changes, then topic or generic headings as needed. - CI: binaries-mac-arm64-hx, an experimental workflow using the hx build tool (an alternative to stack/cabal, for easier reproducible builds); cache the official cabal binary; build with -O1
- CI: bump most third-party actions to their latest major version; binaries-mac-arm64 bumped to macos-26-arm64; binaries-mac-x64 lists dependency versions like the others
- CI: the addon functional tests now run again (they had been accidentally excluded since 2017)
- CI: the hledger-web browser tests now run on pull requests, as a non-blocking check
- .gitignore, .ignore: stop tracking site/ under git entirely, but keep site/src/*.md (and the old manuals) visible to ripgrep/VS Code search via a new .ignore file
- hledger-web: added an on-demand Playwright browser test suite covering the web UI's client-side behaviour, runnable with
just browsertest - hledger-web: the favicon's vector sources and the standard-library script that regenerates the .ico from them are now committed, so the mark can be edited rather than redrawn
- Justfile: various
just ai-*AI-usage-reporting recipe tweaks;just holdings-*recipes for trying the holdings command against hledger/beancount/rledger example data;just installrel,just contribs*fixes; gitignore .hx; experimental hx build tool config - Release automation improved:
just ghrelnow assembles the github release on github (no local round trip for binaries) and creates it as a draft, withjust ghrel-publishmaking it public after review;just installpageautomates Install page version bumps;just generaloptionshelpautomates updating the general options help in the manuals; and the relbranch, reltags-push and ghbin-download recipes are more robust - Shake: changelogs: capitalise multi-line items' first lines and give them a trailing period, so they read as complete sentences; single-line items are left as written
- skills: add binary-badges skill, checking/refreshing the version badges in site/src/install.md; fix its red badge colour to match repology's hex
- skills: add release skill for assisting hledger releases
- skills: the changelogs skill was missing its YAML frontmatter, so it had no useful name or description to be matched against
- stack/cabal: ensure haskeline 0.8.4.1 is used, fixing the Windows build again #2410
- tools/aicommits: new script (plus
just ai-commits*recipes) to report AI usage parsed from commit messages' "AI usage:" trailers - tools/skills: add a credits skill documenting the CREDITS.md refresh process
- Shake changelogs: resume points rewritten by rebase/amend are now auto-relocated (matching author date/author/subject), instead of re-listing already-drafted commits; changelogs-catchup is rarely needed now.
credits 1.99.4
Simon Michael, Arthur Cinader, Henning Thielemann, Kevin F. Konrad, Dmitry Astapov, Juan Wajnerman, Adam Sardo, JoeJoeflyn, Joshua Chapman, Juliano Solanho, Rostislav Raykov.
2026-06-24 hledger-1.99.3
(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 (like
assets:{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/-preport 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/hledgerorg/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:\fooare 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 as
0.
- An unseen high-precision balancing amount, eg inferred from a
precise
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 as
type: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. Egrevenues: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 like
print -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 labels for unlabelled lots acquired on the same day, we now pick the smallest numeric label not already used on that date, avoiding collisions with user-provided labels.
-
When there's only one unlabelled acquisition on a date, we no longer generate an unnecessary label.
print & print-like commands
-
--verbose-tagsis now a command-specific flag forprintandrewrite(not a general flag). -
print's-xand--lotsflags are decoupled again (-xno longer implies--lots). -
printhas a new-a/--allconvenience flag that shows all details useful for troubleshooting: it turns on--explicit,--lots, and--verbose-tags. -
printnow properly shows inferred per-lot dispose/transfer postings only when in--lotsmode. -
print --output-format=beancountnow also encodes non-ASCII letters in tag names (metadata keys), ensuring Beancount can read them. #2576 -
printnow aligns posting amounts at their decimal marks by default. The target column is 53; this is increased when needed to preserve 2+ spaces between accounts and amounts.Also, the
=,==,=*,==*operators of balance assertions and assignments are aligned in a column one space past the transaction's rightmost posting amount. And the assertion/assignment amounts are themselves decimal-aligned, with the leftmost one starting one space past the widest operator.A new
--layoutoption (also supported byadd,close,import,rewrite) customises this:--layout=COL(a positive integer) sets a different target column.--layout=hledger1revert's to hledger 1's layout (each transaction's amounts right-aligned within an expandable 12-char region).
Reports
-
A new
--title=TITLEoption sets or customises a title heading for most reports, when producingtxt,htmlorfodsoutput (orcsvortsvoutput, in some cases).balancesheet,balancesheetequity,cashflow,incomestatementhave their usual title as the default; other reports have no title by default. -
The
--subreport-titles=TITLE1|TITLE2|...option customises section titles for compound reports likebalancesheetandincomestatement. Titles should be|-separated. Eg:hledger bs --subreport-titles='Aktiva|Passiva'. Or use--subreport-titles=''to suppress subreport titles. -
The
--period-titles=compact|datesoption customises column headings for periodic reports.compact(the default) preserves current behaviour (abbreviated english month/week names within a single year, explicit dates otherwise).datesalways shows explicit ISO dates. #2578 -
balance: in single-period reports, account names are now kept aligned when amounts are wide. (Adam Sardo, #1148) -
balance: single-period HTML/FODS reports now respect the preferred commodity display style, like other reports. (Simon Michael, Henning Thielemann, #2584, #2588) -
In
--pivot's value,accountis now accepted as a synonym foracct. Anddescriptionis documented as a synonym fordesc. -
roiuses a new more robust TWR algorithm. The previous TWR implementation assumed that an exact valuation of the investment could be obtained immediately before or after any cashflow, which is not generally possible.roinow uses the BAI (Bank Administration Institute) Linked IRR method, valuing the investment only on dates where an exact valuation is available. This greatly improves the robustness of TWR computations. (Dmitry Astapov, #2420)
Timedot
-
A line whose first word looks like a date (three groups of digits separated by
-,/, or.) is now always parsed as a timedot date line, and shows a clear error if the date is invalid (instead of silently treating it as a comment or a zero-amount entry). -
Lines with an org heading prefix (eg
**) are parsed more consistently.
Other
-
hledger now requires version 2.3+ of the aeson library, avoiding a bug where certain data could trigger memory/CPU exhaustion. (https://haskell.github.io/security-advisories/advisory/HSEC-2026-0007.html)
-
setupno longer shows a'"ver' is not recognized ...error message on Windows. -
setupnow shows "all account types exist" as neutral, not a warning. -
setupnow warns if the filesystem does not support appending. #2577 -
statsnow shows a base currency inferred for the journal. -
allow megaparsec >9.8
Docs
- add: balance assignments #2603
- balance:
--gainshows total (realised + unrealised) gain #2049 - check basis: explain strict-comparison rationale, list escape hatches #2636
- Cost basis methods: edits
- Cost basis vs transacted cost: edits
- csv: CSV vs hledger fields, if, if table: rewrites [#2647]
- Directives, Directive effects: consolidate, cleanup, update
- get: document new command
- Lot reporting: many updates
- print layout: rename, expand
- Recording disposals: new section walking through each disposal style
- Report titles: new section
- roi: describe new TWR algorithm (Dmitry Astapov)
- Tags: clarify/restore some missing tags info #1640, #1950
- timedot: rewrite
Examples
examples/csv/github-sponsorships.rulesexamples/lots/lot-entries.journal: fix gain posting
Scripts/addons
- Add sample
getdataandgetpricesscripts for thegetcommand. - Drop the old
hledger-pricehistscript.
API
Hledger.Write.Ods: enable digit grouping in output ifAmountStyledeclares any digit groups. (Henning Thielemann) #2584Hledger.Data.Amount: consolidateshowPriceDirectivehere.
hledger-ui 1.99.3
Breaking changes
Fixes
- On Windows, the
Akey (runninghledger-iadd), theEkey (running$EDITOR), and the running of info/man/tldr/pager helpers now correctly quote file paths containing spaces. #2646
Features
cur:COMMqueries now match COMM or any of its commodity aliases (see hledger changelog). To match only a specific symbol without considering aliases, usesym:SYM. Aliases are recomputed on each journal reload, so a mid-session change to alias definitions takes effect next time.
Improvements
- The
Ekey now jumps to the error position with the Zed and Sublime Text editors, also. (Rostislav Raykov) - allow megaparsec >9.8
- allow vty 6.6+
Docs
API
hledger-web 1.99.3
Breaking changes
- When listening on a non-local-only IP address, hledger-web now allows only read-only access by default. So if you set a public address with --host, you may also need --allow=add.
Fixes
- hledger-web now uses aeson 2.3, avoiding a denial-of-service bug in that library. Previous hledger-web versions, with /add enabled, are vulnerable to HTTP requests that could trigger memory/CPU exhaustion. Now it uses a fixed version of aeson (and disables /add by default, except on local-only addresses). (https://haskell.github.io/security-advisories/advisory/HSEC-2026-0007.html)
Features
cur:COMMqueries now match COMM or any of its commodity aliases (see hledger changelog). To match only a specific symbol without considering aliases, usesym:SYM. Aliases are recomputed on each journal reload, so a mid-session change to alias definitions takes effect next time.
Improvements
- allow megaparsec >9.8
- allow yesod-core 1.7*
Docs
API
project changes 1.99.3
AI usage
hledger 2.x releases use careful AI-assisted development. (If you want to use software built without any help from AI tools, choose hledger 1.x instead.) All changes were steered, reviewed, and tested by Simon or a contributor. See https://hledger.org/AI.html for our current AI policy and rationale.
For 1.99.3, mostly opus 4.7 was used. My reporting methods have changed since last time; here's my current rough estimate of tokens used per month:
output tokens release
Jan || 771 ||
Feb || 53,229 ||
Mar || 112,112 || 1.99.1
Apr || 686,507 || 1.99.2
May || 2,680,593 ||
Jun || 737,780 || 1.99.3
Total || 4,270,992 ||
Average || 711,832 ||
Docs
- Install: add Building outside the source tree
- AI policy/FAQ/journal: updates, links; start journalling estimated project AI usage
- SPEC-lots: align with the user manual's restructure of Lot reporting
- PLAN-commodity-preferred-symbols, PLAN-ugain
- ACHIEVEMENTS: better star-history link, top 10 apps
- PULLREQUESTS: cross-link to COMMITS and AI
- REGRESSIONS: #2642
- RELEASING, ANNOUNCE, relnotes updates
Tools/infrastructure
- tools/relnotes: demote any markdown headings in changelogs, to fit in release notes
- tools: Shake changelogs: parse inter-release headings more carefully
- cabal.project: consolidate workarounds (haskeline Windows bug #2410, yesod-static bounds bug); general cleanup
- stack: bump dev/release builds and scripts to nightly-2026-06-01 #2410
- stack: ignore all bounds, for now, to allow building with aeson 2.3
- ci: fix old references to
masterin workflows - ci: linux binaries: more workarounds for dependency/bounds bugs
- pr template: update, mention the AI policy
just ai*usage report scripts: vertical output by default; easy conversion from opus tokens to t/kt/Mttools/regen-shelltests.pyscript,regen-shelltestsclaude code skilljust devver: fix- gitignore updates
credits 1.99.3
Simon Michael, Dmitry Astapov, Henning Thielemann, Adam Sardo, Rostislav Raykov.
2026-04-28 hledger-1.99.2
(2.0 preview 2)
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 first
Uaccount 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.
2026-03-28 hledger-1.99.1
(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.html. 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, with
close --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 the
lotstag. 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.html
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 (https://github.com/psibi/crypton-conduit/issues/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.