Post

Counterpoise Public Release

An open-source personal finance app built for the AI-coding era

Counterpoise
Double-entry accounting
for personal finance

Earlier this year, I posted about using AI coding agents to build personal software. Over the last six months, I’ve continued to develop my personal finance app and use it every day. Just as I had planned when creating the app, I have written no code. I rely exclusively on Claude Code and Codex to make changes.

What’s evolved from this approach is a fascinating new species of software application: an AI-native, highly extensible codebase designed specifically for rapid customization. While I built Counterpoise solely for my own personal finance needs, I’ve realized it is also a strong foundation for anyone’s personal finance app. With a coding agent, you can shape the app to fit your own finances, just as I have.

So, I’ve decided to release a public version of Counterpoise that’s free to fork and modify. I plan to keep the public repo up to date with my private version, giving those who fork it the option of integrating any new changes if they find them valuable.

Getting started is straightforward. To test out the process, I provided Codex with the following prompt from within a fresh Ubuntu container, and the app was running with sample data in just a few minutes:

checkout this repo https://github.com/jeffjjohnston/counterpoise-ledger and bring it up in dev mode (no docker). install needed dependencies.

That’s it! If you are interested in personal finance software that is 100% yours to modify, give it a try and tailor it to your needs. And if you have any questions about how it works or its features, just ask your coding agent!

Naturally, I asked Claude to pick out Counterpoise’s major features. Here’s what it chose:

  1. Real double-entry bookkeeping, not a budget tracker. Every transaction is a set of balanced splits that must sum to zero — enforced in the data layer, not just the UI. Five account types with proper normal-balance signs, parent/child account hierarchies, and two entry modes: a Simple mode for everyday two-account transfers, and a full Journal Entry mode with explicit debits and credits when you need it. The balance sheet and income statement fall out of the ledger, so they are always correct by construction.

  2. Investment tracking with real FIFO lot accounting. This is the feature most personal finance apps skip. Counterpoise tracks buys, sells, dividends, capital gains, fees, and stock splits, and maintains per-lot cost basis with FIFO matching. That gives you a genuine realized gains report — per lot disposed of, split into short-term and long-term. Positions carry live market value from automatic end-of-day price sync (Tiingo, Tue–Sat after each market day), with manual price entry for anything without a feed, such as options.

  3. Bank sync that learns your matching. Connect accounts through Plaid, and imported transactions are staged in a reconciliation queue instead of being dumped into your ledger. Auto-matching builds a learned map from the merchant names you have matched before, and quietly clears the ones it is confident about — matching on amount, payee, account, and a date window that tolerates the gap between authorization and settlement. What is left is a short review queue, not a full inbox. Plaid edits and deletions are flagged for review rather than silently applied.

  4. Recurring transactions and forward visibility. Rules for anything on a schedule — daily through yearly, with custom intervals such as every two weeks — including multi-split paychecks. Upcoming occurrences are projected directly into your register alongside real transactions, so the account view shows where the balance is going, not just where it has been. Rules can auto-create a set number of days early, and can shift weekend occurrences to the following business day.

  5. Your AI assistant can actually use your books (MCP). Counterpoise ships a Model Context Protocol server with 23 tools, so Claude or any MCP client can query and write your ledger: list and search transactions, pull an income statement or realized gains, read investment positions, and create or update accounts, payees, transactions, and securities. Access is through per-user API keys you generate and revoke yourself, hashed at rest. Ask “what did I spend on restaurants last quarter?” and get an answer computed from your real books.

  6. Self-hosted, multi-book, and yours. It runs on your own hardware: Docker Compose, PostgreSQL, one command up. Keep separate books for personal and business finances under a single login, fully isolated. Nothing leaves your machine except the API calls you configure. And Add demo book fills a fresh book in one click with three years of sample transactions, investment lots, recurring rules, and a waiting bank-sync queue — so anyone can see the whole app working before entering a single real number.

Enjoy!

GitHub: https://github.com/jeffjjohnston/counterpoise-ledger

This post is licensed under CC BY 4.0 by the author.