{"slug": "hledger-v2-0", "title": "Hledger v2.0", "summary": "Hledger 2.0, the first release of the plain-text accounting tool developed with disclosed AI assistance, adds lot tracking and capital gains, a holdings report, terminal/SVG/HTML charts via --chart, 12 UI languages, assert rules, new queries, and custom commands, while running 2-3x faster than hledger 1.52 and using up to a third less memory. The release reads hledger 1 data, but breaking changes include config files no longer selecting the command with a bare first word, repeated commodity declarations now adding to earlier ones, and alias directives applied before apply account as in Ledger. hledger 2 uses no AI at runtime, per the project's AI policy.", "body_md": "## Repository navigation\n\n**Upgrading from hledger 1 ?** See [Upgrading to hledger 2](https://hledger.org/upgrading.html).\n\nhledger 2 is developed with careful, disclosed AI assistance, and uses no AI at runtime;\n\nsee [hledger 2 and AI](https://hledger.org/relnotes.html) and the [AI policy](https://hledger.org/AI.html).\n\n## \n## Release notes\n\n**hledger 2: lot tracking and capital gains, a holdings report, charts, twelve UI languages, assert rules, new queries,\neasier setup and importing, journal format improvements, custom commands,\na much more capable hledger-web, auto-reloading hledger-ui,\nand 2-3x more speed.**\n\n### hledger 2.0\n\nAll changes since hledger 1.52.4.\n\nFor the 1.99.x preview releases, and 2.0's changes since the last of them (1.99.6),\n\nsee [https://hledger.org/relnotes199.html](https://hledger.org/relnotes199.html).\n\nhledger 2 is the first hledger release developed with AI assistance;\n\nsee the [https://hledger.org/relnotes.html](https://hledger.org/relnotes.html) intro and [https://hledger.org/AI.html](https://hledger.org/AI.html).\n\nFor more help with upgrading, see [https://hledger.org/upgrading.html](https://hledger.org/upgrading.html).\n\n#### Highlights\n\nThe most notable changes since hledger 1.52; each is described in its section below.\n\n- Lot tracking and capital gains: cost basis, lot movements and gains are tracked, checked and inferred;\n and a new`holdings` report shows your investments' performance. (Investments)\n- Charts: most reports can be shown as charts in the terminal, or as SVG or HTML, with `--chart` ;`--view` opens any report in a viewer. (Reporting)\n- Translations: hledger, hledger-ui and hledger-web can be shown in 12 languages, and new languages are easy to add. (Running hledger)\n- Assert rules: standing rules about your data, written as queries and checked like balance assertions. (Journal format)\n- New queries: `::` (short for`find:` ) searches in all fields, and`change:` and`balance:` select report rows by their amounts. (Reporting)\n- Easier setup and importing: `init` creates starter files,`get` fetches data and prices, and`import` needs no arguments;\n CSV rules gain`merge` , functions,`ifs` tables and amount expressions. (Getting data in)\n- Journal format: amount expressions, commodity aliases, account alias tags, and CSV files included in journals. (Journal format)\n- Custom commands, defined in your config file; a reorganised `help` ; and an improved`repl` and`run` . (Running hledger)\n- Speed: hledger is 2-3x faster than 1.52, and uses up to a third less memory. (Performance)\n\n#### Breaking changes\n\nhledger 2 reads hledger 1 data, and most users will need no changes.\n\nBut here are the breaking changes you might encounter.\n\n(These are described more fully in the sections below.)\n\nChanges in how files are read:\n\n- \nConfig files can no longer select the command to run with a bare first word in the general section. \n (Now such a word is read as a query argument.) The command must be given on the command line.\n(Config files)\n- \nA repeated commodity declaration now adds to the earlier one instead of replacing it, \n and with several`-f` files the last file's display style is used, not the first's.\n(Journal format)\n- \nAmounts which hledger infers no longer affect commodities' display precision, or the precision used to balance the entry. \n So some reports show fewer decimal places.\n(Journal format)\n- \n`alias` directives are now applied before`apply account` , as in Ledger.\n(Journal format)\n- \n`apply year` is now scoped, as in Ledger:`end apply year` restores the previous default year.\n(Journal format)\n- \nIn CSV rules, when a setting like `date-format` or`separator` is declared more than once, the last one now wins (except`skip` ).\n And the`source` and`archive` rules now read from and save to a`data/` directory next to the journal.\n(Data import)\n- \nSales with a cost basis annotation and no gain posting now get an inferred gain posting, to `revenues:gain` by default.\n(Lot tracking)\n\nChanges in commands and output:\n\n- \n`print` now aligns amounts by their decimal mark.`--layout=hledger1` gives the old layout.\n- \n`register` now hides zero-amount postings unless`-E` is used.\n- \n`activity` now shows transactions per week, as a chart;`activity --postings -D -0` gives the old report.\n- \n`--tldr` is now`--examples` .`stats -1` is now`stats --oneline` .`--txn-balancing=exact|old` is now`--txn-tolerance=entry|display` (the old spelling still works).\n `--verbose-tags` is now an option of`print` and`rewrite` only.`commodities --used` now shows only commodities used in transactions.\n- \n`hledger test` is now`hledger --test` . The`demo` command is removed.\nThe hledger-check-fancyassertions add-on is removed, replaced by assert rules.\n- \n`accounts` and`payees` now respect transaction-specific query terms like`date:` or`desc:` ,\n which no longer match declared but unused accounts or payees.`any:` and`all:` queries now also work in posting reports.\n New query prefixes (`find:` ,`change:` ,`balance:` ) mean that account names beginning with those need`acct:` .\n(Queries)\n- \nIn JSON output, postings' `ptype` field is renamed to`preal` .\nIn csv/html output, print's debit column now comes before credit, and aregister's \"change\" column is now \"amount\".\n\nNew errors you might see:\n\n- \nWith a `decimal-mark` directive (or CSV rule) in effect, a number clearly using the other decimal mark (`1,000.00` when`decimal-mark ,` is declared),\n or using the declared mark more than once (`1.2.34` , previously read as 1234), is now an error.\n ([#1985](https://github.com/hledgerorg/hledger/issues/1985) ,[#1904](https://github.com/hledgerorg/hledger/issues/1904) )\n- \nA hyphenated date range like `2026-13` is no longer read as \"from 2026 to the 13th of this month\"; it is rejected as a mistyped date.\n (Write`2026..13` for that.)\n- \nAccount names with an empty part (beginning or ending with `:` , or containing`::` ) are now an error.\n And account names whose last part is enclosed in curly braces (`assets:{foo}` ) are reserved for lot subaccounts, and must contain a valid lot name.\n(Journal format)\n- \nAn unquoted commodity symbol can no longer begin with `(` when written before the number, or with`/` when written after it,\n because of the new amount expressions; eg`(A) 10` or`10 /kg` must now be written`\"(A)\" 10` or`10 \"/kg\"` .\n(Journal format)\n- \nIn CSV rules files, `*` at the start of a line no longer begins a comment; use`#` or`;` .\n And more than one`source` rule in a rules file (including its included files) is now an error.\n(Data import)\n- \nLedger-style `assert EXPR` directives, previously ignored, must now use hledger's assert syntax.\n And an`end apply year` with no matching`apply year` is an error.\n(Assert rules, Journal format)\n- \nCost basis annotations like `{$50}` , which hledger 1 ignored, are now interpreted and checked.\n So entries using them may be rejected, eg if a purchase's`{}` cost basis and`@` cost disagree,\n if a sale takes from a lot which was never acquired, or if a sale's`@` is not the selling price.\n `-I` or`--ignore-lots` disables this.\n(Lot tracking)\n\n#### Running hledger\n\n##### Command line\n\n- \n`acc` ,`comm` ,`desc` are now official short spellings for the`accounts` ,`commodities` and`descriptions` commands.\n When an`-O` value looks like a file name, the error suggests`-o` .\n With an unrecognised argument, the error shows it, and the config file it came from, if any ([#2489](https://github.com/hledgerorg/hledger/issues/2489) ).\n hledger no longer duplicates options in the`LESS` environment variable.\n- \nColour handling is more robust: ANSI colour is no longer used when `TERM=dumb` , eg in an Emacs shell (`--color=yes` overrides);\n colour works in terminals where the background lightness can't be detected (a light background is assumed);\nand in terminals without truecolor support, we downgrade to the nearest xterm 256-colour.\n- \nThe built-in unit tests are now run with an option, `hledger --test[=PATTERN]` , not a command.\n- \nFixed: option handling is more robust: a missing option value gives a clear error (eg `hledger import -f --dry-run` no longer\n uses`--dry-run` as the file name); bad option values are always reported; and a flag belonging to another command gets an accurate error.\n (Kevin F. Konrad,[#2696](https://github.com/hledgerorg/hledger/issues/2696) )\n- \nFixed: `-o -` now writes to stdout, as documented; with`-o FILE` , an error no longer leaves an empty or truncated file behind;\n `stats -o FILE` writes all of its output to the file; and on Linux, output redirected to a file on a network drive (eg a CIFS mount) is no longer silently truncated.\n- \nMulti-period reports with more than 10000 periods, or a `--forecast` generating more than 100000 transactions, now print a warning,\n so you can cancel. Such numbers usually mean a mistyped date, and could use many gigabytes of memory.\n ([#1683](https://github.com/hledgerorg/hledger/issues/1683) )\n- \nFixed: command line arguments are now passed to addon commands exactly as typed; apostrophes, empty strings or other special characters \n could be mangled or dropped. (Except on Windows, where addons are still run through the shell.)\n And options written after`--` are passed through to an addon command rather than consumed by hledger.\n (Kevin F. Konrad, Arthur Cinader,[#2696](https://github.com/hledgerorg/hledger/issues/2696) )\n- \nFixed: on Windows, file paths containing spaces are now quoted properly when running external helpers (info, man, tldr, pager, `$EDITOR` , hledger-iadd).\n ([#2646](https://github.com/hledgerorg/hledger/issues/2646) )\n- \nhledger is now built with GHC runtime system options enabled. \n So eg`hledger +RTS -M2G -RTS ...` caps memory use (an overflow will raise an error rather than consuming all memory),\n and`+RTS -c` uses 20-40% less memory at the cost of speed.\n\n##### Config files\n\n- \nYou can now define custom commands (command aliases), by adding `NAME = COMMAND...` to the`[alias]` section of your config file.\n 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.\n (Shell commands run only from your user config file, or one specified explicitly with`--conf` .)\n- \nConfig files can no longer specify the command to run via a bare first word in the general section; \nwith command aliases able to run shell commands, that was too risky.\n- \nConfig file errors now use hledger's standard error format, and say how to run without the config file ( `-n` ).\n `--help` ,`--version` and`--test` now work despite config file errors.\n- \nFixed: a `#` inside quotes is no longer misparsed as a comment start; leading whitespace before a section header,\n and a final line with whitespace and no newline, are accepted; and`--conf` /`--no-conf` flags inside a config file are ignored.\n\n##### Help\n\n- \n`help` has been reorganised, and is now an entry point for all hledger docs:\n  - `help` with no arguments (or`hledger` with no command) shows a quick reference card.\n  - `help commands` shows the full commands list (`--builtins` ,`--addons` and`--aliases` limit it).\n  - `help examples [CMD]` shows command examples (like`--examples` , formerly`--tldr` ).\n  - `help usage [CMD]` shows command options and docs (like`-h` ).\n  - `help manual [TOPIC]` or`help TOPIC` shows the manual, in several formats, now including the HTML versions at hledger.org\n (`--webman` ). Topics are matched by exact match or unique prefix, in the hledger-ui and hledger-web manuals too,\n and`help manual -l` lists them.\n  - `help install` /`docs` /`support` /`home` /`sponsor` /`relnotes` open the corresponding hledger.org page in a web browser.\n(Arthur Cinader)\n- \nWhen `TERM=dumb` , or in Emacs shells that don't support TUIs,`help manual` shows plain text instead of failing to run a viewer.\n `h` is help's official alias, and the`-?` flag also shows the quick reference. The`demo` command, which played asciinema recordings, is removed.\n\n##### REPL & run\n\n- \nThe REPL now auto-reloads before each command, detecting changes in input files, the config file, or installed addon commands ( `--no-watch` disables this).\n Changes to CSV rules files and their data files are detected too.\n It shows a small startup banner, and the journal's file name in the prompt;`h` and`q` are help and quit;\n `help` and`CMD -h` show the same full, paged output as at the command line, and work even when there's a problem in the journal.\n- \nMost general flags given to `repl` or`run` at startup (such as`-I` ,`--strict` ,`-b` /`-e` ,`--depth` ,`--cost` ,`--color` )\n now apply to every command in the session or script (and can be overridden per command).\n An`-f` at startup sets the default journal file(s) for all commands, including addons; a nonexistent default journal file is tolerated.\n- \nQuoted arguments in `run` /`repl` command lines and in config files are now tokenised more like the shell:\n quotes can enclose part of an argument, so`date:'1 to 15'` is the single argument`date:1 to 15` .\n Also like the shell, a lone quote within an argument (eg`desc:o'brien` ) must now be quoted or avoided. A bad command line gives a proper error.\n- \n`run` scripts are more robust: running an addon command no longer ends the script.\n- \n`run` with`-O html` ,`-o FILE.html` or`--view` writes its commands' outputs as one combined html page,\n with a folding section for each command, and links to show just titles, charts, or all data.\n Eg:`hledger run --view -- is -M --chart -- bs -Q --chart` .\n\n##### Translations\n\n- \nhledger, hledger-ui and hledger-web can now be shown in 12 languages: \n English, Brazilian Portuguese, Chinese, French, German, Hawaiian, Irish, Italian, Japanese, Russian, Spanish and Ukrainian.\n The new`--lang=LANG` general option (also usable in config files) selects one, for report titles, headings, month names etc;\n `--lang=auto` chooses based on your system locale.\n Gaps in human translations are filled by machine translations, which are marked for review.\n Native speakers' help is welcome; see[https://hledger.org/TRANSLATING.html](https://hledger.org/TRANSLATING.html) .\n (Arthur Cinader, Daniil Iaitskov (Russian), Diego Depaoli (Italian), Henning Thielemann (German), Chunhui Ouyang (Chinese), Simon Michael,[#2736](https://github.com/hledgerorg/hledger/issues/2736) )\n- \nYou can add or override a translation by installing a gettext PO file at `$XDG_CONFIG_HOME/hledger/locale/LANG.po` ; no compilation is needed.\n `hledger --write-lang=LANG` writes the current po file for a supported language, or a starter file for a new language, there.\n\n##### Error messages\n\n- \nMore error messages use the standard layout, with a position and an excerpt, and are detected correctly by editor addons like \n flycheck-hledger and flymake-hledger (which have been updated). Single-line positions show the line number just once (FILE:5, not FILE:5-5).\nErrors about a posting followed by comment lines now mark the correct line.\n- \nVery long \"expecting\" lists in parse errors are abbreviated, and errors inside a cost amount are reported more specifically.\n- \nBalance assertion failures show a better troubleshooting command: it ends the register at the assertion ( `-e` ), shows zero-amount postings (`-E` ),\n uses the more precise`--ignore-assertions` , and escapes or quotes special characters properly.\n\n#### Getting data in\n\n##### Data entry\n\n- \n`add` 's default amounts are better: they are shown with the journal's commodity display styles; they are not shown\n with ambiguous digit group marks (like`1.000` ); and useful defaults are offered after entering a balance assignment.\n It weights similar transactions by their distance from today, not from the journal's latest date, so a future-dated typo doesn't skew the defaults.\n ([#2645](https://github.com/hledgerorg/hledger/issues/2645) ,[#2656](https://github.com/hledgerorg/hledger/issues/2656) )\n- \nFixed: `add` no longer saves an entry which would make the journal unreadable.\n It now runs all enabled journal checks with the new entry (eg lots must be valid, and with`--strict` , the strict checks must pass),\n and if there's a problem, it shows the error and goes back a step, so you can correct the entry.\n Likewise if the entry doesn't balance or fails a balance assertion, it no longer restarts at posting 1.\n ([#2869](https://github.com/hledgerorg/hledger/issues/2869) )\n- \n`add` and`import` now test for faulty filesystems before writing.\n Some filesystems, eg an Android shared filesystem in Termux, overwrite when told to append;`setup` warns about this too.\n ([#2577](https://github.com/hledgerorg/hledger/issues/2577) )\n\n##### Data import\n\n- \nA new `init` command creates starter files for a new hledger setup, in the current or a given directory.\n `--layout` selects from several file layouts:`simple` (one journal file),\n `default` (separate account/commodity/payee declaration files, data/prices/rules directories, starter`get` scripts and csv rules),\n or`years` (a journal file per year, combined by all.journal).`hledger init FILE.journal` writes just one self-contained journal.\n Existing files are never changed, so init can be re-run to restore missing files.`--dry-run` shows what would be created.\n- \n`get` is a new command for fetching transaction data and market prices. It runs two helper scripts which you can customise:\n `data/getdata` , to gather data (eg CSV) files in`data/` , and`prices/getprices` , to download market prices into`prices/` ,\n next to the main journal file.`--transactions` or`--prices` runs just one of these. Sample scripts are in the hledger repo's bin/ directory,\n and are installed by`hledger init` .`get` preserves the format of existing prices when merging new ones.\n- \n`import` with no file arguments now reads all the`.rules` files in the`rules/` directory next to the main journal file.\n (Files whose name begins with`.` or`_` are skipped; this is useful for included files.)\n And`import -g/--get` runs`get` first. So a complete import workflow can be:`hledger import -g [--dry-run]` .\n- \nThe CSV `source` and`archive` rules now use the journal's`data/` directory by default:\n `source` looks for bare file names and relative paths first in`data/` , then in`~/Downloads`\n (paths beginning with`./` or`../` are still relative to the rules file);\n and`archive` saves to`data/archive/` (previously, a data directory next to the rules file).\n- \nMore than one `source` rule in a CSV rules file is now an error, suggesting to\n use one rules file per data file. Previously all but one`source` rule was silently ignored.\n ([#2862](https://github.com/hledgerorg/hledger/issues/2862) )\n- \nFixed: `import` no longer writes entries which would make the journal unreadable.\n It now runs all enabled journal checks with the new entries (eg balance assertions, valid lot movements,\n and with`--strict` the strict checks), and if there's a problem, it shows the error, writing nothing.\n ([#2869](https://github.com/hledgerorg/hledger/issues/2869) )\n- \nFixed: `import` with`archive` enabled and multiple downloaded copies of the source file now deletes processed files and always makes progress\n (it could stall, reprocessing the oldest file); it archives only when new transactions were actually imported;\n and`import --dry-run` no longer archives data files when the flag is abbreviated (`--dr` ).\n- \nCSV error messages are much improved. They show the CSV file and record position with an excerpt; the record's field values with their numbers and names; \n the rules file, where each field's rule was defined, and any rules it overrode;\n and if an entry converted from CSV is rejected later (eg by balancing), the record it came from.\n `--debug=2` output for CSV reading is clearer, and shows the if rules that matched each record, with their file and line number.\n- \nCSV rules can transform values by calling functions in `%{...}` expressions:\n upper, lower, capitalize, trim, negate, abs, concat, default, replace, substr, join.\n Eg`%{capitalize(%desc)}` ,`%{default(%payee, %desc)}` ,`%{replace(%desc, \"ref#[0-9]+\", \"\")}` ,`%{join(\", \", %note, %ref)}` .\n- \nIn CSV rules, a hledger field's value can now be referenced in field assignments. So you can eg append to a comment, building it up from several if rules. \n And a`%(FIELD)` interpolation syntax with parentheses is accepted, useful when the field name must be delimited from adjacent text\n (`account1 assets:%(type)checking` ).\n- \nCSV amount values can be amount expressions, like `amount1 %price + %fee` , as in journal format.\n A value counts as an expression if it contains an operator: a`*` ,`/` , or a`+` or`-` which is not a leading or exponent sign.\n Within an expression, parentheses group (so`-(%price + %fee)` is the sum negated).\nIf there's no operator, values follow the traditional sign conventions (eg parentheses mean negative).\n- \nCSV rules' `currency` and`currencyN` now set a default commodity, like a`D` directive, instead of prepending text to amounts.\n So amounts which already have a commodity symbol keep it (previously`currency $` with`€7` gave a`$€` commodity).\n The value can be an amount showing the symbol's position and spacing, like`currency 1 USD` ;\n its number style (eg`1.000,00 EUR` ) is used as the commodity's default display style.\n A value which is not a commodity symbol or amount, like`currency 123` , is now an error.\nRules that worked before give the same output as before.\n- \nIn CSV rules, if tables can use a new `ifs` keyword, which allows aligning their delimiters (`if` still works).\n The header line can have spaces around field names, spaces around values are ignored, and a blank value no longer assigns that field.\n Comment lines and blank lines can be used inside if blocks, and comment lines inside if tables can be indented.\n But`*` at the start of a line no longer begins a comment (previously a matcher line beginning with`*` was silently ignored, disabling the if block).\n- \nA new `merge` rule combines several CSV records into one transaction.\n `merge` (or`merge N` ) appends the next record(s) to the current record, naming their fields with a _ROWNUM suffix:`%description_2` ,`%4_2` , etc.\nThis is useful for banks and brokers which export a currency conversion or stock trade as multiple rows.\n- \nIn CSV rules, when a setting like `date-format` or`separator` is declared more than once, the last declaration now wins, as the manual says,\n rather than the first (except for`skip` , where the first still wins).\n So an included rules file's settings can be overridden by declarations after the`include` line;\n if you declared one before an`include` to override the included file, move it below.\n ([#2539](https://github.com/hledgerorg/hledger/issues/2539) )\n- \nCSV rules files' `include` directives are handled more robustly: include cycles and unreadable files are reported properly;\n errors in included files are reported at the right file and line; and included files handle BOMs and CRLF line endings.\n ([#2537](https://github.com/hledgerorg/hledger/issues/2537) )\n- \nIn CSV data, characters which journal format can't represent are now replaced, with a warning: \n a semicolon in a description (which would start a comment) becomes`.,` , and a right parenthesis in a transaction code becomes`]` .\n ([#2413](https://github.com/hledgerorg/hledger/issues/2413) )\n- \nA CSV rules file's data-generating command ( `source | CMD` ) failing no longer aborts the whole run; it warns and continues, as if no data was found.\n So when`import` processes several rules files, one flaky source won't block the rest.\n When a`source` command is run, the message names the rules file responsible.\n- \nFixed: a CSV rules `source | CMD` command no longer reads hledger's standard input, which could hang or consume input meant for something else.\n A`#` in a`source` rule now always starts a comment, even after`|` . On Windows,`source` paths with a drive letter are recognised as absolute.\n- \n`files` is more useful for tools which need to know a journal's input files:\n `-t/--tree` shows the include hierarchy; it also lists the CSV rules files and data files used;\n `-O json` gives each file's path, depth and parent; and it no longer processes the data, so it works with journals\nthat have errors other than syntax errors, and a missing included file gives just a warning.\n\n#### Journal format\n\n##### Accounts\n\n- \nAccount directives can now declare account aliases with `alias:` tags.\n Eg`account assets:bank:checking  ; alias: checking` is like writing an`alias checking = assets:bank:checking` directive at that point.\n A Ledger-style indented`alias NAME` subdirective is also accepted.\n- \n`alias` directives, subdirectives and tags are now applied before`apply account` , as in Ledger,\n so that a file's aliases keep working when it is included under`apply account` .\n If you had`apply account X` and then`alias X:foo = ...` , that alias should now be written`alias foo = ...` .\n `--alias` options still apply last, to the full account names.\n ([#2733](https://github.com/hledgerorg/hledger/issues/2733) )\n- \nAccount names with an empty part are now an error: they can no longer begin or end with `:` , or contain`::` .\n Such names caused confusion and wrong reports (eg`bs` omitted an empty top-level account, and`a:b:` was a different account from`a:b` ).\n This is checked in journal, timeclock and timedot files, CSV rules, and the add command and hledger-web's add form\n (but not in names produced by aliases or`--pivot` ).\n ([ledger#3348](https://github.com/ledger/ledger/issues/3348) )\n- \nFixed: `apply account` ignores a trailing colon, as in Ledger:`apply account Assets:` now gives`Assets:Bank` , not`Assets::Bank` .\n ([#2858](https://github.com/hledgerorg/hledger/issues/2858) )\n- \nFixed: `end aliases` also cancelled`--alias` options, for the rest of that file and the files it included.\n- \ncheck accounts (and strict mode) no longer require declaring the accounts that hledger chooses for generated postings. \n `check tags` now also checks commodity directives' tags;`alias` and`lots` are built-in tags.\n- \nFixed: a subaccount-inclusive balance assignment like `a =* $0` could also change other commodities' balances in subaccounts.\n ([#2772](https://github.com/hledgerorg/hledger/issues/2772) )\n- \nThere are three new account types: Gain ( `G` ), a subtype of Revenue, for capital gains;\n Imbalance (`M` ), a subtype of Equity, for`--infer-imbalance` ; and UnrealisedGain (`U` ), a subtype of Equity, not currently used.\nWhen several accounts are declared with the Gain or Conversion type, generated postings use the first declared.\n- \nAccount names whose final part is enclosed in curly braces, like `assets:{foo}` , are lot subaccounts,\n and must contain a valid lot name (unless`-I` /`--ignore-lots` is used).\n\n##### Commodities and amounts\n\n- \nNumbers can now also use `_` or`'` as digit group marks.\n (Kevin F. Konrad,[#273](https://github.com/hledgerorg/hledger/issues/273) ,[#1489](https://github.com/hledgerorg/hledger/issues/1489) )\n- \nWith a `decimal-mark` directive (or CSV rule) in effect, a number using a different decimal mark,\n or using the declared mark more than once, is now an error.\n ([#1985](https://github.com/hledgerorg/hledger/issues/1985) ,[#1904](https://github.com/hledgerorg/hledger/issues/1904) )\n- \nAmounts which hledger infers no longer affect display precisions, or entries' balancing precisions. \n So an unseen high-precision balancing amount, eg inferred from a precise`@` cost, no longer makes it harder to balance the entry;\n some reports that used to add unnecessary decimal zeros no longer do so;\n and reports more consistently show amounts smaller than their commodity's display precision as`0` .\n- \nPosting amounts, and costs, can now be written as arithmetic expressions, like `$50.20 + $16.54` ,`$800.00 * 1.05` ,`($92.00 + $15.00) / 3`\n or`1 GBP @ (1 / 1.14 EUR)` .`+` ,`-` ,`*` ,`/` and parentheses are supported.\n The results of`*` and`/` are rounded to the entry's decimal places (costs are kept exact).\n To avoid clashing with these, an unquoted commodity symbol can no longer begin with`(` when written before the number,\n or with`/` when written after it.\n See Amount expressions in the manual.\n (Martin,[#2648](https://github.com/hledgerorg/hledger/issues/2648) , a bounty funded by James Shubin;[#2856](https://github.com/hledgerorg/hledger/issues/2856) ,[#2857](https://github.com/hledgerorg/hledger/issues/2857) )\n- \nCommodity directives can now declare commodity aliases, with `alias:` tags: other symbols (or units) for the same commodity. Eg:\n\n```\ncommodity USD 1.00    ; alias: $, alias: US$, alias: \"US dollars\"\ncommodity h 1.00      ; alias: 60 min\n```\n\n Amounts written with an alias are converted to the canonical commodity when read (print shows them as written; `print -x` shows them converted),\n so eg`$100` and`100 USD` are the same thing, and can balance each other.\n An alias can have a multiplier, for differently-sized units.\n Aliases are also used as a last resort exchange rate by`-V` ,`-X` and`--value` , in all file trees;\n `prices --show-aliases` lists these rates.\nThis is useful eg when your journal and your downloaded price data use different symbols for a currency.\n- \nA repeated commodity declaration (in the same file, an included file, or another `-f` file) now adds to the earlier one, instead of replacing it:\n aliases are combined, a display style replaces the earlier one only if given, and later tags take precedence.\n With several`-f` files, the last file's display style is now used (previously the first's);`--debug=1` shows any that differ.\n\n##### Transaction balancing\n\n- \nTransaction balancing errors are clearer, and show the summed amounts. \n When rounded amounts being compared look identical, more decimal places are shown.\n ([#2636](https://github.com/hledgerorg/hledger/issues/2636) )\n- \n`--txn-balancing=exact|old` is now`--txn-tolerance=entry|display` , meaning \"balance transactions within\n the entry's precision\" (preferred) or \"within display precision\" (deprecated; lets you postpone fixing old journals).\nThe old spelling still works.\n- \nFixed: an inferred unit cost could be shown with too few decimal places (eg `@ 33.33 B` ),\n so`print -x` output could be rejected as unbalanced when read back.\n Now it is shown exactly, or with 8 decimal places if it's a repeating decimal.\nIn other cases too, print shows repeating decimals with 8 decimal places, not 255.\n- \nFixed: in entries with balance assignments, `check balanced` and strict mode didn't catch implicit commodity conversions,\n and`--txn-balancing` had no effect.\n- \n`--infer-imbalance` adds`equity:imbalance` postings to exactly balance entries which are\n balanced only when rounded to the entry's precision (eg because of a rounded`@` cost).\n So totals at cost become exactly zero, and the accumulated imbalance can be seen.\n The new Imbalance (`M` ) account type can be used to select a different account.\n\n##### Other journal features\n\n- \nOne or more adjacent comment lines directly above a transaction (a \"preceding comment\") are now considered part of the transaction, \nand are shown when it is printed.\n- \nJournal files can now `include` CSV/SSV/TSV files, or CSV rules files.\n `include FILE.csv` uses a nearby FILE.csv.rules file; for more flexibility, include the rules file and specify the data with a`source` rule.\n- \n`apply year` is now scoped, as in Ledger:`end apply year` restores the previous default year,\n so following year-less dates no longer get the block's year.\n `apply year` blocks can be nested, and one left open lasts until the end of its file.\n An`end apply year` with no matching`apply year` is now an error.\n (Previously`apply year` was a deprecated alias for`Y` , and`end apply year` was ignored.)\n A bare`end` or`end apply` , and an unmatched`end apply account` , give clearer errors.\n ([#2852](https://github.com/hledgerorg/hledger/issues/2852) )\n- \nA `date:` or`date2:` tag with an empty value in a posting comment is now accepted, setting no date. This helps when reading Ledger journals.\n\n##### Assert rules\n\n- \nThe new `assert` directive declares rules, written as queries, which hledger checks whenever it reads the journal,\n like balance assertions. Eg:\n\n```\nassert none daily    type:A balance:<0         ; no asset accounts are negative at end of day\nassert some monthly  income:salary             ; there's a salary transaction every month\nassert none          expenses:petty amt:>+500  ; no single petty expense exceeds 500\n```\n\n Each rule's query is run as `hledger bal -E QUERY` would run it, over the whole journal,\n or in each period of its period expression, and must match no rows (`none` ) or at least one row (`some` ).\n The new`balance:` and`change:` terms (see Queries) can be used to test the rows' balances and changes;\n otherwise, a rule is about which postings exist.\n A periodic rule can be followed by indented`skip` lines, naming dates or periods to skip checking.\n Assert rules are part of the assertions check:`-I` disables them,`-s` or`check assertions` re-enables them.\n Their scope is the file tree they are declared in.\n When a rule fails, the error shows every period in which it failed, some of the matching balances, changes or postings,\n and a report command to see more.\n ([#1738](https://github.com/hledgerorg/hledger/issues/1738) ,[#2719](https://github.com/hledgerorg/hledger/issues/2719) )\n- \n`hledger check` can also check assert rules given as arguments, eg`hledger check 'assert none daily  type:A balance:<0'` .\nThis is handy for trying out a rule, or for rules you don't want to keep in the journal.\n- \nThese replace the hledger-check-fancyassertions add-on script, which is removed. \n Ledger-style`assert EXPR` directives, which hledger used to ignore, are now an error unless adapted to hledger's syntax.\n\n##### Time logging\n\n- \nIn timedot files, a line whose first word looks like a date is now always parsed as a date line, with a clear error if the date is invalid \n (instead of being silently treated as a comment or a zero-amount entry).\n Lines with an org heading prefix (eg`**` ) are parsed more consistently.\n- \nFixed: 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.)\n- \nFixed: timedot and timeclock durations are no longer rounded to 0.01 hours, so totals don't drift, \nand a timeclock session crossing midnight no longer loses a second.\n\n#### Investments\n\n##### Lot tracking\n\n- \nhledger can now track investment lots and calculate capital gains. \n It tracks each purchase's cost basis, infers and validates lot movements across transactions and accounts,\n and calculates (or checks) the gain or loss when you sell. In brief:\n  - \nLot tracking is enabled for a commodity by a `lots:` tag on its commodity directive;\n or lot postings are recognised by a cost basis annotation, or an explicit lot subaccount.\n Lot calculation and checking is done whenever such entries are present;`--ignore-lots` (or`-I` , which now also means this) disables it.\n  - \nCost basis is written as `{DATE, \"LABEL\", COST}` , with all parts optional.\n Ledger's`{COST} [DATE] (NOTE)` syntax is also accepted.`{{TOTALCOST}}` is supported.\n Cost basis (`{}` ) and transacted cost (`@` ) are each inferred from the other, so writing either is often sufficient.\nIn an acquisition, if both are written, they must agree.\n  - \nPostings are classified as acquisitions, disposals, transfers or gains. \n Disposals balance at cost basis, with a single realised gain posting, which can be written (and is checked) or left out (and is inferred);\n this is historical cost accounting, preserving the accounting equation.\n Gain accounts are detected by the new Gain (`G` ) account type, declared or inferred from names like`revenues:gain` or`income:capital-gains` ;\n `revenues:gain` is used by default.\n  - \nLots are selected for disposal or transfer by a reduction method, set with the `lots:` tag's value, per commodity or per account:\n FIFO, LIFO, HIFO, AVERAGE, or the all-accounts variants FIFOALL, LIFOALL, HIFOALL, AVERAGEALL.\n Or you can select lots explicitly, with a cost basis annotation.`lots: NONE` on an account opts it out (eg for tax-sheltered accounts).\n  - \nTransfers between accounts preserve lots' identity and cost. Many forms are understood: multiple sources or destinations, \nelided amounts, fees (priced or unpriced; a priced fee is split off as a small disposal), and transfers into AVERAGE pools, which are re-averaged.\n  - \nShort positions are supported, as lots in a Liability account, where a negative posting opens a lot and a positive one covers it. \n ([#2756](https://github.com/hledgerorg/hledger/issues/2756) )\n  - \nInternally, each lot has its own subaccount, like `assets:broker:{2026-01-15, $50}` . These are hidden by default;\n the`--lots` flag shows them in any report, and you can also write them explicitly.\n `close --clopen --lots` carries lots between yearly files.\n  - \n`print` shows lot postings with an explicit cost basis, so its output is re-readable;`print --lots` shows the per-lot postings,\n and the new`print -a/--all` shows everything useful for troubleshooting (`--explicit --lots --verbose-tags` ).\n `--verbose-tags` shows lot postings'`ptype` tags (acquire, dispose, transfer-from, transfer-to, gain).\n  - \n`-B/--value=cost` converts lot postings at their cost basis, so for lot balances it shows the cost of the units still held, and`bse -B` balances.\n `--value=transacted` gives the old`-B` behaviour (proceeds and net cash invested).`--gain` shows value minus cost basis.\n ([#2751](https://github.com/hledgerorg/hledger/issues/2751) )\n  - \nThe `lots` check which validates lot movements, usually run by default, can also be run by`hledger check lots` .\n Lot errors show the entry as written, how hledger interpreted its postings, and eg the lots actually available.\nBalance assertions on lot subaccounts can't be checked reliably, and are ignored when lot detail is hidden; the manual explains.\n See \"Lots and capital gains\" in the manual, and [https://hledger.org/start-tracking-lots.html](https://hledger.org/start-tracking-lots.html) .\n ([#2581](https://github.com/hledgerorg/hledger/issues/2581) ,[#2636](https://github.com/hledgerorg/hledger/issues/2636) ,[#2649](https://github.com/hledgerorg/hledger/issues/2649) ,[#2724](https://github.com/hledgerorg/hledger/issues/2724) ,[#2731](https://github.com/hledgerorg/hledger/issues/2731) ,[#2839](https://github.com/hledgerorg/hledger/issues/2839) ,[#2843](https://github.com/hledgerorg/hledger/issues/2843) ,[#2866](https://github.com/hledgerorg/hledger/issues/2866) )\n- \n\n##### Holdings\n\n- \nThe new `holdings` report shows your lot-tracked investments' performance, per account and commodity, or per lot (`--lots` ),\n with units, unit/average cost, current price, total cost and market value, portfolio weight, unrealised and realised gains (UGain, RGain), age,\n and XIRR annualised return. Multiple cost and value commodities are shown separately, or converted to one with`-X COMM` .\n  - In tree mode, accounts with subaccounts or several commodities are heading rows showing their subtree's totals.\n (Arthur Cinader,[#2779](https://github.com/hledgerorg/hledger/issues/2779) )\n  - With a report interval (eg `-M` ), it shows the totals at each period end, up to today, titled eg \"Monthly holdings\";\n `--change` ,`--cumulative` or`-H` select whether the gain columns show gains during each period, since the report start,\nor since acquisition (the default).\n  - When the report period has a start date (`-b` ,`-p` ,`date:` ), the gain columns show the gains during the report period.\n Eg`hledger holdings -p today` shows today's gains.\n  - When some holdings have no market price, the totals show the others' value and gains, and a note names the ones excluded.\n  - When closed positions (fully disposed commodities or accounts) are hidden, as they are without `-E` ,\na note says how many, since the RGain and XIRR totals include them.\n  - `balance:` and`change:` queries can select holdings by units, value, or (with`-B` ) cost, eg`holdings balance:'>$1000'` .\n  - `-S/--sort-amount` sorts holdings by Total value, largest first, with unpriced holdings last (or with`-B` , by Total cost).\n  - With colour, gains are green and losses red.\n  - It has csv, tsv, html, fods and json output, and can show charts.\n- In tree mode, accounts with subaccounts or several commodities are heading rows showing their subtree's totals.\n\n#### Reporting\n\n##### Queries\n\n- \nA new \"find anywhere\" query, written `find:PATTERN` or`::PATTERN` , matches a regular expression in any of a transaction's fields\n (code, description, comment, tags including hidden and inherited ones, account name, or amount);\n and if PATTERN is a period expression, it also matches dates in that period.\n This allows many queries to be written more briefly, especially when you're not sure where some text might be.\n Eg`::2025 ::food` matches things in 2025 (or mentioning \"2025\") and mentioning \"food\".\n- \n`amt:` can now include a commodity symbol, to compare only amounts in that commodity:`amt:'>$100'` ,`amt:'<200 EUR'` .\n This is easier than adding a`cur:` term, which needs regular expression escaping (`cur:'\\$' amt:'>100'` ).\n The manual is also corrected:`amt:` without a commodity symbol matches multi-commodity postings if any of its amounts match.\n- \n`any:` and`all:` queries now also work in posting-oriented reports like register, balance and aregister;\n previously they had an effect only in commands which show whole transactions, like print.\n So those reports can now select postings based on their siblings: eg`hledger balance expenses any:cash` shows expenses which were paid with cash.\n- \nQueries like `desc:` or`::` , with an empty pattern, now match anything. (Previously they gave an error.)\n `date:` query parse errors now show the actual error.\n- \n`accounts` now respects transaction-specific query terms such as`date:` ,`status:` ,`desc:` ; these no longer match a declared but unused account.\n (Only`acct:` ,`depth:` ,`type:` or`tag:` can match one.)\n `payees` likewise; and`payee:` now matches declared payees.\n- \nNew `change:` and`balance:` query types match report rows by their summed amounts,\n unlike`amt:` which matches individual posting amounts.\n `change:` tests a row's change (the sum of its postings);\n `balance:` tests its historical balance at the end of its period.\n Eg:\n\n```\nhledger bal expenses change:'>+100'   # expense accounts where more than 100 was spent\nhledger bal assets balance:'<0'       # asset accounts with a negative balance\nhledger reg gifts -M change:'>100'    # months with more than 100 in gifts\nhledger areg checking balance:'<0'    # transactions after which checking was overdrawn\nhledger print not:change:0            # entries with a tolerated imbalance or unbalanced virtual postings\n```\n\n As with `amt:` , a commodity symbol (`change:'>$100'` ,`balance:'<0 EUR'` ) compares just that commodity.\n And an unsigned number tests the magnitude, ignoring sign (so`change:'>100'` also matches a change of -150),\n while a signed number (or 0) does a signed comparison (eg`change:'>+100'` ,`balance:'<-500'` ).\n Amounts are tested with their real sign, as shown by`balance` (not the adjusted sign shown by`--invert` or`bs` /`cf` /`is` ).\n `balance:` always means the historical balance, ie calculated from the start of the journal (with or without`-H` ).\nIn balance reports, non-matching accounts are left out, as with an account query, so parent balances and totals include just the matching accounts.\n\n##### Reports\n\n- \nA new `transactions` (`tx` ) command lists transactions on one line each. It's like print, but better for a quick overview.\n- \n`register` with no report interval now hides zero-amount postings unless`-E` (or`--average` ) is used,\n like register with a report interval, or aregister.\n ([#2836](https://github.com/hledgerorg/hledger/issues/2836) )\n- \n`balance` has a new`--full-names` flag, which in tree mode shows full account names;\n `--no-elide` now also works in list mode, adding the parents of the posted-to accounts;\n and a new`barewide` layout shows bare numbers with a column for each commodity.\n (Henning Thielemann,[#2429](https://github.com/hledgerorg/hledger/issues/2429) ,[#2661](https://github.com/hledgerorg/hledger/issues/2661) )\n- \n`aregister` now supports`-A/--average` , showing the running average change per transaction instead of the running balance;\n and a new`--matched` flag, which shows the matched account(s) in each row instead of the other account(s) (the opposite of`-r/--related` ).\n (Caleb Maclennan, Simon Michael,[#2540](https://github.com/hledgerorg/hledger/issues/2540) )\n- \nReport titles can be customised: `--title=TITLE` sets a title for most reports (in txt, html or fods output),\n `--subreport-titles='TITLE1|TITLE2|...'` sets the section titles of compound reports like`balancesheet` (eg`--subreport-titles='Aktiva|Passiva'` ),\n and`--period-titles=compact|dates` selects abbreviated or full ISO dates as column headings in periodic reports.\n ([#2578](https://github.com/hledgerorg/hledger/issues/2578) )\n- \nHTML output is improved: with `--base-url` , every balance report amount links to the corresponding register view, so you can click to see\n where an amount comes from; CSS classes are used instead of inline styles, with classes for negative amounts, amounts, dates, and tree depth;\n dates and amounts don't wrap; a`hledger.css` file now overrides the builtin styles (an example is provided);\n register, aregister and holdings show a title too; and there are newlines between elements, for readability.\n (Arthur Cinader, Simon Michael,[#2326](https://github.com/hledgerorg/hledger/issues/2326) )\n- \nThe `commodities` ,`tags` and`payees` commands have a`--directives` flag, which shows directives ready to paste into a journal.\n (Use it with`--undeclared` to generate directives satisfying strict mode.)\n- \n`commodities --used` now shows only commodities used in transactions; a new`--priced` flag shows commodities used in P directives.\n `commodities` now supports`date:` queries (and report period options) with these, and`tag:` queries.\n- \n`prices` has a new`--summary` mode; a`--locations` flag, showing where each price came from;\n `--show-aliases` , showing the rates implied by commodity aliases; and it can be filtered by`find:` queries.\n- \nRepeating the `--transpose` flag now toggles it. In`--pivot` 's value,`account` is accepted as a synonym for`acct` .\nA two-year interval's report title now says \"Biennial\", not \"Biannual\" (Arthur Cinader).\n- \nFixed, in balance: multi-period reports using `--tree` and`--transpose` together now show only the leaf accounts ([#1941](https://github.com/hledgerorg/hledger/issues/1941) , JoeJoeflyn);\n in single-period csv/tsv/html/fods output,`--drop` no longer truncates the \"Total:\" heading ([#2688](https://github.com/hledgerorg/hledger/issues/2688) );\n single-period HTML/FODS reports respect the commodity display style (Simon Michael, Henning Thielemann,[#2584](https://github.com/hledgerorg/hledger/issues/2584) ,[#2588](https://github.com/hledgerorg/hledger/issues/2588) );\n FODS multi-period and compound reports have the correct number of header columns (Henning Thielemann);\n and in single-period text reports, account names stay aligned when amounts are wide (Adam Sardo,[#1148](https://github.com/hledgerorg/hledger/issues/1148) ).\n- \nFixed, in register: with a report interval, account-specific depth limits ( `--depth REGEXP=N` ) now work correctly ([#2423](https://github.com/hledgerorg/hledger/issues/2423) );\n with multiple files, the transaction indexes in csv/tsv/fods/html/json output continue across files instead of restarting;\n and postings whose amount couldn't be inferred are omitted ([#2571](https://github.com/hledgerorg/hledger/issues/2571) ).\n- \nFixed, in aregister: with historical balances, a `date2:` start date in the query is now honoured (Arthur Cinader).\n- \nFixed: `balance --budget` reports no longer lose their goals when the command includes transaction or posting filters,\n such as`status:` ,`desc:` or`--cleared` . Only the attributes that meaningfully select goals (account, account type, depth, date, commodity) affect them.\n So`bal --budget --cleared` compares cleared spending against the full goals.\n ([#2545](https://github.com/hledgerorg/hledger/issues/2545) )\n- \nFixed: `--count` reports showed counts in the journal's no-symbol commodity style (eg 1.00), rounded their averages to whole numbers,\n and bs/bse/is showed negative counts in some sections. Now counts are whole numbers, averages have one decimal place,\nand bs/bse/is show positive counts in every section, with their sum as the net total.\n- \nFixed: `--value=WHEN,` with nothing after the comma now values in the no-symbol commodity (previously it was read as`--value=WHEN` ).\n `-X` and`--value` also accept a double-quoted commodity symbol, so`\"\"` also selects the no-symbol commodity.\n And`-X` /`--value` with a commodity to which no conversion price can be found now prints a warning, instead of silently having no effect.\n ([#2844](https://github.com/hledgerorg/hledger/issues/2844) )\n- \nFixed, in stats: the elapsed time and txns/s figures once again cover the whole run (since 1.51 they covered only the journal-reading phase). \n `--oneline` (formerly`-1` ) has a`-q` short spelling, and it and`-1` /`--depth 1` now work independently.\n stats is faster on large journals, and shows a base currency inferred for the journal, eg`$ (USD)` .\n- \nFixed: roi's TWR is now computed from the investment's value at the end of each day, exactly, at daily granularity. \n The previous method assumed an exact valuation was available around each cash flow, and its solving could fail.\n Results change for most journals with cash flows between valuations; if you record valuations only occasionally\n (eg with`--pnl` transactions), record one around large deposits and withdrawals.\n Also, cash flows are now measured from the investment's perspective (other postings in the transaction, eg fees, no longer affect them),\n 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,\n and`--cashflow` shows each cash flow and the TWR steps, for checking the results. These can change IRR results too. See the roi docs.\n (Dmitry Astapov,[#2420](https://github.com/hledgerorg/hledger/issues/2420) ,[#2824](https://github.com/hledgerorg/hledger/issues/2824) ,[#2825](https://github.com/hledgerorg/hledger/issues/2825) )\n- \nFixed: in roi, a failed IRR or TWR now shows \"error\" in its own cell, with the rest of the report still shown, \n and the reasons shown as a warning after the report (with exit status 0).\n Some special cases now have an answer instead of an error: when money is put in and nothing comes back (eg a write-off), IRR is -100%,\n and same-day cash flows that add up to zero have an IRR of 0%.\n And omitting`--pnl` now selects no postings, as documented; previously it selected all postings.\n (Dmitry Astapov, Arthur Cinader,[#2670](https://github.com/hledgerorg/hledger/issues/2670) ,[#2845](https://github.com/hledgerorg/hledger/issues/2845) )\n\n##### Charts\n\n- \nhledger now has easy charting built in. Most reports can be shown as charts, with `--chart` .\n In the terminal, these are bar charts, using colour and Unicode block characters when supported.\n Charts adapt to the report options and data, showing subperiods, stacked bars, end balances,\n contra amounts hatched, largest amounts prioritised, totals/averages, etc. Each commodity gets its own chart.\nIf csv, tsv or json output is selected, the chart's data is shown instead.\n- \nWhen colour is available, accounts are coloured by type: assets blue, liabilities amber, equity violet, revenues green, expenses red, \nwith each account of a type in a different shade. Accounts of unknown type get distinct colours.\n- \n`--view` opens a report in the system's default viewer for its format.\n It writes an output file if you didn't specify one (in hledger's cache directory), choosing html format if you didn't specify that.\n Eg`hledger is -M --chart --view` , or`hledger is -M -o is.fods --view` .\n- \nCharts can also be SVG images, with tooltips and light/dark variants, selected by the new svg output format ( `-O svg` or`-o FILE.svg` ).\n Or, SVG charts can be added to html reports (`-o FILE.html --chart` ).\n(Simon Michael, Arthur Cinader)\n- \nIn compound reports like bs and is, all accounts are stacked in one bar per period, on opposite sides of the axis (the diverging layout); \n `--chart=grouped` shows each section's accounts in a bar of their own, side by side, as`balance --chart=grouped` does for each account type.\n `--chart=net` also draws the net total.`--chart=SCALE` (eg`--chart=5000` ) draws charts at a fixed scale,\n so that separate charts can be compared. These can be combined, eg`--chart=grouped,net,5000` .\n- \n`holdings` has a chart, showing a horizontal bar per holding (or lot) with its cost basis, unrealised gain or loss, and gain percentage;\n or with a report interval, the cost basis and value per period (or with`--change` or`--cumulative` , the gains).\n `activity` now shows a chart of transactions per week, using the new chart engine;`--postings` counts postings, per account.\n It now supports`-w/--width` ,`-S` ,`-T` ,`-A` , and svg, html, csv, tsv and json output.\n\n##### print, exporting\n\n- \n`print` now aligns posting amounts at their decimal marks. The target column is 53; it is increased when needed.\n Balance assertions' operators and amounts are aligned too.\n A new`--layout` option (also supported by`add` ,`close` ,`import` ,`rewrite` ) customises this:\n `--layout=COL` sets a different target column, and`--layout=hledger1` gives hledger 1's layout.\n- \nIn `print` 's csv/tsv/html/fods/sql output, the debit column now appears before the credit column, following convention.\n In`aregister` 's csv/tsv/html output, the \"change\" column is renamed \"amount\", matching print's, for easier re-importing.\n- \n`print --export` reproduces the whole journal losslessly, preserving directives, comment lines and blank lines,\n for easier reformatting or exporting. Included files are inlined.\n With`--forecast` and/or`--auto` , the generated transactions and postings are exported instead of their rules.\n- \n`print` has a new`ledger` output format (`-O ledger` or`-o FILE.ledger` ), which uses Ledger's lot syntax,\n and with`--export` , comments out directives which Ledger does not support. Its default format is now called \"journal\" (\"txt\" is still accepted).\n- \n`print` 's beancount output is improved. With`--export` , it generates the directives Beancount needs (options, commodity, open, prices),\n and accounts whose top-level name is not one of Beancount's are prefixed with one based on their account type, if known.\n It converts single-letter commodity symbols, the no-symbol commodity, top-level \"revenue(s)\" accounts, balance assignments and market prices;\n it sets booking methods from accounts'`lots` tags, and shows cost basis before transacted cost;\n underscores in account names become dashes rather than being hex-encoded ([#2596](https://github.com/hledgerorg/hledger/issues/2596) ); and non-ASCII letters in tag names are encoded ([#2576](https://github.com/hledgerorg/hledger/issues/2576) ).\n- \n`rewrite --diff` output can now be applied by`patch` or`git apply` : each source file is diffed as a whole, with three lines of context.\n And changed transactions which have no journal entry to patch (eg ones read from CSV) are left out of the diff and reported on stderr.\n ([#2548](https://github.com/hledgerorg/hledger/issues/2548) )\n\n##### Other commands\n\n- \n`setup` detects terminal colour support and explains its verdict; warns if the filesystem does not support appending ([#2577](https://github.com/hledgerorg/hledger/issues/2577) );\nchecks for Gain accounts; no longer reports unused commodity aliases as undeclared; and no longer shows an error message on Windows.\n- \n`check` : an unknown check name is now reported right away, instead of after reading the journal.\n `check ordereddates` with`--forecast` now ignores forecast transactions.\n- \n`accounts --show-aliases` shows each account's aliases, as a comment, and makes account name queries also match aliases.\n `accounts --locations` now also shows where undeclared accounts were first used, and shows locations as FILE:LINE.\n When`check accounts` finds an undeclared account name which is an account alias not in effect there, the error explains alias scope.\n- \n`close` no longer generates a spurious zero posting for some emptied accounts.\n\n#### Performance\n\n- \nhledger has been optimised, and this is the fastest and most memory-efficient version yet. \n On medium and large journals,`balance` is 2-3x faster than 1.52, and uses a third less memory.\n Unnecessary work is avoided, so you pay only for the features you are using.\n Detailed stats, performance tips, and a new set of benchmarks comparing the plain text accounting apps, are at[https://hledger.org/PERFORMANCE.html](https://hledger.org/PERFORMANCE.html) .\n- \nInterval reports no longer slow down quadratically with the number of periods (a daily register over 100 years spent 2.5s in that alone), \n and register and`--forecast` use constant memory however many periods there are.\n ([#1683](https://github.com/hledgerorg/hledger/issues/1683) )\n- \nRegex replacement no longer takes quadratic time in the length of the text; long texts (eg regex aliases on 2000-character account names) are much faster. \n check accounts, check payees and check tags are faster with many declarations (eg 0.63s -> 0.20s with 10k transactions and 10k declared accounts).\n Journals with many balance assertions or quoted commodity symbols are parsed faster, journals with lots are processed faster,\nand tables with many-line cells (eg register with a many-commodity running balance) are rendered faster (Dmitry Astapov).\n- \nhledger no longer searches PATH for add-ons when the command is a builtin command, for faster startup (eg `hledger --version` takes 23ms instead of 32ms).\n- \nhledger 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, \nmaking hledger about 10% faster. Packagers who want the speedup should use megaparsec 9.8.3+.\n- \n`--debug=1` now prints a timing line for each phase of hledger's work, with its run time and allocation,\nand shows how much of the journal was parsed by the new fast-path parser.\n\n#### Other\n\n##### Packaging and API\n\n- \nhledger now requires aeson 2.2.5.1 or newer, avoiding a bug where certain data could trigger memory/CPU exhaustion \n ([https://haskell.github.io/security-advisories/advisory/HSEC-2026-0007.html](https://haskell.github.io/security-advisories/advisory/HSEC-2026-0007.html) ).\n megaparsec 9.8.0 is excluded, to avoid a position marker bug in error messages ([megaparsec#572](https://github.com/mrkkrp/megaparsec/issues/572) ).\n hledger no longer depends on lucid; blaze-html is used for HTML output (Arthur Cinader,[#2737](https://github.com/hledgerorg/hledger/issues/2737) ).\n- \nhledger's source tarball no longer ships the benchmark suite's 1.6MB journal.\n- \nHaskell API changes in the hledger package: Hledger.Cli.Anchor gains LinkOpts and link builders; \n Balance exports its report specs, spreadsheet parts and titles, with shared functions in Balance.Internal;\n balanceReportAsText returns Text; setDisplayCommodityBare's parameters are swapped;\n Hledger.Cli.Xirr is the IRR solver shared by roi and holdings.\n(Henning Thielemann, Arthur Cinader, Dmitry Astapov)\n\n##### Examples\n\n- examples/file-layouts (formerly examples/templates) has simple, default, years and year-dirs layouts; `hledger init` writes the first three.\n- examples/lots/ has lot tracking examples: lots.journal, irr.journal (comparing roi and holdings XIRR),\nand investments-5y.py, which generates a large investment journal.\n- examples/csv/ has new rules for PayPal (json), Kraken (demonstrating `merge` ), SimpleFIN, Unify Federal Credit Union and GitHub sponsorships.\n- examples/home-page-example.journal is the example from the hledger.org home page.\n- hledger.conf.sample is updated, with command-listing helpers and a custom `watch` command.\n- bcexample's beancount prices are converted to P directives, so `-V` works.\n- examples/hbcexample.journal is a copy of bcexample.journal with current dates and valid hledger 2 lot entries.\n\n##### Scripts/addons\n\n- `getdata` and`getprices` are sample scripts for the`get` command;`krakencsv` helps convert Kraken CSV.\n- `git-pre-commit-hook` is an example git hook which runs`hledger check` on your journal when its files are being committed.\n- `hledger-bar` allows its flags anywhere among the arguments, and sets the scale with a new`-s` option.\n- hledger-check-fancyassertions is removed, replaced by assert rules. The hledger-example* scripts are renamed and updated.\n- bashrc: holdings and tx aliases.\n\n##### Docs\n\n- The hledger manual is reorganised, with more getting started info at the start; Options and Config files consolidated;\n COMMANDS moved before DATA FORMATS, and grouped like the commands list; detailed command line tips moved to PART 5;\nand a shorter, better grouped topic list in the website sidebar.\n- New sections include: Lots and capital gains (with Recording disposals, Troubleshooting lots and more), Charts, Languages,\n Amount expressions, Commodity aliases, the assert directive, Transaction balancing, Report titles, print layout, Built-in tests,\nand hledger 1 and hledger 2 (on migrating and interoperating).\n- The CSV docs are reorganised, with clearer explanations of reading the data, finding the data, CSV vs hledger fields, if rules and ifs tables,\nand rules examples moved into Working with CSV.\n- Directives, the alias directive, account aliases, directive scopes and combining file trees are explained more clearly; timedot is rewritten;\n Tags, Boolean queries, the two-space delimiter, decimal marks and period expressions are clarified.\n ([#1640](https://github.com/hledgerorg/hledger/issues/1640) ,[#1950](https://github.com/hledgerorg/hledger/issues/1950) ,[#2664](https://github.com/hledgerorg/hledger/issues/2664) ,[#2665](https://github.com/hledgerorg/hledger/issues/2665) ,[#2714](https://github.com/hledgerorg/hledger/issues/2714) )\n- The \"added in VERSION\" and \"experimental\" labels are dropped throughout the manuals.\n\n### hledger-ui 2.0\n\nAll changes since hledger-ui 1.52.4.\n\nFor the 1.99.x preview releases, and 2.0's changes since the last of them (1.99.6),\n\nsee [https://hledger.org/relnotes199.html](https://hledger.org/relnotes199.html).\n\nSee also the hledger changelog, for changes affecting all the hledger tools\n\n(lot tracking, commodity aliases, the `::` find query, translations, faster starts and reloads, etc.)\n\n#### Highlights\n\nThe most notable changes since hledger-ui 1.52; each is described below.\n\n- Watch mode is on by default, with no memory leak, and reloads more robustly. (Breaking changes, Fixes, Improvements)\n- The `L` key shows or hides lot subaccounts and per-lot detail, for journals using hledger 2's lot tracking. (Improvements)\n- Assert rules are checked on load and reload and when `I` re-enables checks. (Improvements)\n- Translations: the `--lang` option shows the UI in other languages. (Improvements)\n- The journal can be read from stdin, on unix-like systems. (Improvements)\n- And hledger's improvements (more speed, commodity aliases, new queries; see the hledger changelog).\n\n#### Breaking changes\n\n- \nAutomatic reloading is now enabled by default: hledger-ui watches for data and date changes, and reloads automatically. \n The new`--no-watch` flag disables this, reloading only with the`g` key.\n The rightmost`--watch` /`--no-watch` flag wins, so a config file setting can be overridden on the command line.\n- \nWith more than one of `--cash` /`--bs` /`--is` /`--all` /`--register` , the last one wins,\nso a config file's choice can be overridden on the command line. (Previously they had a fixed priority order.)\n- \n`--tldr` is renamed to`--examples` (see the hledger changelog).\n\n#### Fixes\n\n- \nFixed a long-standing memory leak (and background CPU use) when reloading in watch mode. \n Now watch mode has no extra memory/CPU cost, and can be used freely with large journals.\n ([#1825](https://github.com/hledgerorg/hledger/issues/1825) )\n- \nhledger-ui gracefully handles more reloading failures, \n such as failure caused by a changed CSV file or rules file,\n or by a file momentarily removed when your editor saves it.\nInstead of quitting, it now shows the error screen, allowing recovery.\n- \nThe transaction screen now always shows the whole journal entry. \n Previously with a`cur:` or`amt:` query in effect, it showed the entry without the non-matching postings.\n(A long-standing bug, since hledger 1.23.)\n- \nThe mouse wheel now scrolls all the way. Previously it moved the viewport at most to the current selection \nand then stopped; you had to move the selection with the arrow keys to get any further.\n- \nPressing `DOWN` at the last list item, or`C-l` (recenter) when near the end of a list,\n no longer scrolls into blank padding space; hledger-ui now keeps as many items as possible on screen.\n (Juan Wajnerman,[#2278](https://github.com/hledgerorg/hledger/issues/2278) ,[#2593](https://github.com/hledgerorg/hledger/issues/2593) )\n- \nWith `--pivot` , re-enabling checks with`I` did not really recheck them, so failures went unreported.\n- \nOn Windows, the `A` key (running hledger-iadd), the`E` key (running`$EDITOR` ),\n and the running of info/man/tldr/pager helpers now correctly quote file paths containing spaces.\n ([#2646](https://github.com/hledgerorg/hledger/issues/2646) )\n\n#### Improvements\n\n- \nThe `L` key toggles showing lot subaccounts and per-lot detail (like the CLI's`--lots` flag),\n for journals using hledger 2's lot tracking.`ESC` resets it to the startup state.\n- \nhledger-ui checks the new assert rules (see the hledger changelog), \n when the journal is loaded or reloaded, and when checks are re-enabled with`I` .\n They always see future-dated ordinary transactions, even when those are hidden behind the`F` key.\n They see transactions generated by periodic rules only when`--forecast` is used.\n- \nThe new `--lang` option shows hledger-ui's menu and accounts screen names in other languages (see the hledger changelog).\n The help dialog and the register screen's labels are not yet translated.\n(Arthur Cinader)\n- \nhledger-ui can now read the journal from stdin ( `-f-` ), on unix-like systems.\n 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.\n- \nChanges to CSV rules files now trigger a reload, like changes to data files.\n- \nThe transaction screen now refreshes in place when there's a reload. Previously you had to exit and re-enter it. \n ([#1825](https://github.com/hledgerorg/hledger/issues/1825) )\n- \nWarnings (eg CSV data warnings, which could appear on every reload) no longer scroll and disrupt the display; \n they are shown on the bottom line, until the next key press.\n Also the screen is fully repainted after a reload, repairing any other stray terminal output,\nand error screen reloading is less flickery and more robust.\n- \nThe `E` key now jumps to the error position with the Zed and Sublime Text editors, also.\n(Rostislav Raykov)\n- \n`CTRL-c` now quits, like`q` , from any screen or mode, including while the help or a minibuffer is open.\nPreviously it was ignored.\n- \nClicking a background hledger-ui window now just brings it forward, \nwithout also selecting or entering the item under the pointer.\n- \nThe `-?` and`--webman` flags are added (see the hledger changelog).\n- \nAllow brick 3.x (with 3.1 support from GuillaumedeVolpiano), doclayout 0.6. Exclude megaparsec 9.8.0, to avoid a position marker bug in error messages \n ([megaparsec#572](https://github.com/mrkkrp/megaparsec/issues/572) ).\n\n#### Docs\n\n- The manual's KEYS section is grouped like the help dialog; the depth keys, help dialog keys, `CTRL-z` and editor variables\nare documented; and the watch mode and BUGS sections are updated.\n\n### hledger-web 2.0\n\nAll changes since hledger-web 1.52.4.\n\nFor the 1.99.x preview releases, and 2.0's changes since the last of them (1.99.6),\n\nsee [https://hledger.org/relnotes199.html](https://hledger.org/relnotes199.html).\n\nSee also the hledger changelog, for changes affecting all the hledger tools\n\n(lot tracking, commodity aliases, new queries, translations, faster starts and reloads, etc.)\n\n#### Highlights\n\nThe most notable changes since hledger-web 1.52; each is described below.\n\n- More reports (balance sheet, income statement, cashflow, holdings and more), with options, and new charts. (Reports)\n- Paged journal and register views. (Reports)\n- A dark mode, and a tidier look. (Appearance)\n- Keyboard navigation, like hledger-ui's. (Navigation and keys)\n- Translations. (Translations)\n- Security hardening. (Security)\n- Changes that would make the journal unreadable are refused. (Fixes)\n- Less javascript. (Other improvements)\n\n#### Security\n\n- \nhledger-web now sends a Content-Security-Policy header with every page. \n This tells your browser to load scripts, styles, images and fonts only from hledger-web itself,\n and to run only hledger-web's own scripts; so if anything script-like ever reached a page,\n eg through data in your journal, the browser would refuse to run it.\n In normal use you should notice no difference.\n (Arthur Cinader,[#2703](https://github.com/hledgerorg/hledger/issues/2703) )\n- \nhledger-web now sends the `X-Frame-Options: SAMEORIGIN` and`X-Content-Type-Options: nosniff` security headers\n on every response, so other sites can't frame its pages for clickjacking, and browsers won't second-guess content types.\n(Arthur Cinader)\n- \nNothing is loaded from third parties any more; two dead third-party script tags, and the unused (always disabled) \n Google Analytics hook, have been removed.\n(Arthur Cinader)\n- \n(The XSS and include-injection fixes of 1.52.2 and 1.52.3 are of course included.)\n\n#### Breaking changes\n\n- \nWhen listening on a non-local address (set with `--host` ), hledger-web now allows only read-only access by default.\n Add`--allow=add` or`--allow=edit` to allow changes.\n- \nStartup options and query arguments now set up the opening page, as url parameters, \n instead of acting as invisible server-side defaults and filters.\n So every view is described by its url, and a shared link shows the same view to everyone.\n But a startup query no longer restricts what hledger-web serves:\n it becomes the first page's search, which a viewer can edit or clear, and the JSON API serves the whole journal.\n To serve a restricted view, serve a restricted file.\n(Arthur Cinader)\n- \nPages are now shown in the viewer's language, when a translation is available (see Translations below). \n `--lang en` keeps hledger-web in English.\n- \nSome keyboard shortcuts have changed, to match hledger-ui (see Navigation and keys below).\n- \nIn JSON output, postings' `ptype` field is renamed to`preal` .\n- \n`--tldr` is renamed to`--examples` (see the hledger changelog).\n\n#### Fixes\n\n- \nThe add form, JSON API (PUT /add), edit and upload now refuse a change which would make the journal unreadable. \n They check it as the next read (with hledger-web's startup options) would, and on failure leave the file unchanged.\n Eg /add can no longer add unbalanced transactions, the add form now checks balance assertions,\n and edit and upload now respect`--strict` and`-I` .\n ([#2864](https://github.com/hledgerorg/hledger/issues/2864) ,[#2869](https://github.com/hledgerorg/hledger/issues/2869) )\n- \nhledger-web no longer exits prematurely when its page is in a background browser tab \n (browsers may run background tabs' timers much less often).\n Now it exits 15 minutes after its last page is closed (was 2 minutes), and a page pings as soon as it is foregrounded again.\n And when a page can't reach the server, it shows a notice saying hledger-web is no longer running and how to continue,\n instead of failing silently on the next click.\n (Arthur Cinader,[#2722](https://github.com/hledgerorg/hledger/issues/2722) )\n- \nThe register now shows the to/from account names when restricted by a `type:` query, instead of blank cells.\n(Arthur Cinader)\n- \nThe upload form now shows the name of the chosen file. \n(Arthur Cinader)\n- \n/favicon.ico and /robots.txt no longer return 404 when hledger-web is run outside its source directory. \n robots.txt now also asks crawlers not to index the site.\n(Arthur Cinader)\n- \nBrowsers now check for updated scripts and styles, so they don't keep using old ones after an upgrade.\n\n#### Reports\n\n- \nhledger's balance, balance sheet, income statement, cashflow and holdings reports are now available in hledger-web. \n Every amount links to the register it is derived from, column headings link to the report for that period,\n and a \"Report:\" row links the report pages to one another.\n The balance sheet has Equity as an option, and the balance report is called All accounts, as in hledger-ui.\n The holdings report is for journals using lots; in tree mode, accounts are heading rows with subtotals,\n and lots fold beneath their holdings. When its report period has a start date, it shows the gains during that period.\n It can also show a report interval, like`holdings -M` , with a Gains option choosing what the gain columns cover.\n Gains and losses are shown in green or red, and the`z` key shows or hides closed positions.\n(Henning Thielemann, Arthur Cinader, Simon Michael)\n- \nhledger-web now opens on the balance sheet, rather than the journal, \n 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).\n Pages show depth 1 by default: just the top-level accounts, so that tables and charts start simple and readable.\n `-` and`+` steps and a List/Tree switch beside a table's Account heading make deeper accounts easy to reach.\n- \nThe report pages have an Options panel, offering most of hledger's report options and filters \n (report interval, changes or end balances, depth, valuation, lots etc.), so reports can be reshaped in the browser.\n The options are kept as you move between pages, and every view has a shareable url.\n(Arthur Cinader, Simon Michael)\n- \nReports show a chart at the top, drawn by hledger's new chart engine (see the hledger changelog). \n The Chart and Data buttons, or the`c` and`d` keys, show or hide the chart and the data (persistently),\n so you can use hledger-web with either or both visible.\n When there's more than one commodity,`[` and`]` step between their charts.\n Charts are redrawn to fit when the page's width changes, and show their tooltips immediately, also on touch screens.\n This replaces the old register chart; jQuery and Flot are no longer used.\n (Simon Michael, Arthur Cinader,[#2800](https://github.com/hledgerorg/hledger/issues/2800) ,[#2784](https://github.com/hledgerorg/hledger/issues/2784) )\n- \nThe Chart option chooses the Diverging (default) or Grouped layout, and the `N` key shows or hides the net total line.\n The`--chart` startup option accepts the same values as the commands'`--chart` : a layout,`net` , and SCALE amounts.\n- \nThe sidebar now always lists the full account tree, for navigation, whatever the search. \n It has its own persistent depth, starting at 1, adjustable with the fold carets, its`-` and`+` controls, or a shift-DIGIT key.\n Its balances are now hidden by default, making pages with a large journal about twice as fast, and smaller;\n clicking the Balances heading, or pressing the`b` key, toggles them.\n They are now historical balances, as of the report's end date (previously, the changes during the search's period).\nA button shows or hides the sidebar, on all screen sizes.\n- \nThe journal and register views are now paged, showing the newest 1000 matching transactions and page navigation links. \n When the matches span more than one year, a years row links to each year (grouped by decade when there are more than twenty).\n Account links from a transaction open the account register at the appropriate page.\n (Arthur Cinader,[#586](https://github.com/hledgerorg/hledger/issues/586) )\n- \nThe register can start from the balance brought forward ( `accum=historical` ), so its running balance is the account's balance\n rather than a total of the transactions shown. The oldest row shows the brought-forward balance, and links to the earlier transactions.\n A running balance of many commodities shows just the row's own commodities, eliding the others.\n (Arthur Cinader,[#2784](https://github.com/hledgerorg/hledger/issues/2784) )\n- \nTree mode now folds items at the requested depth, and you can click individual items to expand them. \n Boring parent accounts are squashed, and the depth limit corresponds to account depth, as on the command line.\n In list mode, account names show their parent path dimmed, and a prefix shared by all the accounts is shown once.\n(Arthur Cinader, Simon Michael)\n- \nLinks in the journal, register and sidebar now behave consistently: an account name opens its view, \n an amount opens the register it comes from, and a date narrows to that day.\n The sidebar's amounts are now links, and its Journal link keeps the current search.\n(Arthur Cinader)\n- \nReport urls are simpler, and queries and parameters are used more consistently, \n eg`/register?account=assets:bank` or`interval=monthly` . Old bookmarks still work.\n(Simon Michael, Henning Thielemann)\n- \nSearch supports hledger's new query types: `::` (`find:` ),`change:` and`balance:` , and`amt:` with a commodity symbol.\nThe search help is updated. (See the hledger changelog.)\n- \nPercentages that can't be calculated now show plain amounts with an explanation, instead of an error page. \n(Arthur Cinader)\n\n#### Appearance\n\n- \nhledger-web now has a dark mode, enabled automatically when the browser or system is in dark mode. \n (Arthur Cinader,[#2706](https://github.com/hledgerorg/hledger/issues/2706) )\n- \nThe journal and register tables have been tidied up: digits in amounts are shown with equal width, so numbers line up neatly \n in a column; column headers are small and muted; and the zebra striping is replaced by a faint highlight on the row under the pointer.\n Amounts and their commodity symbol no longer break across lines.\n (Arthur Cinader,[#2718](https://github.com/hledgerorg/hledger/issues/2718) )\n- \nTransaction tooltips, shown when hovering over a transaction in the journal or a register, are now drawn in a fixed-width font, \n so amounts and comments line up as in the journal; long lines wrap, and the tooltip stays within the window.\n (Arthur Cinader,[#2716](https://github.com/hledgerorg/hledger/issues/2716) )\n- \nThe sidebar keeps its scroll position when you click an account or navigate, and on wider screens \n the sidebar and the main content scroll independently. A long or multi-commodity balance no longer covers its account name.\n Pages keep their scroll position too.\n (Arthur Cinader,[#2679](https://github.com/hledgerorg/hledger/issues/2679) )\n- \nJournal and register headings name the search's dates, like other pages.\n- \nhledger-web now has its own favicon: a gold coin struck with an equals sign. \n(Arthur Cinader)\n\n#### Navigation and keys\n\n- \nNavigation links are now also shown at the top of the page, so you can navigate with the sidebar closed. \n(Arthur Cinader)\n- \n`g` then a key goes to another page, via a dropdown menu, so you can navigate to most places with the keyboard.\n- \nKeyboard shortcuts for adjusting report options are provided, similar to hledger-ui's. \n(Arthur Cinader, Simon Michael)\n- \n`a` (open the add form) now works on all pages.`f` toggles full window mode, showing only the report.\n `/` puts the cursor at the end of the search field.`escape` exits the search field or full window mode, in addition to cancelling things.\n `delete` and`backspace` clear the search, as in hledger-ui.\n- \n`n` and`p` go to the next and previous page;`n` no longer opens the add form (use`a` for that).\n- \nKeyboard focus is managed better; after a page load or a search, keyboard scrolling and shortcuts work \nwithout having to click the page first.\n- \nThe help popup has been cleaned up, and links to hledger-web's manual on the website. \n(Arthur Cinader, Simon Michael)\n\n#### Translations\n\n- hledger-web can be shown in 12 languages (see the hledger changelog).\n The language is chosen by a`_LANG` query parameter (which saves a browser cookie), a previously saved cookie,\n or the browser's Accept-Language header; or it can be fixed at startup with the`--lang` option.\n See the manual's LANGUAGE section.\n(Arthur Cinader)\n\n#### Other improvements\n\n- \n`--port 0` lets the OS choose a free port. The chosen port is reported in the startup message and used in the default base url,\n so scripts can discover it. This works in the default`--serve-browse` mode too.\n (Arthur Cinader,[#2559](https://github.com/hledgerorg/hledger/issues/2559) )\n- \nhledger-webs running at different ports on one host remember their own report and display options. \n(Simon Michael, Arthur Cinader)\n- \nChanges to CSV rules files now trigger a reload, like changes to data files.\n- \nThe web UI's javascript has been modernised, replacing all the vendored libraries (jQuery, Bootstrap's scripts, Flot and others) \n with standard browser features: autocomplete suggestions use a native`<datalist>` ,\n the button beside the date field opens the browser's own date picker (typed smart dates like \"today\" still work),\n and the add and help dialogs use the native`<dialog>` element. Pages load much less javascript.\n (Arthur Cinader,[#2702](https://github.com/hledgerorg/hledger/issues/2702) )\n- \nThe `-?` and`--webman` flags are added (see the hledger changelog).\n- \nhledger-web now requires wai-app-static >=3.1.9 and yesod-form >=1.4.12, and no longer depends on lucid ( [#2737](https://github.com/hledgerorg/hledger/issues/2737) ).\n megaparsec 9.8.0 is excluded, to avoid a position marker bug in error messages\n ([megaparsec#572](https://github.com/mrkkrp/megaparsec/issues/572) ).\n\n#### Docs\n\n- The manual has new WEB UI, REPORTS, URL PARAMETERS and LANGUAGE sections, an updated JSON API section,\n and says`--allow=edit` /`--allow=add` instead of the old \"capability\" terms.\n\n### project changes 2.0\n\nAll general project changes since hledger 1.52.4.\n\nFor the 1.99.x preview releases, and 2.0's changes since the last of them (1.99.6),\n\nsee [https://hledger.org/relnotes199.html](https://hledger.org/relnotes199.html).\n\nFor package-specific changes, see the hledger package changelogs.\n\n- The hledger repo has moved to the hledgerorg github organisation: [https://github.com/hledgerorg/hledger](https://github.com/hledgerorg/hledger) . Old links redirect.\n The main branch is now`main` .\n ([#2681](https://github.com/hledgerorg/hledger/issues/2681) )\n\n#### AI usage\n\n- hledger 2 is developed with careful AI assistance: all changes are steered, reviewed and tested by Simon or a contributor.\n (If you want software built without any help from AI tools, choose hledger 1.x.)\n [https://hledger.org/AI.html](https://hledger.org/AI.html) is our AI policy and FAQ, with the rationale and usage reports.\n Commits disclose their AI usage, which is journalled in doc/ai/ (`just ai ...` shows reports).\nFirst-time contributors' pull requests may not use AI tools. Security fixes for hledger 1 may be backported from AI-assisted fixes, at the maintainer's discretion.\n\n#### Docs\n\n- New docs:\n AI (policy and FAQ),\n IMPACT (the project's external impacts),\n RULES (repo policies, old and new, in one place),\n STYLE (rules for changes to hledger-web's appearance),\n TRANSLATING (a guide for translators, and tooling details for developers; Arthur Cinader),\nUpgrading to hledger 2, Start tracking lots, Charts (on the website)\n- New specs and notes:\n SPEC-assert, SPEC-balance-change-queries, SPEC-charts, SPEC-finalising, SPEC-holdings, SPEC-lots\n (with a tested comparison of lot handling in Ledger, Beancount and hledger), SPEC-print, SPEC-special-postings;\nNOTE-performance; PLAN-gain-terms, PLAN-release-2.0\n- BENCHMARKS is renamed to PERFORMANCE and rewritten for both users and developers, with performance tips and detailed stats for hledger and other PTA apps\n- CHANGELOGS is retired, superseded by RELEASING and the changelogs skill\n- CODE: added module maps, reading order, conventions and debug output; queries vs report options; report periods, intervals and date spans\n- CONTRIBUTING, DEVFAQ, DEVWORKFLOWS, TESTS and other dev docs: a developer quick start; updated for current tools, scripts and test suites;\n general cleanup and consolidation; \"last updated\" lines added to docs more than a year old\n ([#2528](https://github.com/hledgerorg/hledger/issues/2528) )\n- CREDITS, DECISIONS, FINANCE, FUNDING, ISSUES, README: updates\n- Install: added Building outside the source tree; the release notes' binary install instructions are fixed and simplified\n ([#2707](https://github.com/hledgerorg/hledger/issues/2707) )\n- PULLREQUESTS and the pull request template: many edits, linking to the AI policy\n- REGRESSIONS, FINANCE: the regression bounties are discontinued\n- RELEASING: consolidated into a single release script, grouped into phases, and revised after each release\n- The Ledger and Beancount pages are updated\n\n#### Website\n\n- hledger.org uses the latest mdbook; pages' tables of contents are in the sidebar;\nand the hledger manual's sidebar sections are properly indented, with 10 top level entries instead of 48.\n\n#### Tools/infrastructure\n\n- AI skills: changelogs, release, credits, translations, binary-badges and regen-shelltests skills help AI assistants with those tasks;\nthe pcc skill runs hledger's pre-commit checks\n- ai: `just ai ...` recipes report AI usage from Claude Code sessions, commit messages' \"AI usage:\" lines, and the doc/ai journal\n- benchmarking: scripts moved into bench/, updated; `just perftest` ; generatejournal has --start and --days, for sparse and dense journals (Arthur Cinader)\n- build: git changes now recompile only the GitInfo module (7.8s -> 4.8s for hledger); stack-prof.yaml is a profiling build config;\nstack configs use recent nightly snapshots, with GHC 9.14 the default; an experimental hx build tool config\n- changelogs: `just changelogs` pre-cleans its drafts (routine commits dropped, AI usage lines stripped, breaking changes lifted to the top,\n possible duplicates flagged), and finds its resume point even after a rebase;`just changelogs-check` verifies resume points, issue links and leftover draft markers;\nchangelog section headings are simplified\n- chartsdemo: `just chartsdemo` ,`chartsdemo-html` ,`chartsdemo-page` and`chartsdemo-images` show or save a representative set of charts,\nfrom examples/hbcexample.journal\n- checkanchors (`just anchortest` ): checks that #anchor links in the manual sources point to existing headings\n- CI: third-party actions and runner images updated; the addon functional tests run again (they had been accidentally excluded since 2017);\nhledger-web's browser tests run on pull requests, as a non-blocking check; an experimental mac workflow uses the hx build tool\n- errors tests: converted to shelltest v3 format, with more examples\n- functest: tests are isolated from the user's home directory; sorting uses LC_COLLATE=C, as in CI; more threads are used\n- generaloptionshelp, installpage: `just` recipes automating the manuals' general options help and the Install page's version bumps\n- hledger-web: an on-demand Playwright browser test suite (`just browsertest` ); the favicon's sources and generator script; the systemd service file is updated (Patrick van de Glind)\n- i18n: i18n-extract.py collects translatable strings into hledger-lib/locale/hledger.pot, and checks catalogs for stale and untranslated entries;\n `just i18n-pot` ,`i18n-check` ,`i18n-merge` ,`i18n-pseudo` ,`i18n-web LANG` (Arthur Cinader, Simon Michael)\n- Justfile: recipes recompile ./Shake when needed, avoiding stale scripts; `just holdings-*` recipes try the holdings command against example data;\n `just devver` (formerly`devtag-push` );`just hackagerevise` ;`just site-update`\n- release automation: `just ghrel` assembles the github release on github, as a draft, and`just ghrel-publish` makes it public after review;\nANNOUNCE has sized versions for Mastodon and Bluesky/X\n- tools/regen-shelltests.py regenerates expected output in functional tests after a deliberate output change\n\n### credits 2.0\n\nSimon Michael,\n\nArthur Cinader,\n\nHenning Thielemann,\n\nDmitry Astapov,\n\nKevin F. Konrad,\n\nChunhui Ouyang,\n\nJuan Wajnerman,\n\nMartin,\n\nAdam Sardo,\n\nAidenTHu,\n\nAndreas Pauley,\n\nCaleb Maclennan,\n\nDaniil Iaitskov,\n\nDiego Depaoli,\n\nGuillaumedeVolpiano,\n\nJoeJoeflyn,\n\nJoshua Chapman,\n\nJuliano Solanho,\n\nPatrick van de Glind,\n\nRostislav Raykov.\n\nThe amount expressions work was a bounty funded by James Shubin.\n\n## \n## Install\n\nThe [hledger Install page](https://hledger.org/install) lists the easiest ways to install a recent release,\n\nsuch as `brew` on macos, `choco`/` scoop`/` winget` on Windows, or `eget` on all platforms.\n\nOr, follow these instructions to install the specific release binaries below:\n\n### GNU/Linux, 64-bit Intel\n\nAt the command line:\n\n```\ncurl -fL https://github.com/hledgerorg/hledger/releases/download/2.0/hledger-linux-x64.tar.gz | tar -xzv -f- -C/usr/local/bin hledger hledger-ui hledger-web\nhledger --version; hledger-ui --version; hledger-web --version    # should show 2.0\n```\n\nPrefix `tar` with `sudo` if `/usr/local/bin` is not writable.\n\n### Mac, 64-bit ARM or Intel\n\nOpen a terminal window.\n\n(Don't download these binaries with your web browser - they won't get authorised.)\n\nOn ARM macs:\n\n```\nsudo mkdir -p /usr/local/bin\ncurl -fL https://github.com/hledgerorg/hledger/releases/download/2.0/hledger-mac-arm64.tar.gz | sudo tar -xzv -f- -C/usr/local/bin hledger hledger-ui hledger-web\nhledger --version; hledger-ui --version; hledger-web --version    # should show 2.0\n```\n\nOn Intel macs:\n\n```\nsudo mkdir -p /usr/local/bin\ncurl -fL https://github.com/hledgerorg/hledger/releases/download/2.0/hledger-mac-x64.tar.gz | sudo tar -xzv -f- -C/usr/local/bin hledger hledger-ui hledger-web\nhledger --version; hledger-ui --version; hledger-web --version    # should show 2.0\n```\n\nIf the version check shows an older version, you have another hledger earlier in `$PATH`; `which -a hledger` will find it.\n\n### Windows, 64-bit ARM or Intel\n\nIn a powershell window (press `WINDOWS-R`, `powershell`, `ENTER`).\n\n(Don't download the zip with your web browser - programs downloaded that way may be blocked when you run them.)\n\n```\ncd ~\ncurl.exe -fLO https://github.com/hledgerorg/hledger/releases/download/2.0/hledger-windows-x64.zip\nExpand-Archive hledger-windows-x64.zip -Force -DestinationPath \"$env:LOCALAPPDATA\\Programs\\hledger\"\n```\n\n`$env:LOCALAPPDATA\\Programs\\hledger` (ie `C:\\Users\\YOURNAME\\AppData\\Local\\Programs\\hledger`) is not in `$env:Path` by default,\n\nso if `$env:Path` doesn't show it, add it once:\n\n```\n[Environment]::SetEnvironmentVariable('Path', \"$env:LOCALAPPDATA\\Programs\\hledger;\" + [Environment]::GetEnvironmentVariable('Path','User'), 'User')\n$env:Path = \"$env:LOCALAPPDATA\\Programs\\hledger;$env:Path\"    # for this window; new windows will pick it up automatically\n```\n\nThen:\n\n```\nhledger --version; hledger-ui --version; hledger-web --version    # should show 2.0\n```\n\nIf the version check shows an older version, you have another hledger earlier in `$env:Path`; `where.exe hledger` will find it.\n\nThese are 64-bit Intel binaries; they also run on ARM machines (emulated).\n\nThey may also work on Windows 7:\n\nuse Windows Explorer to extract `hledger-windows-x64.zip` into a folder of your choice,\n\nthen open a command window (`WINDOWS-R`, `cmd`, `ENTER`) and run the hledger programs.\n\n### Next steps\n\nOnce installed, run `hledger`, and see the [Docs](https://hledger.org/doc.html).", "url": "https://wpnews.pro/news/hledger-v2-0", "canonical_source": "https://github.com/hledgerorg/hledger/releases/tag/2.0", "published_at": "2026-12-02 02:36:32+00:00", "updated_at": "2026-12-02 02:45:22.526578+00:00", "lang": "en", "topics": ["developer-tools"], "entities": ["hledger", "hledger-web", "hledger-ui", "Ledger"], "also_reported_by": [], "takeaway": "hledger 2.0 is 2-3x faster than 1.52 with up to a third less memory, but upgraders must move any command selected by a bare first word in config files to the command line, since that word is now read as a query argument.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/hledger-v2-0", "markdown": "https://wpnews.pro/news/hledger-v2-0.md", "text": "https://wpnews.pro/news/hledger-v2-0.txt", "jsonld": "https://wpnews.pro/news/hledger-v2-0.jsonld"}}