Budi – local-first AI coding cost tracker (Rust, tails local logs, no proxy)
Budi is an open-source, MIT-licensed, local-first cost tracker for AI coding agents. It works by tailing the transcript files that agents like Cursor, Claude Code, Codex, and Copilot Chat already write to disk, without needing a proxy or network interception. It provides per-repo, per-branch, and per-ticket cost attribution, a live status bar in editors, session health checks, and an optional team dashboard. All prompts, code, and responses stay on your machine by default.
Article intelligence
Key points
- Local-first: tracks Cursor, Claude Code, Codex, and Copilot Chat usage without a proxy.
- Granular attribution: costs attributed to repos, branches, and tickets; filter by model, file, or custom tags.
- Privacy-preserving: prompts, code, and responses never leave your machine; optional team dashboard sends only daily aggregates.
- Multi-editor: live status bar in VS Code, Cursor, and JetBrains IDEs, scoped per host.
Why it matters
This matters because local-first: tracks Cursor, Claude Code, Codex, and Copilot Chat usage without a proxy.
Technical impact
May affect model selection, inference cost, product capability, and evaluation benchmarks.
AI coding cost tracker · local-first · open source · MIT
Local-first cost tracker for AI coding agents.
Tracks CursorClaude CodeCodexCopilot Chat
After brew install, three things run on your machine: a small daemon that tails the transcripts your agents already write to disk, a status bar in your editor, and a CLI for repo / branch / ticket attribution. Nothing in your network path.
$ brew install siropkin/budi/budi && budi init
$ curl -fsSL https://raw.githubusercontent.com/siropkin/budi/main/scripts/install-standalone.sh | bash && budi init
$ irm https://raw.githubusercontent.com/siropkin/budi/main/scripts/install-standalone.ps1 | iex; budi init
Installs v8.4.2. One command. macOS / Linux / Windows. No account needed. Editor wiring →
View on GitHub
For teams →
Why not just X? ↓
~ budi stats project
Today 7d 30d ───────────────────────────────────────────────────────────────── $ 4.92 session 🟢 healthy $ 38.10 $ 162.44
Top repos (last 7d) cost msgs ───────────────────────────────────────────────────────────────── siropkin/budi $ 18.40 21,402 acme/web $ 11.05 9,118 acme/infra $ 6.32 2,845 personal/notes $ 2.33 661
Top models (last 7d) cost share ───────────────────────────────────────────────────────────────── claude-opus-4-7 $ 22.18 58.2 % claude-sonnet-4-6 $ 9.41 24.7 % claude-haiku-4-5 $ 4.02 10.6 % gpt-5-codex $ 2.49 6.5 %
Branch hot list cost ticket ───────────────────────────────────────────────────────────────── budi/feat/cloud-ingest $ 6.91 BUD-214 acme/web/fix/checkout-retry $ 4.38 WEB-1180 acme/web/feat/analytics-v3 $ 3.12 WEB-1199
$6,154
in a single month on AI coding agents — across one developer, multiple subscriptions and pay-as-you-go bills.
136K
messages over that month. The provider dashboards showed a total. They did not show which repo, branch, or ticket.
5,508
Haiku calls that nobody asked for. Cheap individually, real money in aggregate. Invisible until something started counting.
Multi-agent, no interception
Claude Code, Codex CLI, Copilot CLI, and Cursor — all attributed by the same daemon. Reads the transcript files those tools already write to disk. Nothing in your network path.
Reads transcripts from disk — no proxy
Per repo, branch, and ticket
Cost attributed to the repo and branch you were on, with ticket IDs lifted from branch names. Filter by ticket, activity, file, model, or custom tag.
budi stats branch · ticket · file
Live status line
Rolling 1d / 7d / 30d cost in Claude Code, Cursor, VS Code, and JetBrains IDEs — scoped per host. The Cursor line shows Cursor spend only; the VS Code and JetBrains lines show their own Copilot Chat spend only.
_projects/budi · main · budi · $3.47 session · $0.06 message
Session health on demand
budi sessions shows context growth, cache reuse, cost acceleration, and retry loops in plain English. Not a wall of emoji by default — quiet unless you ask.
budi sessions
Cursor — payments.ts
// src/lib/payments.ts
export async function refundCharge ( id : string ) {
return stripe.refunds. create({ charge: id });
}
main payments.ts
budi · $0.42 1d · $3.18 7d · $14.92 30d
Cursor — status bar scoped to cursor. Each editor shows only its own host's spend.
VS Code — payments.ts
// src/lib/payments.ts
export async function refundCharge ( id : string ) {
return stripe.refunds. create({ charge: id });
}
main payments.ts
budi · $0.31 1d · $2.04 7d · $9.87 30d
VS Code — status bar scoped to copilot_chat. Each editor shows only its own host's spend.
~ budi sessions
Session 2968337c-1e4 ────────────────────────────────────────────────── Agent claude_code Models claude-opus-4-7 Started 2026-05-06T02:22:27.194+00:00 Duration 2m22s Repos github.com/siropkin/budi-cloud Branches 151-repos-companion-tables, main Outcome no_commit …explanation…
Messages 22 Input 32 Output 10.8K Est. cost $1.70
Tags file_path: src/lib/dal.ts …
🟢 Vitals: GREEN budi sessions — session health in plain English. No dashboard required.
What budi tracks
Provider coverage, with the caveats spelled out.
See coverage Hide
Local-log parsing is the primary path for every provider. APIs (Cursor Usage, GitHub Billing) are supplementary truth-up, never the only signal — so attribution keeps working offline, without auth tokens, and when an upstream API breaks.
Data source Local SQLite ( cursorDiskKV ) primary; Cursor Usage API supplementary
Notes All Cursor plans. Local-tail produces real tokens × pricing-manifest dollars; the Usage API is a supplementary truth-up that can lag ~10 min.
Data source Local JSONL transcripts
Notes All plans. Real per-message tokens parsed from the transcripts Claude Code already writes to disk.
Data source Local JSONL transcripts
Notes Real per-message tokens parsed from disk.
Data source Local JSONL session-state
Notes Standalone GitHub Copilot CLI — not the VS Code extension.
Data source Local JSON/JSONL primary; GitHub Billing API supplementary
Notes Three sub-states for cost accuracy — see the breakdown below.
Cost accuracy by sub-state — see breakdown below the matrix.
Data source Local logs
Notes The 8.5.0 breadth round. Same provider-plugin pattern as Cursor and Copilot Chat — local logs primary, no proxy.
Individual licence + GitHub Billing API PAT
exact
GitHub-side dollar truth-up — the authoritative number per (date, model) bucket.
Individual licence, no PAT
estimated · output-only
Local-tail tokens × manifest pricing. May-2026+ VS Code builds persist response tokens but drop prompt-token counts client-side, so the dollar number is output-only — meaningful as a relative trend, but a fraction of the actual bill.
Org-managed licence
estimated · output-only
Same output-only manifest pricing, with no Billing API truth-up — the user-level Billing API endpoint returns empty for org-managed Copilot licences.
Org-managed Copilot licences see local-tail tokens × pricing-manifest dollars only — the GitHub-side reconciliation that individually-licensed users get is unavailable because the user-level Billing API endpoint is empty for org-managed seats. Local-tail still produces real tokens; the truth-up is the missing piece for that subset.
Good at Official, authoritative totals. Free.
Stops at Single-provider. No repo, branch, or ticket attribution. Nothing cross-agent.
Good at Local, lightweight, correct for the one agent they target.
Stops at Single-agent. No cross-agent rollups, no branch/ticket attribution, no team view.
Good at Central dashboard with deep analytics.
Stops at Your prompts, code, and responses leave your machine — a hard no for most source code.
Good at Multi-agent via local transcript tailing — nothing in your network path. Repo/branch/ticket attribution. Live session health vitals. Optional team dashboard with aggregates only.
Caveats You run a small daemon. Live rows lag by seconds; Cursor cost can additionally lag ~10 min via the Cursor Usage API. Not every agent supported yet (Gemini deferred).
Never leaves
Prompts, code, AI responses, file paths, email addresses, raw payloads, and tag values. There is no "full upload" mode in the code.
Can optionally leave
Pre-aggregated daily numbers — tokens, cost, model name, hashed repo ID, branch name, ticket ID. Push-only, HTTPS-only. Off by default.
How to turn it on
Sign up at app.getbudi.dev, drop your API key into ~/.config/budi/cloud.toml, set enabled = true, restart the daemon.
Analytics. This site (getbudi.dev) counts anonymous page views via Vercel Web Analytics: cookieless, IP hashed daily, no session replay, no cross-site tracking. It only runs on this site — not part of the product.
$ brew install siropkin/budi/budi && budi init
$ curl -fsSL https://raw.githubusercontent.com/siropkin/budi/main/scripts/install-standalone.sh | bash && budi init
$ irm https://raw.githubusercontent.com/siropkin/budi/main/scripts/install-standalone.ps1 | iex; budi init
Installs v8.4.2. Latest release on GitHub. Prefer to install the editor extension on its own? Pick VS Code or Cursor below.
Four steps to verify.
If anything looks wrong, budi doctor is the source of truth. For a live session health read, run budi sessions .
1 budi init
Starts the daemon on port 7878 and installs the platform-native autostart service. The hero install runs this for you — listed here so you know what just happened.
2 budi integrations install
Wires the Claude Code statusline and offers the VS Code / Cursor extension if either editor is detected. Restart Claude Code afterwards so it picks up the new statusLine command.
3 budi doctor
End-to-end verifier: daemon, tailers, schema, transcript visibility, and attribution health. When "All checks passed." you are done.
4 budi status
Today-cost snapshot: daemon state and today's spend. For the full breakdown, use budi stats projects / branches / tickets.
Editor extension.
Adds the budi status bar to VS Code, Cursor, or a JetBrains IDE. budi init offers VS Code / Cursor automatically; the JetBrains plugin currently ships on the Marketplace Beta channel and is installed from inside the IDE. Pick your editor:
$ code --install-extension siropkin.budi
View on VS Code Marketplace →
$ cursor --install-extension siropkin.budi
View on Open VSX →
Settings → Plugins → ⚙ → Manage Plugin Repositories… → add https://plugins.jetbrains.com/plugins/beta/list, then search for budi
View on JetBrains Marketplace →
Other install methods
Bundled extension via budi CLI
Same path budi init uses. Picks the right editor automatically.
$ budi integrations install --with cursor-extension
Manual VSIX in VS Code (offline / pinned)
Download cursor-budi.vsix from the budi-cursor releases page first.
$ code --install-extension cursor-budi.vsix --force
Manual VSIX in Cursor (offline / pinned)
Same VSIX file works in Cursor — Open VSX is just a discovery surface.
$ cursor --install-extension cursor-budi.vsix --force
Daemon from source (Rust toolchain)
$ git clone https://github.com/siropkin/budi.git && cd budi && ./scripts/install.sh
For teams (opt-in)
One dashboard for the team — aggregates only, no prompts or code.
Daily cost per user, repo, model, branch, and ticket at app.getbudi.dev. Privacy contract spells out exactly what does and doesn't leave your machine.
Sign up
What leaves my machine when using Budi?
By default, nothing. Optionally, only pre-aggregated daily numbers (tokens, cost, model, hashed repo ID, branch, ticket ID). Never prompts, code, responses, file paths, or emails. Budi itself is open source (MIT) and free — the optional cloud dashboard at app.getbudi.dev is the only piece you ever pay for.
Does budi work in VS Code, Cursor, and JetBrains?
Yes. One extension covers Cursor and VS Code (v8.4.0+, May 2026); a sibling Kotlin plugin covers JetBrains IDEs via the Marketplace Beta channel. Use whichever editor you use day-to-day — a user with multiple installed sees each host's own data in its status bar.
What about GitHub Copilot?
Copilot Chat is supported in 8.4.0 — real per-message tokens parsed from VS Code's local session files. GitHub-side dollar reconciliation works for individually-licensed users via the GitHub Billing API; org-managed users see local-tail tokens priced through budi's pricing manifest.
Do I need a GitHub PAT for Copilot Chat?
Optional, but recommended for accuracy. Without a PAT, on May-2026+ VS Code builds you get output-only token dollars — useful as a relative trend, but typically a fraction of the actual bill. With a PAT scoped to billing, budi reconciles to GitHub's exact dollar number per (date, model) bucket. Org-managed licences see output-only forever (the user-level Billing API endpoint is empty for them).
What about Continue / Cline / Roo Code / Aider / Gemini CLI?
Planned for 8.5.0 (the breadth round). Same provider-plugin pattern as Cursor and Copilot Chat — local logs primary, no proxy.