Skip to content

ratoru/hledger-starter

Repository files navigation

Plain Text Accounting using Hledger

This is my starter template for tracking my finances. It is based on plain text accounting, which has the following advantages and disadvantages.

  • Pros
    • Customization. You can build whatever you want the way you want it.
    • Manual labor gives intimate knowledge of your finances. Although, we try to automate all repetitive tasks away!
    • Privacy.
    • Open Source. Be inspired by other people.
  • Cons
    • You need programming experience.
    • Needs a lot of time to set up.
    • If your financial life is very complicated, it might reach its limits.
    • Less fancy pre-built web UIs. paisa or fava are probably the best ones available.

Before continuing read about full-fledged-ledger, which this repo is based on. It will do a good job of motivating you to get started! In case you would like to learn more about plain text accounting or doubly entry accounting, read Command-line Accounting in Context. Even though the document covers beancount, I really enjoyed reading it.

Setup

  1. Install the necessary CLI tools via brew.
brew bundle
  1. Install Haskell tooling GHCup. I use cabal to build executables.

  2. Download the latest version from puffin if you want a nice TUI.

Usage & Conventions

The most important commands are saved in the justfile. View them using just -l.

  • Create accounts by running just add <institution name>.
    • Downloaded CSV files will be put into ./import/<institution>/in.
    • You will have to write conversion scripts (in2csv and csv2journal) and rule files.
  • Generate all reports by running just generate.
  • Go through uncategorized transactions by running just resolve. This will require fzf, ripgrep, and miller.
  • Launch the TUI (puffin) by running just view.
  • Generate a ROI report for a given asset by running just roi <asset-name> -Y.
  • Journals are split by year. To allow for both all.journal and <year>.journals we need to include opening journals and closing journals. For more info check the guide.

Editor Config

Nvim

  • Install vim-ledger as a plugin.
  • Run :TSInstall ledger to enable nvim-treesitter for hledger.

Useful Guides

Future changes

  • Use Grafana and Prometheus for a dashboard?

About

Plain Text Accounting with Automation

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published