What is acct?

acct is a simple command-line money management program for Linux/Unix. It has the following features:

  • Uses a simple text file format
  • Handles multiple different accounts
  • Makes account reconciliation easy
  • Create graphs (gnuplot required)

Download source code


How do I use acct?

Creating accounts

First, determine which accounts you want to keep track of with acct. For example, you might want to track savings, checking, credit card, and loans. Initial account balances should have the description "INITIAL" to prevent acct from interpreting the transaction as being new income.

$ mkdir ~/.acct

$ acct add savings 20050301 1000.00 "INITIAL"
Showing the newest 25 transactions.

   Date    |    Balance |     Amount | Description
2005/03/01 |   1,000.00 |   1,000.00 | INITIAL

$ acct add checking 20050301 500.00 "INITIAL"
Showing the newest 25 transactions.

   Date    |    Balance |     Amount | Description
2005/03/01 |     500.00 |     500.00 | INITIAL

$ acct add credit 20050301 -75.30 "INITIAL"
Showing the newest 25 transactions.

   Date    |    Balance |     Amount | Description
2005/03/01 |     -75.30 |     -75.30 | INITIAL

$ acct add loan 20050301 -5000.00 "INITIAL"
Showing the newest 25 transactions.

   Date    |    Balance |     Amount | Description
2005/03/01 |  -5,000.00 |  -5,000.00 | INITIAL

Note that 20050301 is a date in yyyymmdd format and corresponds to March 1 2005. Change the date if you want to set the initial balance on a different date. Acct also understands the strings today, yesterday, and tomorrow.

You can verify that these accounts are recognized by acct by running "acct":

$ acct
   Future  |     Now    | Account
    500.00 |     500.00 | checking
    -75.30 |     -75.30 | credit
 -5,000.00 |  -5,000.00 | loan
  1,000.00 |   1,000.00 | savings
===========|============|
 -3,575.30 |  -3,575.30 | TOTAL

Adding/subtracting money to/from the accounts

You can use the "acct add ..." command to add and remove money from your accounts and the "acct transfer ..." command to transfer money between accounts. Several examples are below:

$ acct add savings 20050305 1200.00 "paycheck"
Showing the newest 25 transactions.

   Date    |    Balance |     Amount | Description
2005/03/01 |   1,000.00 |   1,000.00 | INITIAL
2005/03/05 |   2,200.00 |   1,200.00 | paycheck

$ acct transfer checking credit 20050315 75.30
   Future  |     Now    | Account
    424.70 |     424.70 | checking
      0.00 |       0.00 | credit
 -5,000.00 |  -5,000.00 | loan
  2,200.00 |   2,200.00 | savings
===========|============|
 -2,375.30 |  -2,375.30 | TOTAL

$ acct add checking 20050316 -26.42 "pay power bill"
Showing the newest 25 transactions.

   Date    |    Balance |     Amount | Description
2005/03/01 |     500.00 |     500.00 | INITIAL
2005/03/15 |     424.70 |     -75.30 | TRANSFER(checking->credit)
2005/03/16 |     398.28 |     -26.42 | pay power bill

Viewing history

You can view all transactions that occured in some particular accounts with the "list" argument. For example, if you wish to list transactions in your checking and savings accounts, run "acct list checking savings". If you want to list transactions in all accounts, run "acct list". The "list" argument only lists recent transactions. To print the entire history of one or more accounts, use "listall".

$ acct list
Showing the newest 25 transactions.

   Date    |    Balance |     Amount | Description
2005/03/01 |     500.00 |     500.00 | [checking] INITIAL
2005/03/01 |     424.70 |     -75.30 | [credit] INITIAL
2005/03/01 |  -4,575.30 |  -5,000.00 | [loan] INITIAL
2005/03/01 |  -3,575.30 |   1,000.00 | [savings] INITIAL
2005/03/05 |  -2,375.30 |   1,200.00 | [savings] paycheck
2005/03/15 |  -2,450.60 |     -75.30 | [checking] TRANSFER(checking->credit)
2005/03/15 |  -2,375.30 |      75.30 | [credit] TRANSFER(checking->credit)
2005/03/16 |  -2,401.72 |     -26.42 | [checking] pay power bill

$ acct list checking
Showing the newest 25 transactions.

   Date    |    Balance |     Amount | Description
2005/03/01 |     500.00 |     500.00 | INITIAL
2005/03/15 |     424.70 |     -75.30 | TRANSFER(checking->credit)
2005/03/16 |     398.28 |     -26.42 | pay power bill

$ acct list savings checking
Showing the newest 25 transactions.

   Date    |    Balance |     Amount | Description
2005/03/01 |     500.00 |     500.00 | [checking] INITIAL
2005/03/01 |   1,500.00 |   1,000.00 | [savings] INITIAL
2005/03/05 |   2,700.00 |   1,200.00 | [savings] paycheck
2005/03/15 |   2,624.70 |     -75.30 | [checking] TRANSFER(checking->credit)
2005/03/16 |   2,598.28 |     -26.42 | [checking] pay power bill

Editing text files directly

Each account is simply a text file that you can edit manually. If you need to modify a transaction acct already knows about, you can simply edit the appropriate text file. For example:

$ cat ~/.acct/checking
20050301 500.00 INITIAL
20050315 -75.30 TRANSFER(checking->credit)
20050316 -26.42 pay power bill
When editing these files directly, remember:
  • Each line must be a transaction, be empty, or be a comment beginning with '#'.
  • It doesn't matter how the transactions are sorted (acct will always sort them by date when displayed). If you want the files to be sorted, you can manually sort all accounts with the provided acct-sort.sh script.

Reconciling accounts

If we received a statement for the checking account we set up above and it shows a balance of $473.58 (which does not equal the balance in acct), we can ask acct to attempt to determine which of the recent transactions might not have cleared to cause the balance on the statement:

$ acct recon checking 473.58
Considering last 18 transactions.
Working 096%
Showing the newest 25 transactions.

   Date    |    Balance |     Amount | Description
2005/03/01 |     500.00 |     500.00 | INITIAL
2005/03/15 |NOT CLEARED |     -75.30 | TRANSFER(checking->credit)
2005/03/16 |     473.58 |     -26.42 | pay power bill

Graphs

If you have gnuplot installed on your system, you can generate graphs for any particular set of accounts. "acct plot checking savings | gnuplot" will create a plot of your checking and savings accounts over time (and their sum over time). "acct plot | gnuplot" will create a plot of all accounts and their sum.

Rate information

After you have used acct for an extended period of time, you can see your monthly income/expenditures by using the "rate" argument:

$ acct rate
   Date    |     In     |     Out    |     Net    |   Rate/day
2005/01/** |       0.00 |       0.00 |       0.00 |       0.00 (31 days)
2005/02/** |       0.00 |       0.00 |       0.00 |       0.00 (28 days)
2005/03/** |   1,200.00 |     -26.42 |   1,173.58 |      37.85 (31 days)
2005/04/** |       0.00 |       0.00 |       0.00 |       0.00 (30 days)
2005/05/** |       0.00 |       0.00 |       0.00 |       0.00 (31 days)
2005/06/** |       0.00 |       0.00 |       0.00 |       0.00 (30 days)
2005/07/** |       0.00 |       0.00 |       0.00 |       0.00 (31 days)
2005/08/** |       0.00 |       0.00 |       0.00 |       0.00 (31 days)
2005/09/** |       0.00 |       0.00 |       0.00 |       0.00 (30 days)
2005/10/** |       0.00 |       0.00 |       0.00 |       0.00 (31 days)
2005/11/** |       0.00 |       0.00 |       0.00 |       0.00 (30 days)
2005/12/** |       0.00 |       0.00 |       0.00 |       0.00 (31 days)
2005/**/** |   1,200.00 |     -26.42 |   1,173.58 |       3.21 (365 days)

2005/03/01 to 2005/03/16:
           |   1,200.00 |     -26.42 |   1,173.58 |      78.23 (15 days)

Money transfers are NOT included in the amounts listed above.

More information

For more information, run "acct help".