Directive
A directive is a non-transaction command in a Ledger file that controls how the file is interpreted. Directives include:
account— declares an account name (optional in Ledger, unlike Beancount where it’s required)commodity— declares a commodity and its display formatinclude— includes another Ledger file, enabling modular file organizationalias— creates a shorthand for an account nametag— declares metadata tagsyear/Y— sets a default year for date parsing
Directives don’t represent financial data — they configure the parser and provide metadata. Ledger is permissive about directives; most are optional and exist to add structure or catch typos through strict mode (--strict or --pedantic flags).