hledger/hledger/hledger_addons.m4.md
Simon Michael 383479d313 doc: update hledger-irr mention
[ci skip]
2018-10-12 09:12:06 -07:00

3.3 KiB
Raw Blame History

ADD-ON COMMANDS

hledger also searches for external add-on commands, and will include these in the commands list. These are programs or scripts in your PATH whose name starts with hledger- and ends with a recognised file extension (currently: no extension, bat,com,exe, hs,lhs,pl,py,rb,rkt,sh).

Add-ons can be invoked like any hledger command, but there are a few things to be aware of. Eg if the hledger-web add-on is installed,

  • hledger -h web shows hledgers help, while hledger web -h shows hledger-webs help.

  • Flags specific to the add-on must have a preceding -- to hide them from hledger. So hledger web --serve --port 9000 will be rejected; you must use hledger web -- --serve --port 9000.

  • You can always run add-ons directly if preferred: hledger-web --serve --port 9000.

Add-ons are a relatively easy way to add local features or experiment with new ideas. They can be written in any language, but haskell scripts have a big advantage: they can use the same hledger (and haskell) library functions that built-in commands do, for command-line options, journal parsing, reporting, etc.

Here are some hledger add-ons available:

Official add-ons

These are maintained and released along with hledger.

api

hledger-api serves hledger data as a JSON web API.

ui

hledger-ui provides an efficient curses-style interface.

web

hledger-web provides a simple web interface.

Third party add-ons

These are maintained separately, and usually updated shortly after a hledger release.

diff

hledger-diff shows differences in an accounts transactions between one journal file and another.

iadd

hledger-iadd is a curses-style, more interactive replacement for the add command.

interest

hledger-interest generates interest transactions for an account according to various schemes.

irr

hledger-irr calculates the internal rate of return of an investment account, but its superseded now by the built-in roi command.

Experimental add-ons

These are available in source form in the hledger repos bin/ directory; installing them is pretty easy. They may be less mature and documented than built-in commands. Reading and tweaking these is a good way to start making your own!

autosync

hledger-autosync is a symbolic link for easily running ledger-autosync, if installed. ledger-autosync does deduplicating conversion of OFX data and some CSV formats, and can also download the data if your bank offers OFX Direct Connect.

chart

hledger-chart.hs is an old pie chart generator, in need of some love.

check

hledger-check.hs checks more powerful account balance assertions.