Skip to content

mr-karan/ledge

Repository files navigation

Ledge

A native macOS viewer for ledger-cli plain-text accounting files.

Ledge screenshot

Your finances, in a text file

Most finance apps hold your data hostage — behind a login, in a proprietary format, on someone else's server. When they shut down or change their terms, you start over.

Plain-text accounting takes the opposite approach. Your data is a .ledger file that sits on your machine. Open it in any editor. Query it with any tool. Back it up. Put it in git and get a full audit trail of every change you've ever made. The format has existed since 2003 and will be readable decades from now.

A transaction looks like this:

2026/03/15 The Bier Library
    ; Saturday evening with friends
    Expenses:Food:DiningOut  3252.00 INR
    Liabilities:CreditCard:HDFC

A date, a payee, and two postings that balance to zero. That constraint — every transaction must balance — is what makes it real double-entry bookkeeping, not just a list of expenses.

This is the file over app philosophy applied to personal finance. The file is the source of truth. The app is just a lens.

Ledge is that lens.


What it does

Browse your ledger file with a clean, fast, keyboard-driven interface. No writing, no syncing, no cloud.

  • Three-column layout — accounts on the left, transactions in the middle, details on the right
  • Month navigation — step through months with Cmd+[ / Cmd+]
  • Yearly expense reports — category-by-month grid, click any month to see the breakdown
  • Scoped sidebar — account balances update live as you filter by month or search
  • Full-text search — filter by payee, account, or note
  • Indian number formatting — ₹1,23,456 with lakh/crore compact display
  • Light and dark mode — one-click toggle, warm palette

Install

Requires macOS 14+.

git clone ...
xcodegen generate
open Ledge.xcodeproj   # Cmd+R to build and run

Or build without Xcode.app (command line tools only):

SDK=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
swiftc -O -o Ledge -target arm64-apple-macosx14.0 -sdk "$SDK" \
  -framework SwiftUI -framework AppKit \
  $(find Ledge -name '*.swift' | sort)

Usage

  1. Launch Ledge
  2. Cmd+O to open a .ledger, .journal, or .hledger file
  3. Or drag and drop a file onto the window

The app remembers the last opened file across launches.

Keyboard shortcuts

Shortcut Action
Cmd+O Open file
Cmd+R Reload
Cmd+1 Transactions
Cmd+2 Reports
Cmd+[ Previous month
Cmd+] Next month
Cmd+F or / Search

Demo

A demo file is included — 12 months of realistic Indian household expenses across food, housing, transport, and subscriptions.

make validate-demo

What ledger format looks like

2026/01/05 * Zepto
    Expenses:Food:Groceries  2340.00 INR
    Assets:Bank:UPI

2026/01/12 ! Rent
    Expenses:Housing:Rent  35000.00 INR
    Liabilities:CreditCard:HDFC

2026/01/18 Salary
    Income:Salary  -180000.00 INR
    Assets:Bank:Savings

* = cleared, ! = pending, no flag = unmarked. The last posting in a transaction can omit its amount — Ledge fills it in automatically.

Supported:

  • Transaction dates (YYYY/MM/DD or YYYY-MM-DD)
  • Status flags (* cleared, ! pending)
  • Elided postings (auto-balanced)
  • Comments and metadata tags
  • Account declarations

License

MIT

About

Native macOS viewer for ledger-cli plain-text accounting files

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors