GitHub
Settings files

Settings files

Ledgeline keeps its own settings in TOML files, and so does Ledgeline Invoicer. You can edit any of them by hand.

FileWhereWritten byHolds
prefs.tomlLedgeline’s config folderThe hledger path field on the Imports screenhledgerPath, the hledger program Ledgeline runs
ui-prefs.tomlLedgeline’s config folderLedgeline, as you use it, and youYour view settings, for every ledger, and the assistant’s profiles under [ai]
ai-recipes.tomlLedgeline’s config folderThe assistant’s Save as report, and youThe assistant’s saved reports
ledgeline.tomlThe folder of your main journalYou, or Ledgeline when you ask it to keep a setting for one ledger, link a bank account or close the books through a date, or the invoicer when you save its settingsOne ledger’s own view settings, overriding ui-prefs.toml, its bank sync links, its [books] settings, the invoicer’s [invoicer] settings and its [ai] choice of assistant profile

View settings are the choices Ledgeline remembers as you work: the theme and interface scale, which journal columns show, which panels are open, the Review and Find Matches numbers, the benchmark lines on the Stocks chart, and the like.

Ledgeline Invoicer reads and writes the same ui-prefs.toml for the settings it shares with Ledgeline: the theme, the interface scale and the three invoice matching settings. It also keeps a few of its own there, which Ledgeline leaves alone, such as sidebarLibraryOpen: whether its sidebar’s Library is open.

The list of recently opened journals stays in recent.json, in the same config folder.

The config folder

SystemFolder
macOS~/Library/Application Support/ledgeline/
Linux~/.config/ledgeline/, or $XDG_CONFIG_HOME/ledgeline/ if you set that variable

Set LEDGELINE_CONFIG_DIR to use a different folder. It moves all of these files at once.

Which value wins

Ledgeline looks up each view setting on its own, in this order, and uses the first usable value it finds:

  1. the [ui] table in ledgeline.toml, beside the journal you have open;
  2. ui-prefs.toml in the config folder;
  3. Ledgeline’s built-in default.

Opening a different journal (File → Open, or Open Recent) loads that ledger’s ledgeline.toml, if it has one.

Where a change is saved

When you change a view setting in the app, Ledgeline saves only that key, and picks the file one key at a time:

So a ledgeline.toml only ever holds the keys someone put in it. Changing the theme, for example, saves it to ui-prefs.toml, even in a ledger that has a ledgeline.toml. Once theme is in that file’s [ui] table, whether you added it by hand or ticked “Use for this ledger only”, theme changes made in that ledger are saved there instead.

Ledgeline picks the file for the journal columns one column at a time. A change to the Status column is saved in ledgeline.toml only if its [ui.columns] table already has status. The other columns still go to ui-prefs.toml.

Opening the app and viewing your books writes nothing. Ledgeline creates ui-prefs.toml the first time you change a view setting. It creates ledgeline.toml only when you ask it to keep a setting for one ledger, link a bank account, or close the books through a date. Ledgeline Invoicer creates it only when you save its Settings page and confirm that it should.

Keeping a setting for one ledger

The theme, the interface scale, the automatic price updates and the invoice matching settings can be kept for one ledger from inside the app, so you can tell your business books from your personal ones at a glance, or let only your real books fetch prices. Tick “Use for this ledger only” next to the setting:

Only theme, uiScale, autoPrices, autoPricesWeeks, the five sync keys, autoRecognize and the three invoice matching keys can be kept this way from the app. The Prices tab keeps its two keys together, and the Sync tab keeps autoSync, autoSyncEveryHours, syncSourceDir, syncKeepSourceDays and manualRemindDays together. The Books tab keeps autoRecognize, and each of settlementLookbackDays, settlementLeadDays and settlementToleranceBps on its own, with a box under each. For any other key, add it to ledgeline.toml by hand.

Ledgeline Invoicer offers the same box, labelled “Use for these books only”, for the theme, the text size and the same three matching keys. The two apps share this choice, so a key kept for a ledger in either app is kept for it in both.

Ledgeline won’t write to a ledgeline.toml that is a symbolic link, is larger than 64 KiB, or isn’t valid TOML. In that case the box can’t be ticked, and a notice says why. The checkbox isn’t offered when view settings are kept in the browser.

ui-prefs.toml

The view settings for all your ledgers: the keys from the table below at the top level, with [columns] for the journal columns. Ledgeline edits the file in place as you change things. Your comments, the order of the keys, and keys it doesn’t know are kept, so you can also edit it by hand:

# Ledgeline's view settings for every ledger. Ledgeline saves the keys you
# change here. A ledger's own ledgeline.toml overrides any key its [ui] table
# sets. Comments and keys Ledgeline does not know are kept. Docs: "Settings files".

hideZeroBalances = false
reviewMaxDays = 90           # a quarter is plenty
holdingsPieDimension = "assetClass"

[columns]
status = false

A symbolic link here is fine for reading, because dotfile managers often install config files that way. Ledgeline won’t write through the link or replace it, though, because home-manager, for example, links the file into a read-only folder. With a linked ui-prefs.toml, a change you make in the app lasts until Ledgeline quits, and a notice says the file is managed outside Ledgeline. To keep the change, put it in your dotfiles.

If the file isn’t valid TOML, is larger than 64 KiB, or isn’t a regular file, Ledgeline ignores it and won’t save over it. Fix or remove the file to start saving again.

[ai]

The assistant’s profiles live in ui-prefs.toml only, under [ai]. Settings → Assistant writes them, and you can write them by hand. Each profile is a table under [ai.profiles], named by its id:

[ai]
default = "local"            # the profile to use; optional with only one profile

[ai.profiles.local]
name = "Qwen on this Mac"
kind = "openai-compatible"
url = "http://127.0.0.1:8080/v1"
model = "qwen3-30b"
access = "propose"

[ai.profiles.claude]
name = "Claude"
kind = "anthropic"
model = "claude-sonnet-5-5"
access = "help"
KeyAllowed values
defaultThe id of the profile to use. Without it, the assistant uses the only profile when there is one, and is off when there are several, unless the open books pick one
[ai.profiles.<id>]One profile. The id is 1 to 32 lowercase letters, digits and dashes, and can’t start with a dash. At most 16 profiles
nameRequired. What Settings and the chat call the profile, at most 80 bytes
kindRequired. "openai-compatible" (llama.cpp’s llama-server, LM Studio, vLLM, Ollama’s /v1), "ollama", "openai", "anthropic", "gemini" or "openrouter"
urlRequired for openai-compatible and ollama: the server’s http or https address, with no user name, password, query or fragment. Leave it out for the other kinds, which always use the service’s own address. An address that isn’t on this machine or your network must be https
modelRequired. The model’s name on that server
access"help", "read" or "propose". Default: "propose" for a server on this machine or your network, "help" for anything else. See What the assistant may do
max_tool_roundsA whole number from 0 to 50: how many rounds of lookups one answer may make. Default: 10, and Settings leaves the key out when it is 10. 0 turns tools off, so the assistant answers from the model’s own knowledge, without the manuals or your books. See Tool rounds
network"local" marks a server under a public host name as your own, so it is treated as local. It has no effect on an IP address or on the hosted service kinds

API keys are never in this file. Ledgeline keeps them in your keychain. A profile that has a problem is skipped, and Settings → Assistant lists what was wrong with it. Saving a profile from Settings keeps your comments and the other keys, but it won’t write through a symbolic link: with a linked ui-prefs.toml, add profiles in your dotfiles.

ledgeline.toml

Give one ledger its own values by creating ledgeline.toml in the folder of its main journal. Put the keys under [ui], with [ui.columns] for the columns:

# This ledger's own view settings. Ledgeline keeps saving changes to these
# keys here; everything else comes from ui-prefs.toml.

[ui]
# The business card settles slowly, so look further apart for transfers.
matchWindow = 21
insightsTab = "balances"
benchmarks = ["SPY", "QQQ"]

[ui.columns]
status = false   # nobody here uses ! and *

Every key you list there overrides ui-prefs.toml in this ledger, and changes you make to those keys in the app are saved back to this file. Ledgeline edits values in place and keeps your comments, the order of the keys, and keys it doesn’t know. Besides [ui], it reads and writes two more tables:

Ledgeline Invoicer adds a third, [invoicer], described below. Ledgeline also reads an [ai] table, described below, but never writes it. Ledgeline reserves the rest of the file for future per-ledger settings.

To stop overriding a key, delete its line. The ledger then follows ui-prefs.toml for it again.

[books]

These settings describe the books themselves, so they only ever live in the ledger’s ledgeline.toml:

[books]
# Turn the recognition helpers off (or on before any account is declared).
basis = "accrual"
# Where the schedules live, inside the journal's folder. Default: recognition.journal.
recognition-file = "books/recognition.journal"
# Entries on or before this date are never rewritten.
closed-through = "2026-09-30"
KeyAllowed valuesWritten by
basis"cash" turns the recognition helpers off; "accrual" turns them on. Absent, they follow the accounts.You, by hand
recognition-fileA path inside the journal’s folder. It can’t be the main journal, the budget file or a file the journal includes.You, by hand
closed-throughA date, YYYY-MM-DDClose books through… in Settings → Books, which creates the file if needed. Or you, by hand.

Ledgeline checks each value the way it checks [ui]. It ignores a date that isn’t one, a basis that isn’t cash or accrual, or a path outside the folder, and a notice says why. None of these keys runs anything.

Settings → Books shows the closed-through date, Close books through… and Reopen…, and the recognition and invoice matching preferences listed under The keys.

[invoicer]

Ledgeline Invoicer keeps its settings for these books under [invoicer], with its word lists under [invoicer.words]. Ledgeline doesn’t read them. Invoicer settings lists every key.

The invoicer writes this table only when you press Save on its Settings page:

Your comments, the order of the keys, [ui], [books], [sync] and keys it doesn’t know stay as they are.

[time]

Time tracking keeps the names and places of its files under [time], with [time.tags] and [time.words] for tag names and the words it writes. Only you, or Use existing… in its setup, write there. Time file settings lists the keys. Your own time choices, such as your name in the time files, go under [time] in ui-prefs.toml.

Choosing the assistant for one ledger

Under [ai], a ledger can pick which of your assistant profiles it uses, or turn the assistant off:

[ai]
profile = "local"   # the id of a profile in ui-prefs.toml
# enabled = false   # never offer the assistant for these books

enabled = false overrides everything else. Ledgeline ignores a profile that names no existing profile, and the books use the default. Ledgeline reads nothing else under [ai], so this file can’t add a profile, name a server or model, or set an access level. Ledgeline never writes this table; edit it by hand.

Sharing the file with the ledger

If your books are in a git repository or a shared folder, ledgeline.toml goes wherever the journal goes. Since Ledgeline never writes keys you didn’t put there, the file only changes when someone changes one of its own settings. That makes it reasonable to commit, so everyone who opens the ledger gets the same layout.

Ledgeline treats a file somebody else wrote as untrusted:

When Ledgeline ignores something in either file, a notice in the bottom corner lists what it skipped and why.

prefs.toml

The hledger path you enter on the Imports screen is saved here. Ledgeline checks the program before saving it: it has to be a runnable hledger that no other user can modify. Leave the field empty, or remove the key, to go back to finding hledger on its own.

# Ledgeline preferences. Setting the hledger path in the app writes `hledgerPath`
# here; you can also edit this file by hand. Comments and unknown keys are kept.
hledgerPath = "/opt/homebrew/bin/hledger"

A path you type into the file by hand isn’t checked until Ledgeline runs it. If it doesn’t work, Ledgeline tries the other places it looks for hledger.

Saved assistant reports

The assistant’s saved reports live in ai-recipes.toml, in the config folder, never in a books folder. Ledgeline makes the file the first time you save a report, readable only by your user account. It holds at most 200 reports, and saving one more asks you to delete one first. Each report is a [[report]] table:

[[report]]
id = "r20261127T101500-ab12cd34"
name = "Food by month"
ledger = "/Users/me/books/main.journal"
created = "2026-11-27T10:15:00-05:00"
title = "Food by month"
tool = "hledger"
arguments = { command = "balance", query = ["expenses:food"], period = "thisyear", interval = "monthly" }
transforms = [[{ op = "sort", column = "total", descending = true }]]
view = { kind = "bar", x = "account", y = ["total"] }
KeyWhat it is
idMade by Ledgeline. Leave it alone
nameWhat the Saved reports list calls it. Safe to edit, one line of at most 120 characters
ledgerThe main journal of the books it was made on. Reports made on other books show an “Other books” badge
createdWhen it was saved
titleThe title of the results tab a run opens. Safe to edit, like name
toolWhere the source table comes from: totals, transactions, hledger or accounts
argumentsThat tool’s request, as the assistant made it. A relative period such as thisyear stays relative
transformsThe steps applied to the table since, in order. Optional
viewkind = "table", or a chart kind with its x column and y value columns

Change name and title by hand if you like. Ledgeline keeps your comments and edits when it rewrites the file. Leave the other keys as Ledgeline wrote them.

Ledgeline treats the file as untrusted, since anything could have edited it. Before a report runs, Ledgeline checks it the same way it checks the assistant’s own requests. It refuses an entry that has a key it doesn’t know, uses any tool other than those four, has a step that doesn’t parse, or has arguments the tool would refuse, such as an hledger command that isn’t a read-only report. A refused entry stays in the list with the reason under it, and its Run button is off.

The keys

KeyDefaultAllowed values
columns.date, columns.status, columns.description, columns.accounts, columns.amounttruetrue or false: whether the journal table shows that column
insightsOpentrueWhether the panel above the journal is open
insightsTab"activity""activity" or "balances"
hideZeroBalancestrueBalances tab: leave out accounts holding nothing
flowsInOpen, flowsOutOpentrueThe Money in and Money out panels
netWorthChartOpen, cashFlowChartOpentrueThe charts above the Net Worth and Cash Flow tables
budgetGapsOpenfalseThe Budget tab’s “not budgeted” section
startupMoreOpenfalseThe “More metrics” list under the startup figures
holdingsPieDimension"holding""holding", "assetClass", "sector", "industry", "securityType", "category" or "risk"
lastProjectionIdnoneThe scenario file the Projections tab reopens, such as "plans/series-a.journal". "" means none. The path is relative to the journal’s folder, so in ui-prefs.toml Ledgeline saves it per ledger, under [ledgers."<path to main journal>"]. If it is set at the top level, Ledgeline ignores it
benchmarks[]Ticker symbols such as "SPY", at most 32
reviewRecentLimit501 to 1000
reviewMaxDays3650 to 36500. 0 means no limit
reviewMarkerstrueThe journal’s review stripes
matchWindow101 to 60 days
matchLookback3650 to 36500 days. 0 means no limit
matchTransitDays101 to 365 days
theme"default"The colour theme. A family name follows your system’s light or dark setting: "default", "github", "catppuccin", "gruvbox", "tokyo-night" or "solarized". A variant always looks the same: "default-light", "default-dark", "github-light", "github-dark", "catppuccin-latte", "catppuccin-mocha", "gruvbox-light", "gruvbox-dark", "tokyo-night-day", "tokyo-night-night", "solarized-light", "solarized-dark", and the dark-only "one-dark-pro", "dracula", "monokai" and "nord"
uiScale100Interface scale in percent, 50 to 300. The app steps through 70 to 200
autoPricesfalseKeep stock prices up to date in the background. See Automatic price updates
autoPricesWeeks60 to 52: how many past weeks get a weekly closing price filled in. 0 means the latest close only
autoSyncfalseSync linked bank accounts in the background. See Sync now and automatic sync
autoSyncEveryHours63 to 24: the most hours between background syncs
syncSourceDir"imports/sync"Where bank sync saves the files it downloads: a folder inside the journal’s folder, written relative to it. An absolute path or one with .. is ignored
syncKeepSourceDays00 to 3650: how many days downloaded files are kept. 0, the default, means forever
manualRemindDays351 to 3650: days with no new transaction before a manually imported account turns amber on Imports → Accounts
autoRecognizefalsePost due recognition entries in the background
recognitionRows"group"How the journal shows posted recognition entries: "group", "hide" or "show"
settlementLookbackDays1800 to 3650: how far back invoice matching looks. 0 means no limit
settlementToleranceBps3000 to 10000: how far a payment may fall short of its invoice and still be proposed, in hundredths of a percent (300 is 3%)
settlementLeadDays40 to 60: how many days a payment may come before its invoice and still be proposed

Keeping view settings in the browser

Set LEDGELINE_UI_PREFS_IN_BROWSER to any non-empty value when you start ledgeline --server, and the server reads and writes no view-settings file at all. It returns the built-in defaults, and the web app keeps its view settings in the browser’s storage, as versions before these files did. Ledgeline’s own automated tests run this way, so a test never changes your ui-prefs.toml and each browser session starts clean. It is also useful when you embed the server somewhere that should leave no files behind.

Upgrading from an earlier version

Earlier versions kept the hledger path in prefs.json. The first time Ledgeline starts and finds prefs.json but no prefs.toml, it writes prefs.toml with the same path and renames the old file to prefs.json.migrated. Nothing is deleted.

Earlier versions also kept view settings in the browser’s storage, which the desktop app lost every time it restarted. The first time Ledgeline finds view settings still in the browser’s storage, it saves them the usual way, which normally means ui-prefs.toml, then removes them from the browser. A key the open ledger’s ledgeline.toml sets is left out, because that ledger’s own value wins anyway. If the save fails, the settings stay in the browser and Ledgeline tries again next time. The address and access token of a separate Ledgeline server stay in the browser, because they describe your browser, not your books.