A desktop editor for hledger journal files with syntax highlighting, real-time error checking, and a custom frameless UI.
- Syntax highlighting — dates, account names, amounts, comments, status markers, and directives each get distinct colors
- Real-time error detection:
- Unbalanced transactions (including multi-commodity and cost notation)
- Invalid dates
- Missing postings
- Multiple inferred amounts
- Bad indentation and spacing
- Typo detection — flags accounts used only once that look similar to other accounts, with one-click autocorrect. Accounts declared via
accountdirectives are trusted and never flagged. - hledger directive support — recognizes
account,commodity,P,alias,payee,tag,D,decimal-mark,Y,apply account,comment/end commentblocks, periodic transactions (~), and auto posting rules (=). Declared accounts feed into autocomplete and typo suppression. - Smart account autocomplete — inline ghost-text suggestions based on all accounts across your journal (from transactions,
accountdirectives, periodic rules, and auto postings). Supports prefix and segment matching. - Multi-file
includesupport — automatically resolves and parses included files so suggestions and typo checks span your entire ledger - Cost notation — correctly handles
@(per-unit) and@@(total) cost annotations for balance checking - Virtual postings —
(account)and[account]syntax is recognized; parentheses/brackets are stripped for clean display - Customizable theming & settings — dark/light themes, configurable font sizes, and custom hotkey mapping
- Auto-save & crash recovery — optional background auto-save and continuous crash-safe backups
- Find, replace & go-to-line — draggable, non-modal search panel with regex support and keyboard-driven workflow
- Undo / redo — Ctrl+Z / Ctrl+Y (Ctrl+Shift+Z)
- Drag & drop — drag journal files into the window to open them
- Environment variable support — automatically opens the file pointed to by
LEDGER_FILEon startup - External change detection — notifies you if the file is modified by another program
- Accounts sidebar — all accounts grouped by type with usage counts; click to highlight lines, Ctrl+click to multi-select
- Collapsible problems panel — three display modes (collapsed / peek / expanded)
- Node.js 18 or later
- npm (comes with Node.js)
cd hledgeditor
npm installRun the app in development mode with hot-reload:
npm run devThis starts Vite's dev server and launches Electron once it's ready.
Windows:
npm run build:winOutput goes to release/. The NSIS installer runs on any Windows machine without Node.js.
Current platform (macOS / Linux):
npm run buildOn macOS you get a .dmg, on Linux an .AppImage.
- File > Open (Ctrl+O) — file picker for
.journal,.hledger,.jfiles - Drag and drop — drop files anywhere in the window
- Command line —
hledgeditor myfile.journal(after building) - File association — set
.journalfiles to open with hledgeditor
- Autocomplete — as you type account names, ghost text suggests existing accounts.
Tab/Enter/ArrowRightto accept,ArrowUp/ArrowDownto cycle. - Tab inserts 4 spaces (hledger requires space indentation)
- Errors appear in real-time in the problems panel
- Click any problem to jump to that line
- Typo warnings have a Fix button that renames the account throughout the file
- Ctrl+Z / Ctrl+Y — undo / redo
- Ctrl+F — find (draggable panel; Enter = next, Shift+Enter = previous)
- Ctrl+H — find & replace
- Ctrl+G — go to line
- Ctrl+Home / Ctrl+End — jump to start / end of file
- Ctrl+S — save (or Save As if untitled)
- Ctrl+Shift+S — Save As
- Prompted to save when closing or opening a new file
If another program modifies the file (e.g. hledger add), a banner offers to reload.
The examples/ folder contains ready-to-use journal files for different scenarios:
salaried-worker.journal— office worker: paycheck with tax withholding, mortgage, bills, credit card, savingsfreelancer.journal— multi-client invoicing, business expenses, EUR income, tax reserves, aliasesstudent.journal— student loans, part-time job, roommate splits via Venmo, tight budgetsmall-business.journal— online shop: revenue with platform fees, COGS, inventory, payroll, sales tax, loan paymentsinvestor.journal— stock/crypto portfolio with cost basis (@), dividends, market prices (P), capital gainsdigital-nomad.journal— USD income, THB daily spending, currency exchange, travel categoriesfamily-budget.journal— dual income, joint/personal accounts, childcare, mortgage, periodic budget goals
Open any of these to see how hledger journals work in practice, or copy one as a starting template.
examples/parser-tests/ contains technical test files that exercise every parser feature.
hledgeditor/
├── electron/
│ ├── main.js # Electron main process (windows, menus, file I/O)
│ ├── preload.js # Secure IPC bridge
│ └── settings.js # Settings & defaults management
├── src/
│ ├── index.html # HTML shell
│ ├── main.jsx # React entry point
│ ├── App.jsx # Editor UI component
│ ├── parser.js # Journal parser, highlighter, typo detection
│ └── themes/ # Light and dark color schemes
├── examples/ # Real-life example journals + parser test files
├── build/ # App icon sources
├── scripts/ # Build helper scripts (icon generation)
├── package.json
├── vite.config.js
└── README.md
The editor is a React app running in Electron's renderer process. The journal parser (src/parser.js) runs on every keystroke, producing:
- A list of transactions with their postings, errors, and warnings
- A list of directives (account declarations, commodity definitions, periodic rules, etc.)
- Syntax tokens for highlighting
Declared accounts from account directives and postings from periodic/auto rules feed into autocomplete suggestions and typo detection. The Electron main process handles all file system operations through IPC, keeping the renderer sandboxed.
- This is an editor, not a reporting tool — use hledger's CLI for balance reports, register queries, etc.
- Large files (10,000+ lines) may feel sluggish since parsing runs on every keystroke. For most personal journals this is fine.
- Directive semantics (aliases rewriting accounts,
apply accountprepending prefixes,Dsetting defaults) are recognized for highlighting and autocomplete but not applied to transform data the way hledger itself would.
MIT

