Documentation
Installation
Hforecast is a Haskell program built with Stack. It produces
hledger journals, and the queries throughout these docs use the hledger CLI —
so you’ll want both.
Prerequisites
- Stack — the Haskell build tool. Install it from haskellstack.org (or via your package manager). Stack fetches the right GHC compiler automatically on first build.
- hledger (recommended) — to query the output. Install from hledger.org/install. Hforecast writes a standard journal, so any recent hledger works.
Build
From the repository root:
stack build
The first build compiles all dependencies and can take a while; later builds are incremental. The
executable lands under .stack-work/; run it through Stack with:
stack exec hforecast -- -c examples/casual.yaml -o hforecast.journal
Install onto your PATH
To put a hforecast binary on your PATH (Stack installs to ~/.local/bin by default — make sure it’s
on your PATH):
stack install
Then run it directly:
hforecast -c examples/casual.yaml -o hforecast.journal
Install the tax data
Tax brackets are read at run time from your config directory, not compiled in. Install the bundled files and download the all-states dataset with:
make install-taxes
This copies the bracket YAMLs from examples/taxes/ and downloads the state income-tax dataset (from
LevyIO, CC BY 4.0) into:
${XDG_CONFIG_HOME:-~/.config}/hforecast/taxes/
where hforecast auto-discovers them. Pass ARGS=--force to overwrite existing files. You can skip this
entirely if you only use a flat effectiveRate, or point at bracket files by path in your config. See
Taxes for the details.
Verify
hforecast -c examples/minimal.yaml
You should see a small hledger journal on stdout. If instead you get a Config error: or a non-zero
exit, the message on stderr says what went wrong. Next, follow the quickstart.
See also
- Quickstart — your first real config
- Command-line reference — every command-line flag
- Taxes — installing and configuring tax data