{"id":50805648,"url":"https://github.com/realkenlee/vibecheck","last_synced_at":"2026-06-13T01:01:02.898Z","repository":{"id":363951433,"uuid":"1265703957","full_name":"realkenlee/vibecheck","owner":"realkenlee","description":"vibecheck — know where your AI coding tokens go. Local-first analytics for Claude Code \u0026 Codex: spend, activities, budget burn-down. Nothing leaves your machine.","archived":false,"fork":false,"pushed_at":"2026-06-12T06:01:45.000Z","size":154,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-12T06:22:20.726Z","etag":null,"topics":["ai-coding","analytics","claude-code","codex","local-first","token-usage"],"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/realkenlee.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-06-11T02:31:34.000Z","updated_at":"2026-06-12T06:01:47.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/realkenlee/vibecheck","commit_stats":null,"previous_names":["realkenlee/vibevitals","realkenlee/vibecheck"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/realkenlee/vibecheck","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realkenlee%2Fvibecheck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realkenlee%2Fvibecheck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realkenlee%2Fvibecheck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realkenlee%2Fvibecheck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/realkenlee","download_url":"https://codeload.github.com/realkenlee/vibecheck/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realkenlee%2Fvibecheck/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34268189,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-coding","analytics","claude-code","codex","local-first","token-usage"],"created_at":"2026-06-13T01:00:58.611Z","updated_at":"2026-06-13T01:01:02.880Z","avatar_url":"https://github.com/realkenlee.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🩺 vibecheck\n\n[![ci](https://github.com/realkenlee/vibecheck/actions/workflows/ci.yml/badge.svg)](https://github.com/realkenlee/vibecheck/actions/workflows/ci.yml)\n\n**Know where your AI coding tokens go.** Local-first analytics for Claude Code and Codex sessions — spend, activities, budget burn-down. Free forever for individuals.\n\n```\nnpx vibe-check\n```\n\n```\n  🩺 vibecheck  ·  all time  ·  all data stays local\n\n  $239 API-equivalent spend   │   477.8M tokens   │   45 sessions   │   20h agent runtime (≈$12/h)   │   $1,212 saved by caching\n\n  Budget (2026-06)   $122 of $200  ▕████████░░░░░░▏ 61%   day 10/30 · projected $367 ⚠ over pace\n\n  Where tokens go  (by dominant activity per turn)\n  activity     turns  tokens     cost  share\n  ───────────  ─────  ──────  ───────  ─────\n  executing     2262  229.2M     $107    45%\n  editing        728   87.1M   $44.82    19%\n  reasoning      784   77.6M   $41.89    17%\n  exploring      716   67.1M   $34.51    14%\n\n  By model                              By branch  (Claude Code sessions)\n  model               calls    cost     branch              calls    cost\n  ─────────────────   ─────  ──────     ─────────────────   ─────  ──────\n  claude-sonnet-4-6    3937    $214     feat/q2-migration    1582  $85.76\n  gpt-5.3-codex         171   $3.34     main                 1303  $54.14\n\n  When you vibe  (events by hour, local time)\n  00 ▁   ▂▃█▃▆▃▃▃▂▃▃▃▆▅▃▄▃▅▂  23\n\n  Doctor's notes\n  ⚠ Context tax: 6 sessions ran past 100 turns — late turns re-read ~109k cached\n    tokens apiece vs ~29k early, ≈ $84 of pure re-reading. Context is rent,\n    not a purchase: /compact or restart between tasks.\n  ⚠ Re-read tax: 351 repeat file reads inside sessions (~1.5MB re-entering\n    context) — main.py alone was read 85× in one session.\n  · All 32 compactions were auto-forced at the context ceiling — each shed ~155k\n    tokens you'd been re-paying every turn.\n  · 44% of spend is command-running turns. Verbose build/test output is\n    token-hungry — pipe through tail/grep, silence noisy commands.\n  ✓ Healthy cache: 99% of input was served from cache, saving $851 vs list price.\n  ✓ Lean tool results: ~1.5KB per tool turn on average.\n```\n\n## The problem\n\nEvery developer now has an AI usage limit — and no instrument panel. Your agents already log everything (every token, tool call, and model) into local JSONL files nobody reads. vibecheck reads them and answers:\n\n- **Am I going to blow my monthly limit?** — `--budget` burn-down with projection to month end\n- **What activities eat my tokens?** — editing vs. executing vs. exploring vs. reasoning, per turn\n- **What did that branch cost?** — spend by branch, project, model, agent, and day\n- **What is caching saving me?** — vs. API list price (often 5× the headline spend)\n\nOne normalized report across Claude Code and Codex. More agents coming.\n\n## Privacy\n\n**Everything runs locally. Nothing leaves your machine.** No telemetry, no accounts, no uploads. It's a read-only parser over files you already have. Prompt and code content is never parsed — only token counts, models, tool names, and timestamps.\n\n## Install\n\n```bash\nnpx vibe-check        # zero-install — if you run Claude Code, you already have Node\n```\n\nNo Node? Locked-down laptop? Grab a **single-file executable** from\n[Releases](../../releases) (macOS arm64/x64, Linux x64/arm64, Windows) — no runtime,\nno dependencies, one artifact to checksum and allowlist.\n\n### No install at all — as a Claude Code skill\n\nYou already have an agent that can read the logs. Install vibecheck as a [skill](skill/SKILL.md):\n\n```bash\nmkdir -p ~/.claude/skills/vibecheck \u0026\u0026 curl -fsSL https://raw.githubusercontent.com/realkenlee/vibecheck/main/skill/SKILL.md -o ~/.claude/skills/vibecheck/SKILL.md\n```\n\nThen ask Claude Code *\"where do my AI tokens go?\"* (or run `/vibecheck`). The skill encodes the\nsame parsing rules this CLI is tested against — message-id dedupe, cache-subset splits, list\nprices — and instructs Claude to compute via a throwaway script, never by reading your logs\ninto context. Same privacy contract: everything stays local.\n\n## Usage\n\n```bash\nnpx vibe-check                   # full report, all time\nnpx vibe-check --days 30         # last 30 days\nnpx vibe-check --month 2026-05   # one calendar month (reconciliation)\nnpx vibe-check --project api     # scope everything to one project (any substring)\nnpx vibe-check --branch q2-migration   # …or to one git branch — what did it cost?\nnpx vibe-check --agent codex     # one agent only: claude-code | codex\nnpx vibe-check months            # month-over-month trend with Δ%\nnpx vibe-check --budget 200      # monthly soft limit → burn-down + projection\nnpx vibe-check doctor            # just the diagnosis — doctor's notes only\nnpx vibe-check doctor --fail-on-warn   # exit 1 on any ⚠ note — CI hygiene gate\nnpx vibe-check sessions          # most expensive sessions, span + turns\nnpx vibe-check sessions \u003cid\u003e     # drill in: gaps, compactions, activity split\nnpx vibe-check wrapped --out wrapped.svg   # shareable card (aggregates only)\nnpx vibe-check wrapped --month 2026-06 --out june.svg   # \"AI Coding Wrapped · June 2026\"\nnpx vibe-check web               # static HTML dashboard — no server, opens in browser\nnpx vibe-check --json            # machine-readable, pipe it anywhere\n```\n\nSet `VIBECHECK_BUDGET=200` to make the budget bar permanent.\n\n`wrapped` renders a 1200×630 card built to be posted — aggregate numbers only, never project or branch names (sample below uses synthetic data):\n\n\u003cimg src=\"docs/wrapped-sample.svg\" alt=\"AI Coding Wrapped sample card (synthetic data)\" width=\"600\"\u003e\n\n\nOr as a library:\n\n```ts\nimport { parseClaudeDir, totals, byActivity, budgetStatus } from 'vibe-check'\n\nconst { events } = parseClaudeDir(`${process.env.HOME}/.claude/projects`)\nconsole.log(byActivity(events))\n```\n\n## For teams \u0026 enterprise\n\nICs get visibility for free. Engineering leaders get the questions ICs can't answer alone: *is our AI spend producing edits or spinning on retries? Which teams are over their soft limits? What did the migration actually cost?*\n\nThe bridge is `vibecheck export` — an **aggregates-only** JSON report each developer can inspect line-by-line before sharing:\n\n```bash\nvibecheck export --days 30 --out report.json   # totals, activities, models, daily spend\nvibecheck export --anonymous                   # …without your git name/email\nvibecheck export --include-projects            # opt-in: project + branch names\n```\n\nBy default the export contains **no prompts, no code, no file paths, no session ids, no project or branch names** — read [`src/export.ts`](src/export.ts), it's one screen of code. The full schema is documented in [`docs/report-schema.md`](docs/report-schema.md) (additive-only within v1; a test keeps doc and code in sync). Doctor's notes travel as **stable ids + levels only** (never the rendered text); the id vocabulary is documented in [`docs/doctor-notes.md`](docs/doctor-notes.md).\n\n**vibecheck for Teams** (hosted rollups, org-wide burn-down, activity benchmarks, gateway-level capture) is in design. Interested? → khflee@gmail.com\n\n## Supported agents\n\n| Agent | Data source | Status |\n|---|---|---|\n| Claude Code | `~/.claude/projects/**/*.jsonl` | ✅ |\n| OpenAI Codex CLI | `~/.codex/sessions/**/*.jsonl` | ✅ |\n| Gemini CLI | — | planned |\n| Cursor | — | planned |\n| opencode | — | planned |\n\n## Accuracy notes\n\n- Costs are **API list-price estimates** (per-MTok rates in [`src/pricing.ts`](src/pricing.ts)). Subscription users: read it as \"value consumed,\" not \"money billed.\"\n- Claude Code streams duplicate assistant records — vibecheck dedupes by message id (naive parsers over-count by ~30%).\n- Codex `cached_input_tokens` is a subset of `input_tokens` — vibecheck splits it out before pricing.\n- Activity attribution is per-turn by dominant tool (precedence: editing \u003e executing \u003e delegating \u003e exploring \u003e planning). Read it as \"cost of turns spent doing X.\"\n- Unparseable lines are counted and surfaced — these JSONL schemas are undocumented and drift between agent versions. If you see the schema-drift warning, please [file a drift report](../../issues/new?template=schema-drift.yml) — it asks for counts and key names only, never your transcripts.\n\n## Development\n\nParsers are the product, so everything is fixture-tested:\n\n```bash\nnpm install\nnpm test        # 112 tests over synthetic fixtures encoding every schema gotcha\nnpm run dev     # build + run against your own sessions\n```\n\n## Roadmap\n\n- [x] Activity attribution (\"where tokens go\")\n- [x] Budget burn-down with month-end projection\n- [x] Branch-level cost attribution\n- [x] Aggregates-only team export\n- [x] Session drill-down (`vibecheck sessions`, per-session detail via `sessions \u003cid\u003e`)\n- [x] Doctor's notes (actionable diagnosis: cache health, context tax, idle gaps, compaction receipts, re-read tax, failure tax, verbosity drift)\n- [x] \"AI Coding Wrapped\" shareable card (`vibecheck wrapped`, SVG, aggregates only)\n- [x] Local dashboard (`vibecheck web` — single static HTML file, no server, no JS)\n- [ ] Gemini CLI, Cursor, opencode parsers\n- [ ] vibecheck for Teams (hosted)\n\n## License\n\nMIT — free for everyone, forever. The CLI will never phone home.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealkenlee%2Fvibecheck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frealkenlee%2Fvibecheck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealkenlee%2Fvibecheck/lists"}