{"id":49570070,"url":"https://github.com/fr-enterprises/agent-budget","last_synced_at":"2026-05-03T13:19:45.337Z","repository":{"id":355239190,"uuid":"1227323151","full_name":"fr-enterprises/agent-budget","owner":"fr-enterprises","description":"See what your Claude Code agents are costing you. Reads ~/.claude/projects transcripts → USD breakdown by project, day, session.","archived":false,"fork":false,"pushed_at":"2026-05-02T18:39:46.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-02T20:34:10.865Z","etag":null,"topics":["ai-agents","bun","claude-code","cli","cost-tracking"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fr-enterprises.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-02T14:22:51.000Z","updated_at":"2026-05-02T18:39:48.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/fr-enterprises/agent-budget","commit_stats":null,"previous_names":["f4rkh4d/agent-budget","fr-enterprises/agent-budget"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/fr-enterprises/agent-budget","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fr-enterprises%2Fagent-budget","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fr-enterprises%2Fagent-budget/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fr-enterprises%2Fagent-budget/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fr-enterprises%2Fagent-budget/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fr-enterprises","download_url":"https://codeload.github.com/fr-enterprises/agent-budget/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fr-enterprises%2Fagent-budget/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32570259,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agents","bun","claude-code","cli","cost-tracking"],"created_at":"2026-05-03T13:19:44.358Z","updated_at":"2026-05-03T13:19:45.330Z","avatar_url":"https://github.com/fr-enterprises.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# agent-budget\n\nsee what your Claude Code agents are actually costing you.\n\n[![release](https://img.shields.io/github/v/release/fr-enterprises/agent-budget?style=flat-square\u0026color=000)](https://github.com/fr-enterprises/agent-budget/releases)\n[![license](https://img.shields.io/github/license/fr-enterprises/agent-budget?style=flat-square\u0026color=000)](LICENSE)\n[![downloads](https://img.shields.io/github/downloads/fr-enterprises/agent-budget/total?style=flat-square\u0026color=000)](https://github.com/fr-enterprises/agent-budget/releases)\n\n\u003c/div\u003e\n\nreads `~/.claude/projects/\u003cencoded-cwd\u003e/\u003csession\u003e.jsonl` — the transcript files Claude Code already writes — and converts them into a USD bill at current Anthropic list prices. no telemetry, no extra config, no API keys. just `ab today` and you know.\n\n```\n$ ab today\ntoday (2026-05-02)  $1069\n\n  /Users/bennett/Projects     ████████████████████████   $1067  in 1k · out 801k · cache r/w 568M/5M\n  /Users/bennett/Desktop/...  █                          $1.83  in 78 · out 1k · cache r/w 3M/134k\n```\n\n```\n$ ab top 5\ntop 5 sessions, all-time  $16709\n\n  /Users/bennett/Projects::2b47b4dd... ██████  $3971\n  /Users/bennett/Projects::cf17f347... █████   $3665\n  ...\n```\n\n## why\n\nClaude Code shows you tokens, not money. if you're paying per token (API or any pay-as-you-go plan), there's no way to see which project is the budget hole until the invoice arrives. `agent-budget` is the answer key.\n\n## install\n\n```sh\ncurl -fsSL https://raw.githubusercontent.com/fr-enterprises/agent-budget/main/install.sh | bash\n```\n\nor grab a binary from [Releases](https://github.com/fr-enterprises/agent-budget/releases).\n\nor build from source — bun, no deps:\n\n```sh\nbun run build\n./dist/ab today\n```\n\n## commands\n\n| | |\n|---|---|\n| `ab today` | spend so far today, by project |\n| `ab week` | last 7 days, by day |\n| `ab month` | last 30 days, by project |\n| `ab top [N]` | highest-spend sessions all-time (default 10) |\n| `ab project \u003cpath\u003e` | breakdown for one project (last 60 days) |\n| `ab session \u003cid\u003e` | breakdown for sessions matching a substring |\n| `ab live` | tail the active session and stream cost as turns happen |\n| `ab raw` | dump every assistant turn as one JSON line — pipe into `jq`, `duckdb`, whatever |\n\n`today`, `week`, `month`, `top`, `project`, `session` all accept `--json` for piping. set `NO_COLOR=1` (or pipe stdout) to drop ANSI codes.\n\n## pricing\n\nuses public Anthropic list prices (May 2026). if you're on a flat subscription (Claude Pro / Claude Max), the dollar number is theoretical — it's what the same usage would cost on the API. useful for comparing projects against each other and for cost-modelling if you ever leave the subscription.\n\npricing table is hardcoded in [`src/pricing.ts`](src/pricing.ts) — PRs welcome when Anthropic moves prices.\n\n## what it counts\n\nper assistant turn: `input_tokens`, `output_tokens`, `cache_creation_input_tokens` split into 5m / 1h ephemeral, `cache_read_input_tokens`. exactly what shows up in `message.usage` in the transcript.\n\nsystem tools the model invokes (web search, web fetch) aren't priced separately — Anthropic charges those alongside the parent turn's tokens, so they're already included.\n\n## honesty\n\n- this is a cost estimator, not your invoice. real billing has rounding, regional discounts, and minimums.\n- Anthropic occasionally adds new fields to the transcript schema. if a future model fits none of the known patterns, it's priced as Sonnet — that's a soft assumption, not a guarantee.\n- local-only. reads files on your disk. sends nothing anywhere.\n\n## license\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffr-enterprises%2Fagent-budget","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffr-enterprises%2Fagent-budget","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffr-enterprises%2Fagent-budget/lists"}