Let’s say you have a checking account with the following statement for June 2025:
Date | Description | Amount | Balance |
---|---|---|---|
Jun 19, 2025 | McTacos | -$10.00 | $690.00 |
Jun 13, 2025 | THAT ONE JOB DIRECT DEP | $400.00 | $700.00 |
Create a new file named main.augrfinance
. We’ll start by defining USD
as a currency and “opening” a checking account.
currency USD 2
open Assets:Checking 2025-06-01
Now let’s add the two transactions from the bank statement into the main.augrfinance
file.
currency USD 2
open Assets:Checking 2025-06-01
transaction 2025-06-13 [ # Paycheck
[Assets:Checking 400.00 USD]
]
transaction 2025-06-19 [ # Got some fast food
[Assets:Checking -10.00 USD]
]
Making sure you have augr
installed, run augr finance status
and you should be greeted with the following output:
> augr finance status ./main.augrfinance
# Finance.Transaction.Id(0): NonZero; 1 SUM currencies: 400.00 USD
transaction 2025-06-13T00:00:00Z [
[Assets:Checking 400.00 USD]
]
# Finance.Transaction.Id(1): NonZero; 1 SUM currencies: -10.00 USD
transaction 2025-06-19T00:00:00Z [
[Assets:Checking -10.00 USD]
]
0 unassociated OFX transactions
transactions: 2 errors, 2 total
balance assertions: 0 failed, 0 total
delta assertions: 0 failed, 0 total
>
augr finance
tells us that it detected two transaction errors; in this case it is two transactions whose postings don’t sum to zero. This is not allowed in Double-Entry Accounting. To fix that, we’ll open two more accounts and add another posting to each transaction.
--- main0.augrfinance
+++ main1.augrfinance
@@ -1,11 +1,15 @@
currency USD 2
open Assets:Checking 2025-06-01
+open Income:ThatOneJob 2025-06-01
+open Expenses:Food 2025-06-01
transaction 2025-06-13 [ # Paycheck
[Assets:Checking 400.00 USD]
+ [Income:ThatOneJob -400.00 USD]
]
transaction 2025-06-19 [ # Got some fast food
[Assets:Checking -10.00 USD]
+ [Expenses:Food 10.00 USD]
]
augr finance status
will now report that there are no errors.
> augr finance status ./main.augrfinance
0 unassociated OFX transactions
transactions: 0 errors, 2 total
balance assertions: 0 failed, 0 total
delta assertions: 0 failed, 0 total
>
Let’s check our balance.
(By the way, I’m using nushell to get the nice ascii-art table)
> augr finance balance ./main.augrfinance | from tsv
╭───┬───────────────────┬──────────┬─────────┬──────────╮
│ # │ account_name │ subtotal │ total │ currency │
├───┼───────────────────┼──────────┼─────────┼──────────┤
│ 0 │ Assets │ │ 390.00 │ USD │
│ 1 │ Assets:Checking │ 390.00 │ 390.00 │ USD │
│ 2 │ Expenses │ │ 10.00 │ USD │
│ 3 │ Expenses:Food │ 10.00 │ 10.00 │ USD │
│ 4 │ Income │ │ -400.00 │ USD │
│ 5 │ Income:ThatOneJob │ -400.00 │ -400.00 │ USD │
╰───┴───────────────────┴──────────┴─────────┴──────────╯
>
augr finance
is telling me that I have 390.00 USD in my checking account, however I know that’s wrong because my bank is telling me that I have 690.00 USD. To assist you in discovering and tracking down these kind of issues, augr finance
has the assert_balance
directive:
--- main1.augrfinance
+++ main2.augrfinance
@@ -13,3 +13,5 @@
[Assets:Checking -10.00 USD]
[Expenses:Food 10.00 USD]
]
+
+assert_balance 2025-06-20 Assets:Checking 690.00 USD
Running augr finance status
again:
> augr finance status ./main.augrfinance
2025-06-20T00:00:00 Assets:Checking expected 690.00 USD, found 390.00 USD (found - expected = 300.00 USD)
0 unassociated OFX transactions
transactions: 0 errors, 2 total
balance assertions: 1 failed, 1 total
delta assertions: 0 failed, 0 total
Now augr
will let us know that our assertions aren’t matching reality, and we need to go find out where the problem is. In this case I know the problem: there was more money in the account before we started tracking it using augr
. To fix it, we’ll use the simplest solution: add money to the account from a “starting balance” and only track things going forward.
--- main2.augrfinance 2025-06-20 19:28:05.339702580 -0600
+++ main3.augrfinance 2025-06-20 19:54:50.754877438 -0600
@@ -15,3 +15,10 @@
]
assert_balance 2025-06-20 Assets:Checking 690.00 USD
+
+open StartingBalance 2025-06-01
+transaction 2025-06-01 [ # only tracking things since 2025-06-01
+ [Assets:Checking 300.00 USD]
+ [StartingBalance -300.00 USD]
+]
+
Our assertion now passes:
> augr finance status ./main.augrfinance
0 unassociated OFX transactions
transactions: 0 errors, 3 total
balance assertions: 0 failed, 1 total
delta assertions: 0 failed, 0 total
And the balance is correct:
> augr finance balance ./main.augrfinance | from tsv
╭───┬───────────────────┬──────────┬─────────┬──────────╮
│ # │ account_name │ subtotal │ total │ currency │
├───┼───────────────────┼──────────┼─────────┼──────────┤
│ 0 │ Assets │ │ 690.00 │ USD │
│ 1 │ Assets:Checking │ 690.00 │ 690.00 │ USD │
│ 2 │ Expenses │ │ 10.00 │ USD │
│ 3 │ Expenses:Food │ 10.00 │ 10.00 │ USD │
│ 4 │ Income │ │ -400.00 │ USD │
│ 5 │ Income:ThatOneJob │ -400.00 │ -400.00 │ USD │
│ 6 │ StartingBalance │ -300.00 │ -300.00 │ USD │
╰───┴───────────────────┴──────────┴─────────┴──────────╯
From here, check out the reference manual or follow the OFX file tutorial.