Know what your coding agents really cost.

AI coding tools charge a flat fee and hide the meter. AiSpend prices every Claude Code and Codex turn at real API rates, shows whether your subscription is paying off, and traces each dollar to the turn, file, and git commit that spent it. One static Go binary, no keys, all local.

$ brew install cloudyali/tap/aispend
View on GitHub

Installs in seconds. No Node, no Python, no account.

MIT licensed One static binary, no runtime doctor --network proves it
Prices the logs your agents already write: Claude CodeCodex per-token-class · caches included · grouped by branch, commit & file · any window from a day to a year
The hidden meter

Flat pricing is the hook. The bill underneath is still tokens.

Coding agents bill a flat monthly subscription and never show you a per-token meter. But the real cost is still tokens: input, output, and cache reads and writes. Price your actual usage at published API rates and the number is usually nowhere near what you pay, and most setups can't even measure the gap. AiSpend is the meter your plan leaves out.

Flat per-seat pricing won't last. As coding agents shift to usage-based billing, the teams who already know their real token cost are the ones who won't be caught out by the first metered bill.

The itemized receipt

An explained dollar, printed on paper.

Your subscription hits your card as one flat charge a month, with no breakdown and no idea which work cost what. AiSpend turns that single number into an itemized receipt: every turn split by token class and priced at the exact rate that produced it, with the evidence attached, so you can open the source behind any line.

Input Output Cache read Cache write

From a day's total down to the exact prompt.

Drill from a day all the way down to the exact prompt that ran, and the turn's token-by-token cost behind it. Open any number to see what it's made of, re-read live from your local session log and never guessed from a cache.

aispend — turn evidence
AiSpend turn evidence: a single turn's token-by-token cost traced to the exact prompt

The deepest level is the prompt itself: the exact text that ran, re-read live from your session log and priced to the token (callout 4 in the view above).

Open any number

day → session → file → turn, all the way down to the prompt itself. Each goes one level deeper.

Token-by-token

Input, output, cache-read, and cache-write, each priced separately, the way the API would bill it.

Re-read live

Evidence is pulled from your logs at view time, so the receipt is always live.

How the receipt is built

Is the seat paying for itself? Now you can prove it.

What your usage would cost at metered API rates sits right next to what your plan charges per day. The gap between the two is your answer: are you under-using the seat, or squeezing 3× the value out of it?

$11.71 api-equivalent vs plan $7.33/day 1.6× ROI
aispend — explorer
AiSpend explorer: sessions ranked by api-equivalent spend, with cache savings and budget pace

Amortized lens

Pick each agent's plan and start date once; AiSpend spreads the flat fee across your real usage, so the daily rate you compare against is honest.

Budget pace

An optional monthly api-equivalent ceiling that projects where you'll land. It's informational and never enforced.

Opus or Codex?

report --by model shows what each agent costs on real work, so you reach for the right one.

Plan-vs-usage & the amortized lens

Most of your bill is cache. See what it saved.

Coding-agent workloads are dominated by prompt-cache reads and writes. AiSpend prices the 5-minute and 1-hour cache tiers separately, and shows you what your prompt structure shaved off the day.

aispend — receipt
AiSpend session receipt: per-token-class split, cache savings, and a cost-by-file heatmap

Cache, per provider

Anthropic's two cache-write tiers (1.25× vs 2× input) and Codex's cached-input discount are each priced their own way. The subtle part that's easy to get wrong.

Read vs miss

Treat cache hit/miss as a filter: "show me only what I paid on cache misses." A FinOps question you can finally answer.

Without cache ≈ $X

The savings line spells out what caching kept off the bill, and the percent it covered.

How cache tiers are priced

Tie every dollar to the commit that shipped it.

What did this feature actually cost? Group spend by branch, git commit, or file and the answer is one number. Use it for a client invoice, a cost-per-feature readout, or just to settle "was that refactor worth it?" You can also write the cost straight into your git history as a commit trailer.

--by branch

Roll spend up to the branch, so a feature's true cost is one number.

--by commit

1:1 with the work that shipped; reconciles back to the by-model total.

Cost trailers

Opt in and AiSpend appends a line like AI-Cost: 0.42 to each commit, so the spend ships with the code in your git history.

Turn it on and the cost rides along in git history, no extra step.

Cost trailers, explained
Use cases

When you'll reach for AiSpend.

One local ledger. The question it answers depends on who's asking.

Solo developer

"Am I getting my money's worth?"

Your $20$200/mo plan hides the meter. aispend today puts api-equivalent spend next to your plan's daily cost, and the ROI line settles it.

$ aispend today
Agencies & consultants

"What did this feature cost the client?"

Group spend by branch, commit, or file. Agent work becomes a line item on the invoice, or the answer to "was that refactor worth it?"

$ aispend report --by branch
Team lead / FinOps

"Are we on pace this month?"

Set an api-equivalent ceiling and AiSpend projects where the month lands. Informational, never enforced.

$ aispend budget set 300
Engineering leadership

"Who's spending what across the team?"

Every engineer's commits carry an AI-Cost: git trailer, set in a committed .aispend.toml so the team stamps one format. Read spend from git log or a PR by commit, author, and repo, and --by cost_tag rolls it up by team.

$ git log --grep "AI-Cost"
Late-night debugging

"What ran away at 2 a.m.?"

An agent looped overnight and ran up the bill. The hourly spike bar points at the hour; aispend top names the turns and the session behind it.

$ aispend top
Choosing a tool

"Opus or Codex for this task?"

report --by model and --by provider show what each agent costs on real work, so you reach for the right one, not the expensive one out of habit.

$ aispend report --by model
Regulated & NDA shops

"My code can't leave the building."

AiSpend reads only local files and has no path to send your data anywhere. doctor --network proves it, and the offline build removes even the price refresh.

$ aispend doctor --network
How it works

From your local logs to an explained dollar.

No keys, no upload, no setup. Just run it. AiSpend finds the session logs your agents already write, works out whether each came from Claude Code or Codex, and prices everything, leaving evidence you can open at every step.

  1. 1

    Read your local logs

    It parses the Claude Code and Codex session transcripts already on disk (~/.claude, ~/.codex). No API keys, no account, nothing uploaded.

  2. 2

    Price every turn, cache-aware

    Each turn is split by token class and priced at published API rates, including the 5-minute and 1-hour Anthropic cache tiers that are easy to get wrong.

  3. 3

    Store an evidence ledger

    Every number is written to a local ledger under ~/.aispend with its source: which parser read it, which rate priced it, which method produced it. Nothing is claimed without proof.

  4. 4

    Drill, report, ship

    Drill a day down to a single turn, group spend by branch, commit, or file, or set a budget. You can even write the cost straight into your git history.

Your first run

Run it. Read it.

A bare aispend opens the interactive TUI with no config.

  1. 1

    Run

    Type aispend. The interactive TUI opens, finds your logs, and starts.

  2. 2

    Set up, if you want

    Press b to set a monthly budget and p to pick your plan. A budget adds pace tracking; a plan unlocks the amortized view.

  3. 3

    Read

    Press to drill from a day into a session, a file, then a single turn. esc steps back out.

Keys worth knowing
Switch period. Day, week, month, quarter, year.
vSwitch cost view. api-equivalent ⇄ amortized.
sSync now. It auto-syncs; the header shows "synced 2m ago".
The two cost views
api-equivalentWhat your usage would cost at metered API rates.
amortizedYour flat plan fee spread across that usage.
Private by default

Your data never leaves your laptop.

No API keys, no credentials, and none of your session data leaves the machine. The only outbound request is a refresh of public model prices. It sends no user data, doctor --network discloses it, and the offline build removes even that.

  • Reads local files only, and nothing is uploaded
  • The offline build compiles every net/* import out entirely
  • Built for NDAs, regulated shops, and the privacy-minded
10 MBdefault build
4.5 MBoffline build (net/* + TUI compiled out)
Prove it yourself
Open source

Open by default.

AiSpend is MIT-licensed. The pricing engine, the evidence ledger, the offline proof: all in the open. Inspect it, fork it, and run it right where your code already lives.

MIT licensed, no strings

Every line is public, including the pricing table the engine bills against. Audit it, fork it, ship it.

One binary, CLI & TUI

Pure Go, with no Node, no Python, and no database. A scriptable CLI and an interactive TUI explorer in one binary, on macOS, Linux, and Windows.

Provably offline

The default build has no network-capable sink; doctor --network asserts it. The offline build compiles net/* out.

No account, no telemetry

Reads local files only. Nothing is ever uploaded: no sign-up, no API keys, no phone-home.

Install

Install in one command.

Done in seconds, with no multi-step setup and no config files scattered across your machine. Pick how you install it: Homebrew, an install script, or Go. They all land the exact same binary, and each lets you verify what you ran.

macOS, via the CloudYali tap:

$ brew install cloudyali/tap/aispend
AiSpend app icon

AiSpend in your menu bar · macOS

Today's spend, plan ROI, and what caching saved — one glance in the menu bar. Self-contained: no server, no port.

$ brew install --cask cloudyali/tap/aispend-bar
Download .dmg

First launch of the unsigned build: right-click → Open, or xattr -dr com.apple.quarantine /Applications/AiSpend.app. (The cask does this for you.)

FAQ

Questions & answers.

AiSpend is a free, open-source CLI and TUI that tracks what your AI coding agents cost. It reads the session logs Claude Code and Codex already write, prices every turn at real API rates, and shows whether your flat subscription is paying off. One static Go binary, no API keys, offline by default.

The session transcripts your agents already write to disk, at ~/.claude/projects and ~/.codex/sessions. It parses each turn, prices it per token class, and stores an evidence ledger under ~/.aispend. No API keys, no credentials, and no config required.

No user data, ever. The only outbound request is an optional refresh of public model prices to keep rates current, and it sends nothing about you. aispend doctor --network discloses it, and the offline build compiles every net/* import out entirely.

Right now, Claude Code and Codex. They both keep detailed session logs on your machine, which is exactly what AiSpend reads, so each turn gets priced by token type with the tricky prompt-cache rates handled properly. More agents will follow as their log formats settle down.

AiSpend reports the API-equivalent cost of your work, meaning what the same turns would have metered at published rates, next to your plan's daily cost. The numbers line up once the time windows match, and the small difference that's left comes from a streaming-dedup decision, shown as a line in the receipt's evidence rather than hidden away.

Both, side by side. Your Claude Code or Codex plan is a flat monthly fee, so AiSpend prices that same usage at metered API rates and shows the two next to each other. The gap is the point: it tells you whether the flat plan is under-used or paying for itself several times over.

Yes. MIT licensed, the whole thing, including the pricing table. One static Go binary, no account, no telemetry. Install it, read the source, and fork it if you like.

Stop guessing what your agents cost.

Install AiSpend, run one command, and watch every dollar trace back to the turn that spent it.

View on GitHub
$ brew install cloudyali/tap/aispend
Copied to clipboard