Release notes
run & repl commands, non-UTF8 CSV, same-line if matchers, more pivot targets, fixes.
hledger 1.42
Fixes
-
hledger's default options for the
less
pager no longer include --use-color,
which caused older less versions (eg 551) to break. #2335 -
In balance --budget reports, costs no longer prevent display of percentages. #2327
-
In the balance command's HTML output, -H/--historical now suppresses the total heading.
-
print --help now shows the correct default for --round. #2318
-
close --infer-costs no longer implies the -x/--explicit flag. #1826
-
add: Account names provided on the command line are no longer ignored. #2305
-
bs/bse/cf/is no longer show the unsupported --budget option in their help. #2302
-
The print command now ignores --depth entirely. Previously, a depth
limit caused it to show only transactions referencing accounts as
deep or deeper than that. -
Week periods beginning in the previous year are now shown correctly.
Eg the week beginning 2024-12-30 (which is week 1 of 2025 because the
thursday falls in 2025) was previously shown as 2024-W01, and is now shown as 2025-W01.
#2304
Features
-
run
andrepl
are new commands which run multiple commands
without re-parsing data files, so they run faster.
run
runs a sequence of commands from files or command line arguments,
andrepl
provides an interactive prompt with readline-style history.
(Dmitry Astapov, Simon Michael, #2323, #2328) -
commands
is a new explicit command for showing the commands list; it's useful in the REPL.
With --builtin, it shows only the builtin commands. -
hledger can now read CSV/SSV/TSV data in encodings other than UTF8,
using the newencoding
CSV rule. (Joschua Kesper, #2319) -
if
matchers in CSV rules can now be combined on the same line,
separated by&&
(AND) or&& !
(AND NOT). This makesif
tables more expressive.
Examples:if %description amazon && %date 2025-02-22 account2 expenses:books if,account2 %description amazon && %date 2025-02-22, expenses:books
The next-line
&
operator also may now be written as&&
, for consistency.
(Thomas Miedema, #2333)
Improvements
-
Terminal width is now detected more robustly, using the POSIX API.
This means that register commands will more reliably use the proper terminal width,
eg when $TERM or $COLUMNS do not have a correct value, and on Windows.
hledger no longer uses $COLUMNS.
(gesh, #2332, #2340) -
Error messages (first line) in the terminal are now shown in red (and bold),
and warning messages are shown in yellow,
when ANSI codes are supported and permitted. -
--pivot can now also pivot on amount quantity (
amt
),
amount cost (cost
), and/or commodity symbol (comm
orcur
). -
The close command's --migrate flag has been renamed to
--clopen
.
The start: tag has been renamed toclopen:
,
and its default value now excludes the new file's extension.
And close --assign's tag has been renamed toassign:
. -
The print command now supports the --invert flag. #2314
-
The roi command is now faster:
it no longer checks every day with P directive,
and the "one period per report interval" case has been optimised.
(Dmitry Astapov) -
Two more file extensions are now recognised as possible hledger addon
commands:.osh
and.ysh
.
Docs
- aregister: Drop an inconsistent newline from options help.
- balance: improve --layout option help.
- close: doc rewrites
- shell completions: mention zsh; cleanups
- cost/lot notations: clarify
- cost, value reporting: edits
- Directive effects: fix account types link #126
- commodity styles: fix typo [hledger_site#123]
- commodity directive: clarify
- close: mention the balance assertions
- pager: mention --pager=no
- Aliases and account types: better troubleshooting command
- Beancount output: mention limitations: P and balance assignments
- Balance report output: drop outdated note about --tree and HTML #1846
Scripts/addons
-
hledger-balance-as-budget properly applies commodity styles now. (Dmitry Astapov)
-
hledger-git now runs pass-through git commands in the right repo.
-
hledger-git now checks for a git repo more robustly. (Lars Kellogg-Stedman)
-
hledger-jj is another easy CLI for keeping hledger files in version control,
using newer tech (jujutsu and oil shell's ysh). -
hledger-script-example.hs has had some cleanup.
hledger-ui 1.42
Fixes
- Startup arguments provided at the CLI are no longer passed to
add
when pressing thea
key. #2313
Improvements
- Allow vty 6.3.
- Allow brick 2.8.
hledger-web 1.42
Fixes
- Fix a test suite build issue: build it with -threaded.
project changes 1.42
Docs
- new/updated: ACHIEVEMENTS, CREDITS, FINANCE, MOCKUPS, REGRESSIONS, RELEASING, Scripts
- examples/csv: pooltool-rewards.csv.rule cleanup
- examples: some sample hledger run scripts
- examples: test files for CSV encoding #2319
Infrastructure/Misc
-
Unix bindists in github releases now include the man pages and info manuals. #2309
-
Unix bindists in github releases are now normal .tar.gz files, without the extra zip compression. [#2299]
-
Release notes and install instructions in github releases are now collapsed by default again.
This makes the sequence of dates and releases clearer.
Github automatically expands the assets of the latest release, so those will be visible by default.
For a full text search of all release notes, use the https://hledger.org/relnotes.html page. -
hledger-install: if installing third party packages fails, it now tries again with bounds relaxed.
This makes hledger-iadd and hledger-interest more likely to install successfully,
even if their bounds have not yet been updated for a new hledger release. -
just functest now fails if there are warnings.
(It does not force recompilation of already compiled modules,
but even so this should help catch more warnings before pushing them to CI.) -
new/changed recipes/tools:
bench*.sh,
changelogs-catchup,
changelogs-finalise,
changelogs-reset,
devtag,
ghrelnotes,
ghrelnotes-publish,
log-headtail,
log-push,
log-save,
modulediag,
modulediags,
modulediags-view,
packagediags,
packagediags-view,
releasediag,
relnotes
relprep -> relbranch,
reltags,
reltags-push,
showrelnotes,
site-manuals-snapshot,
site-watch,
time,
tldr-diff -
gitignore cleanups.
credits 1.42
Simon Michael (@simonmichael),
Dmitry Astapov (@adept),
gesh (@hseg),
Thomas Miedema (@thomie),
Joschua Kesper (@jokesper),
Lars Kellogg-Stedman (@larks).
Install
For all install options, see hledger.org: Install.
You can install hledger from most package managers (but check for a green badge indicating it's up to date).
Or you can build it from source yourself.
Or you can install up to date binaries from this page, by following the appropriate instructions below.
If you find problems with these instructions, please let us know.
All platforms
If you have eget, that's a convenient way to download the right binaries for your machine:
eget simonmichael/hledger --all
Otherwise:
GNU/Linux, 64-bit Intel
At the command line:
cd /usr/local/bin
curl -fLOC- https://github.com/simonmichael/hledger/releases/download/1.42/hledger-linux-x64.tar.gz
tar xzf hledger-linux-x64.tar.gz
cd
hledger --version; hledger-ui --version; hledger-web --version # should show 1.42
Mac, 64-bit ARM or Intel
In a terminal window (don't use your web browser to download, it won't authorise the binaries):
On ARM macs:
cd /usr/local/bin
curl -fLOC- https://github.com/simonmichael/hledger/releases/download/1.42/hledger-mac-arm64.tar.gz
tar xzf hledger-mac-arm64.tar.gz
cd
hledger --version; hledger-ui --version; hledger-web --version # should show 1.42
On Intel macs:
cd /usr/local/bin
curl -fLOC- https://github.com/simonmichael/hledger/releases/download/1.42/hledger-mac-x64.tar.gz
tar xzf hledger-mac-x64.tar.gz
cd
hledger --version; hledger-ui --version; hledger-web --version # should show 1.42
Windows, 64-bit ARM or Intel
In a powershell window (press WINDOWS-R
, powershell
, ENTER
):
-
Make a place to keep installed binaries. You only need to do this once, not for every release:
mkdir -force $HOME\bin >$null $ENV:PATH += ";"+$HOME+"\bin" [Environment]::SetEnvironmentVariable("Path", [Environment]::GetEnvironmentVariable("Path", [EnvironmentVariableTarget]::User)+";"+$HOME+"\bin", [EnvironmentVariableTarget]::User)
-
Download and install the release binaries:
cd $HOME\bin curl https://github.com/simonmichael/hledger/releases/download/1.42/hledger-windows-x64.zip -OutFile hledger-windows-x64.zip Expand-Archive hledger-windows-x64.zip -DestinationPath . -Force cd $HOME hledger --version; hledger-ui --version; hledger-web --version # should show 1.42; if not, check why: where.exe hledger
-
Ensure a default journal file exists, and without a problematic encoding.
This will allow you to start hledger-web by double-clicking on its icon if you wish.out-file -append -encoding ascii $HOME/.hledger.journal
(I'm not sure why "ascii" is needed here - hledger likes utf8 and understands utf8 BOM headers,
but the state of our unicode support on Windows
is really unknown, your feedback is welcome.)
Windows 7, 64-bit Intel
These instructions have not been tested recently, please let us know if they work for you:
- click hledger-windows-x64.zip below
- choose Open with Windows Explorer, OK
- click Extract all files
- choose a destination folder - ideally one that appears in
echo %PATH%
, likeC:\Windows
(though that one will require administrator permission); otherwise, your home directory (C:\Users\YOURNAME
) - check "Show extracted files when complete"
- click Extract, wait for the destination folder to open
- find the hledger, hledger-web icons (if you extracted to
\Windows
, you'll need to scroll down) - for each icon: double-click, uncheck "Always ask before opening this file", click Run
- close those Explorer windows
- open a command window (press Windows-r, type CMD, press enter)
hledger --version; hledger-ui --version; hledger-web --version
should show 1.42echo # >> .hledger.journal
to ensure a default journal file exists. (Important: the doubled >> is needed to avoid overwriting existing data.)
Problems:
- Starting hledger by double-clicking its icon won't work because it needs arguments; run it from the command window instead.
- Starting hledger-web by double-clicking its icon may fail eg because Explorer's command window is too small;
configure that to be larger, or run hledger-web from a command window instead. - hledger or hledger-web may fail to run if there is not enough memory available.
Next steps
Once installed, run hledger
, and perhaps read hledger.org: Quick start.