Finfry
Finfry is a small command-line budget & expense tracker built on the Jargon
CLI shard. This file is the library entry point; the executable lives in
src/cli.cr. See finfry --help for available commands.
Constants
How finfry reacts to a posting naming an account that isn't yet "known" (declared in the chart or already used by a posting).
Default account money is paid from / received into when not specified.
Starter chart seeded into a brand-new ledger so strict mode is usable
immediately. Existing ledgers are unaffected — Database.from_json falls
back to the empty property default, and their known accounts come from the
postings already recorded.
Class methods
Build a balance sheet from raw account balances (account => signed cents).
True if account is prefix itself or a descendant of it. Accounts are
hierarchical, colon-separated ("Expenses:Food:Coffee"), so a prefix match
must respect the ":" boundary — "Expenses:Foodie" is not under "Expenses:Food".
Build the balanced posting pair for a kind of transaction. account is the
categorization account (Expenses/Income, or the destination of a transfer);
counter is the money account (the asset/liability paid from or received
into, or the source of a transfer). Both the CLI commands and the AI entry
path funnel through here so balance is always assembled the same way.
Reduce a set of transactions to current recurring commitments. Each recurring stream is identified by its description (or, if blank, its income/expense accounts), and only the most recent occurrence in a stream counts — so recording Netflix every month yields one Netflix commitment, not twelve.