Configuration

Pass a TOML file with --config FILE (or BANKRECON_CONFIG). Every key is optional; unknown keys are rejected. examples/bankrecon.toml lists the defaults.

Key Default Meaning
passes all eight, in the order shown in docs/matching.md Which passes run and in what order. Valid names: reference, cheque, amount_date, fuzzy, one_to_many, many_to_one, many_to_many, bank_reversal.
date_window_days 3 +/- days for amount_date and fuzzy.
reference_window_days 45 Maximum date distance for a reference match.
cheque_window_days 90 Days a cheque may take to clear after its book date.
cheque_early_days 3 Days the bank date may precede the book date.
group_window_days 10 Date window for subset-sum and many-to-many groups.
max_group_size 6 Largest group in one-to-many / many-to-one.
max_candidates 25 Candidates kept for a subset-sum search.
max_nodes 200000 Search-node budget per subset-sum search.
many_to_many_max_side 3 Largest group per side in many-to-many.
many_to_many_candidates 12 Candidates per side in many-to-many.
fuzzy_threshold 60 Minimum token-set ratio for a fuzzy candidate.
fuzzy_margin 10 Lead the best candidate needs over the runner-up.
reversal_window_days 10 Maximum distance between a debit and its reversal.
stale_days 90 Age at which an unpresented cheque is flagged stale.
invoice_regex see file Regex with one capture group for the invoice number.

Accounts

[accounts] maps the keys used by classification rules to ledger account names printed in the suggested journal entries: bank, bank_charges, gst_input, interest_income, tds_receivable, receivables, payables, suspense, cash. A rule's debit/credit may be one of these keys or a literal account name.

Classification rules

[[classification.rules]] replaces the default rule list. The first rule that matches wins.

[[classification.rules]]
name = "salary"            # becomes the category
pattern = "SALARY|PAYROLL" # regex searched in the upper-cased narration
sign = "debit"             # debit (money out), credit (money in) or any
debit = "Salaries"
credit = "bank"
memo = "Payroll run paid from the current account"

Bank profiles

A profile is the header names of a statement export and its date format. Header matching ignores case, spaces and punctuation, and the header row is found automatically.

[profiles.axis]
date = "Tran Date"
narration = "Particulars"
debit = "Dr Amount"
credit = "Cr Amount"
reference = "Chq No"      # optional
balance = "Balance"       # optional; gives opening/closing balance for CSV
date_format = "%d-%m-%Y"  # optional; common formats are tried anyway

Use it with bankrecon run --profile axis .... Built-in profiles: hdfc, icici, sbi.