class

Finfry::App

Inherits Reference < Object

Wires the Jargon-defined CLI to the Store and renders output. Every entry path (manual commands now, the AI layer later) funnels through commit and render, so the ledger logic lives here rather than in the CLI handlers.

Constants

SHORT_OVER_ACCOUNT = "Expenses:ShortsAndOverages"

Finalize: every staged-cleared transaction is locked into the committed tier, but only if the cleared balance matches the statement — so you can't reconcile to a wrong number. Requires -s. Where --adjust books a small unexplained reconciliation residual — the classic "cash over and short" account. Big or explainable differences should be entered manually to their real accounts instead.

Constructors

new(store : Store = Store.new, out __arg0 : IO = STDOUT, interactive : Bool = true)
Source

Class methods

merge_mcp_config(existing : String | Nil, book : String) : String

Merge a finfry MCP server (pinned to book via FINFRY_DATA) into an existing .mcp.json document (or a fresh one), preserving any other servers.

Source

Instance methods

agent_tools

The agent's tools as Claude tool definitions (built from the specs).

Source
commit(date : String, description : String, postings : Array(Posting), recurrence : String | Nil = nil) : Transaction

Validate, persist, and echo a transaction. The single commit path.

Source
execute_tool(name : String, arguments : JSON::Any) : Tuple(String, Bool)

Execute one agent tool directly (no plan deferral) and return its captured output plus whether it errored. Used by the MCP server, where the client harness owns approval. Both reads and writes execute immediately; each write records its own undoable changeset via commit.

Source
render(txn : Transaction) : String

Human-readable rendering of a transaction's postings.

Source
run(argv : Array(String)) : Nil
Source

Nested types