Overview
- After every answer, the mod records the chat cost, tokens per model and the cost of the mod calls.
- /ledger shows today, 7 and 30 days and all time, the last 14 days, projects and the most expensive chats.
- /ledger here shows what this project has cost and what share of it this chat has.
- With limit-bars, the same numbers appear as a small cost ring above the prompt.
- /ledger limits shows the value in the current 5-hour window, in the week and in the subscription month.
- Several devices can be merged through a shared folder, with amounts and the project's folder name, without paths and chat titles.
- The mod does not call a model and uses no network. It reads and writes files only for the sync, in the folder you give.
What it is about
Claude Code shows the cost of a chat. cost-ledger keeps a ledger of all of them: After every answer, the mod records what the chat cost, how many tokens went to which model and what the calls of other mods cost. This builds a history you can query.
Claude Code is a product of Anthropic. This mod is not from Anthropic.
What /ledger shows
- Costs for today, the last 7 and 30 days and in total
- History of the last 14 days, with /ledger weeks 14 calendar weeks split by model
- Shares of the models with /ledger models, as a ring in the desktop app
- Costs by project
- the most expensive chats


With /ledger here you see what the project of this chat has cost so far and what share of it the chat has. In the desktop app a ring shows the share, and next to it the project's amount in large type. If limit-bars is installed too, it shows the same numbers as a small cost ring above the prompt.

With /ledger limits you see the API value in the current 5-hour window, in the week and in your subscription month. An estimate for usage outside the ledger comes with it, for example through claude.ai or the phone. You enter your plan yourself with /ledger plan: Pro, Max, Ultra, Team or Enterprise, plus the billing day. Without a price the list price applies (Max $100, Ultra $200, Pro $20); for Team and Enterprise you give the price yourself. The old names max5 and max20 still work and become Max and Ultra. /ledger help lists all commands and your settings. /ledger language de or en switches all installed fynn-mods to German or English at once. Out of the box, the mods speak English.

Several devices
With /ledger sync and a folder you merge the ledgers of several devices, for example through a folder you already sync between computers anyway. The sync file holds amounts, model IDs, session IDs and, since version 0.8.0, the last folder name of each project, so that chats from other devices count toward the same project. Paths, Git remotes and chat titles are not in it. You can also enter the folder and a device name on the plugin's settings page; there only the path is saved, and a missing folder is created only by /ledger sync with the folder.
Settings
Plan, billing day, price, sync folder and device name are on the plugin's settings page: in the desktop app under Settings → Plugins → cost-ledger → Settings, in the terminal with /config or /plugin configure cost-ledger. /ledger plan and /ledger sync change the same values. What earlier versions saved, the mod takes over once at the first start.
In the terminal a command applies at once. In the desktop app it applies in the current chat at once, in other open chats after /reload-plugins or in the next chat. The settings stay on each computer, like the ledger.
What the mod reads and does
cost-ledger does not call a model and uses no network. Locally it stores costs, tokens, limit windows, titles and a project name. It reads and writes files only when you turn on the sync: it reads the files of the other devices in the chosen folder and writes only its own. To limit-bars it passes only what this chat and this project have cost, plus the project's folder name, since when it has been recording and on how many devices; no paths, titles or chat contents. For the language switch it changes the “language” setting of the eight fynn-mods, for /ledger plan and /ledger sync only its own settings; it leaves other plugins alone. In the desktop app it calls the claude CLI for this, only with “claude plugin list” and “claude plugin configure”. If the saved settings still hold an old plan name (max5, max20), it switches it to Max or Ultra once and shows a single notice for that.
Installation
You need Claude Code in a version that supports mods (tested with 2.1.325, minimum version 2.1.318; the other fynn-mods need 2.1.323). Two commands:
- claude plugin marketplace add FynnXland/fynn-mods
- claude plugin install cost-ledger@fynn-mods
The mod is free and under the MIT license. This description refers to version 0.12.5. The amounts are values at API prices, not a bill.
Part of fynn-mods
cost-ledger is one of eight mods that fit together. They pass small values to each other, never text from the chat, and six share the band above the prompt.