Big 3 | Ledger | hledger | Beancount
Brief (incomplete) syntax overview for Beancount's journal file format. Last tested: 2016. See also: Beancount manual, Cheatsheets
; a comment
2016-01-01 open Assets:Checking
2016-01-01 open Equity:Opening-Balances
2016-01-01 open Expenses:Groceries
2016-01-01 txn "set opening balance"
Assets:Checking 500.00 USD
Equity:Opening-Balances
2016-01-05 txn "farmer's market"
Expenses:Groceries 50 USD
Assets:Checking
All referenced accounts must have an open directive.
; comment
Any unrecognised line is also a comment
DATE txn [["PAYEE"] "DESCRIPTION"]
ACCOUNT AMOUNT
ACCOUNT [AMOUNT]
DESCRIPTION must be in double quotes, can be multiline. No need for two spaces between account and amount.
YYYY-MM-DD
YYYY/MM/DD
YYYY.MM.DD
Only YYYY-MM-DD with 8 digits is officially supported.
TOPACCT[:SUBACCT[:...]]
Income:Salary
Liabilities:CreditCard:CITI-1234
Assets:House
Top level account must be one of Assets, Liabilities, Equity, Income, Expenses. Each subaccount must be capitalised. Letters, digits and hyphen are allowed (no spaces).
QUANTITY COMMODITY
10USD
1000.0001 USD
COMMODITY is all capital letters, on the right, and required . Decimal point is . (period). Digit group separator , (comma) is allowed and ignored.
DATE [txn|FLAG] [["PAYEE"] "DESCRIPTION"]
[FLAG] ACCOUNT AMOUNT [PRICE]
...
[FLAG] ACCOUNT AMOUNT [PRICE]
The txn keyword may be replaced by a FLAG. For just a payee, use
"PAYEE" ""
.
{LOTUNITPRICE[ / LOTDATE]}
and/or one of
@ UNITPRICE
, @@ TOTALPRICE
.
Lot prices are remembered and form distinct commodities, other prices are not. If there is both a lot price and a regular price, the latter records a market price.
DATE balance ACCOUNT AMOUNT
2014-08-09 balance Assets:Cash 562.00 USD
2014-08-09 balance Assets:Cash 210.00 CAD
Asserts the balance in this commodity, in this account, including subaccounts, at the start of this day.
[DATE] KEYWORD ARGS...
[SUBDIRECTIVES]
DATE balance
DATE close
DATE commodity
DATE document
DATE event
DATE note
DATE open
DATE pad
DATE price
DATE txn
include
option
plugin
poptag
pushtag
DATE open ACCOUNT [COMMODITY[,...]] [METHOD]
2014-05-01 open Assets:Cash USD,CAD
Every account posted to needs an open directive with prior date.
DATE close ACCOUNT
DATE commodity COMMODITY
[METADATA]
1867-01-01 commodity CAD
name: "Canadian Dollar"
asset-class: "cash"
Attaches metadata to a commodity.
DATE price COMMODITY AMOUNT
2014-07-09 price USD 1.08 CAD
Also set by transaction prices.
(c) 2016-2024 Simon Michael & contributors |
Send updates via github