Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
478 lines (432 sloc) 19.2 KB

Download

<style> table#downloads > tbody > tr { border-bottom:thin solid #ddd; } table#downloads > tbody > tr > td { padding-top:0.5em; padding-bottom:0.5em; } table#downloads > tbody > tr > td:nth-child(2) { padding-top:1.5em; } div.section > table td:first-child { padding-right:1em; } div.platform { margin-top:1em; font-size:big; font-weight:bold; white-space:nowrap; } div.distro { margin-right:1em; } div.command { font-weight:bold; white-space:nowrap; margin-bottom:1em; } div.builder { border-top:thin solid #ddd; padding-top:0.5em; font-size:big; font-weight:bold; white-space:nowrap; margin-top:1em; } div.builder-text { margin-top:1em; } div.builder-command { margin:1em 0.5em 1em; font-weight:bold; white-space:nowrap; } div.notes { font-size:small; font-style:italic; } div.badges { font-size:small; font-style:italic; } .warnings > a:before { content: " ⚠ "; color:red; } </style>

Here are some ways to install hledger. Binary packages will install quickly, or you can run our install script, or build with stack/cabal. Please do report any trouble. The current hledger release is: 1.15.2 (release notes).

Binary packages

Multiplatform
Linux, Mac
Nix
nix-env -f https://github.com/NixOS/nixpkgs/archive/4179ba0.tar.gz -iA hledger hledger-web hledger-ui
On Linux, note #1030, #1033
Linux, Mac, Windows
docker pull dastapov/hledger
Linux, Mac, Windows
Homebrew
brew install hledger
Linux, Mac, FreeBSD
Install Wine and use the Windows binary
Windows
Appveyor builds
Windows release Windows nightly
GNU/Linux
Arch
Arch
pacman -S hledger hledger-ui hledger-web
Gentoo
Gentoo
sudo layman -a haskell && sudo emerge hledger hledger-ui hledger-web
Void
Void Linux x86_64
xbps-install -S hledger hledger-ui hledger-web
Debian
sudo apt install hledger hledger-ui hledger-web
Fedora
sudo dnf install hledger
Ubuntu
sudo apt install hledger hledger-ui hledger-web
BSD
make -C /usr/ports/openbsd-wip/productivity/hledger install
Cloud
Sandstorm

Building from source

You can build hledger wherever the Glasgow Haskell Compiler is supported. This can take a while, but it's normally a reliable process. Use one of the tools below to build the current hledger release. On Windows, hledger-ui is not available and should be omitted from the commands below (except in WSL).

Linux, Mac, WSL
installs
The hledger-install script requires only bash. It's good practice to inspect the script and satisfy yourself that it's safe before running it. It runs stack or cabal for you, installing stack if needed. It installs the main hledger tools plus some addons (hledger-iadd, hledger-interest).
Linux, Mac, Windows
installs
The latest version of stack (2.1.3 as of 2019-07) will likely work best, so we recommend it. If you have an older version, you can usually upgrade quickly with stack upgrade. Versions older than 1.7.1 will not work. On Windows, the 64-bit version of stack is recommended.
stack update
stack install --resolver=lts-14.3 hledger-lib-1.15.2 hledger-1.15.2 hledger-web-1.15 hledger-ui-1.15 --silent
Linux, Mac, Windows
installs
cabal v2-update
cabal v2-install hledger-1.15.2 hledger-web-1.15 hledger-ui-1.15

Build tips

Building the development version

The master branch in hledger's github repo is suitable for daily use, and includes the latest improvements. You'll need git and stack or cabal. This will build and install all of the main hledger tools using stack:

git clone https://github.com/simonmichael/hledger
cd hledger
stack install

cabal users may find the cabal-install.sh or cabal.project files useful.

Development builds of hledger show a .99 suffix in their --version output, meaning "dev". So 1.15.99 means "1.16-dev", the in-development version of 1.16.

Building the development version with Docker

You can also build the development version in a Docker container which will take care of pulling all the necessary tools and dependencies:

git clone https://github.com/simonmichael/hledger
cd hledger/docker
./build.sh

This will build the image tagged hledger with just the latest binaries inside.

If you want to keep all the build artifacts and use the resulting image for hledger development, run ./build-dev.sh instead.

Check your PATH

After building/installing, you may see a message about where the executables were installed. Eg:

  • with stack: $HOME/.local/bin (on Windows, %APPDATA%\local\bin)
  • with cabal: $HOME/.cabal/bin (on Windows, %APPDATA%\cabal\bin)
  • with nix: $HOME/.nix-profile/bin

Make sure that this install directory is included in your shell's $PATH (preferably near the start, to preempt any old hledger binaries you might have lying around), so that you can run the hledger tools easily. How to configure this depends on your platform and shell. If you are using bash, this will show it:

echo $PATH

and here's a way to add the stack and cabal install dirs permanently:

echo "export PATH=~/.local/bin:~/.cabal/bin:$PATH" >> ~/.bashrc
source ~/.bashrc

Test your installation

After a successful installation, you should be able to run the hledger tools (that you installed), and see the expected versions. Eg:

$ hledger --version
hledger 1.15.2
$ hledger-ui --version
hledger-ui 1.15
$ hledger web --version
hledger-web 1.15
$ hledger iadd --version
This is hledger-iadd version 1.3.9

And you could see the unit tests pass (just for fun):

$ hledger test
...
199 tests passed, no failures!

Nicely done. Next, see the Getting Started docs in the sidebar, such as the Basics tutorial, or introduce yourself in the IRC channel/Matrix room.


You can’t perform that action at this time.