What AI coding actually costs — per developer, repo, and PR.
PromptConduit is an open-source CLI that tracks token usage, cost, prompts, and tool calls for Claude Code, Cursor, Gemini CLI, Codex, Copilot, and Grok Build. Events land in a local JSONL file first. You can read every byte before anything leaves your machine. Teams sync to see spend across every tool, no enterprise contract needed.
curl -fsSL https://promptconduit.dev/install | bash {
"schema": 2, ①
"tool": "claude-code",
"hook_event": "Stop",
"captured_at": "2026-07-03T21:16:54Z",
"enrichments": {
"vcs": { "repo": "acme/platform", "branch": "feat/billing",
"dirty": true }, ②
"turn": { "duration_ms": 187954 },
"diff": { "files_changed": 3, "insertions": 148,
"deletions": 27 }, ③
"cost": { "totals": { "usd": 1.0716,
"tokens": { "output": 11628,
"cache_read": 777374 } },
"signals": { "cache_hit_rate": 0.91 } } ④
}
}- ① One JSON line per hook event, written to disk before any network call. No account required for any of it.
- ② Branch and repo names — never your diff contents.
- ③ What the turn changed, as counts.
- ④ What the turn cost, priced locally from your own transcript.
What one captured event looks like
captures_from
how_it_works
Three commands, then forget it's there.
1. Install hooks
promptconduit init signs you in (or stays local-only),
detects Claude Code, Cursor, Gemini CLI, Codex, Copilot, and Grok Build, and wires the CLI into each assistant's hook
system. Nothing about how the tool behaves changes.
2. Work as usual
Every session appends structured events to
~/.promptconduit/events.jsonl — enriched with git
context, timing, tool outcomes, and exact cost. Secrets are
scrubbed on the way in.
3. Ask it questions
promptconduit cost for spend by session and model.
The editor extension shows live cost and
coaching insights, fully offline.
in_your_editor
Or watch it live, in your editor.
The free editor extension renders the same local
events in the editor — a per-prompt cost ledger, a live Session Graph of your
agents, a raw event stream, and an offline coaching report. Fully offline,
for Claude Code and Cursor. promptconduit graph is the
same Session Graph in any browser.
enrichments
Names and numbers, on the record.
Each event carries enrichment slugs computed locally at capture time. They record that things happened and what they cost — not what you or the model said.
env- host, OS, architecture, working directory
trace- W3C trace and span IDs linking every event in a session
vcs- repo, branch, commit, dirty counts, linked pull request
prompt- length, word count, interrupt detection — counts, not contents
cost- per-request tokens and USD, cache-hit rate, model tier
tools- tool call names, durations, failures, MCP server, skill
diff- files changed, insertions, deletions per turn
subagent- agent type, parallelism, duration, spend
turn- wall clock from prompt submit to Stop
permission- what was requested, what was denied
local_only
Local first is not a mode. It's the default.
The CLI works with no account and no API key — that's the whole free
tier, forever, MIT licensed. Sending anything anywhere requires you to
opt in, and local_only: true makes opting in impossible.
When you do connect a team, you can diff exactly what leaves the
machine, because it's the same file you've been reading all along.
teams
The bill comes per tool. The questions come per repo.
Your team runs Claude Code, Cursor, and whatever shipped last month, each billed on its own. Vendor dashboards stop at their own tool, and their telemetry exports are usually an enterprise-plan feature. Connect a team and every member's sessions roll up into one view of what AI coding costs and where it goes.
- Spend by member, model, repo, branch, and PR. The breakdown whoever pays for the tokens keeps asking for.
- Claude Code with nothing to install. Point Claude Code's built-in telemetry at PromptConduit. Six settings
- Every tool in one view. Claude Code, Cursor, Codex, Gemini CLI, Copilot, and Grok Build, captured by the same CLI.
- Per client, for agencies. The repo view is spend per client: re-bill it or price the next fixed bid. How agencies use it
- Budgets with alerts. A monthly budget for the team, a repo, or a member, with an alert at 80% and 100% by email and in Slack.
- On the pull request. GitHub PR comments show the AI spend behind each change.
field_notes
Guides to what the numbers mean.
From the blog
- Claude Code OpenTelemetry: Track Cost per Developer and Repo
Use Claude Code's built-in OpenTelemetry export to track cost per developer and repository. The settings, the api_request event fields, the gotchas (no default protocol, repo attributes off by default), and where to send it.
- Cursor Expense Tracker for Teams: Spend per Developer, Repo, and Client
Track what your team spends on Cursor per developer, repository, pull request, and client. What Cursor's team dashboard covers, what it leaves out, and how to fill the gap with budgets and alerts.
- How to Attribute Claude Code and Cursor Spend to Teams and Repos
Attribute AI coding spend from Claude Code, Cursor, Codex, and Gemini CLI to each developer, repository, pull request, and client. The options per tool, what each one misses, and a setup that covers all of them.
Coaching guides
- Adopt skills and slash-commands
Capture repeatable work as skills instead of retyping long prompts.
- Batch your tool calls
Grouping independent reads and edits cuts round-trips and output tokens.
- Delegate with subagents
Parallel agents cover more ground and keep your main context clean.
$ curl -fsSL https://promptconduit.dev/install | bash $ promptconduit init ✓ hooks installed — capturing to ~/.promptconduit/events.jsonl