Create a journal
See also: Input and Setting LEDGER_FILE and Starting a journal file in the hledger manual.
There are lots of ways to start and update a journal file:
with touch
The simplest possible journal is just an empty file:
$ touch 2023.journal
The name doesn't matter much and can be changed later.
One file per year is common,
and so is a .journal
or .hledger
extension.
with cat
$ cat >>2023.journal
2023-01-26
expenses:food $10
assets:cash
<CTRL-D>
Account names can be anything
and you can change them later by search and replace.
If you don't know what to choose,
start with these five:
expenses
, income
, assets
, liabilities
, and equity
,
perhaps with one extra subcategory as above.
with a text editor
Write transactions in a text editor, optionally using an editor mode, and save the file.
with hledger add
Use the interactive add command and follow the prompts:
$ hledger add
with hledger-iadd
- ensure $LEDGER_FILE exists
hledger iadd
- enter one or more transactions
with hledger-web
- ensure $LEDGER_FILE exists
hledger web
- wait for web browser to open
- click "add transaction" or press "a"
- enter a transaction, click ok or press enter