{"id":51136185,"url":"https://github.com/contember/tokens-gone","last_synced_at":"2026-06-25T18:01:47.982Z","repository":{"id":357098538,"uuid":"1235374975","full_name":"contember/tokens-gone","owner":"contember","description":"Local dashboard for Claude Code token usage and costs. Reads ~/.claude/projects/**/*.jsonl, aggregates spend, slices interactively.","archived":false,"fork":false,"pushed_at":"2026-06-10T14:49:06.000Z","size":232,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-10T16:24:12.142Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/tokens-gone","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/contember.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-11T09:06:48.000Z","updated_at":"2026-06-10T14:54:13.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/contember/tokens-gone","commit_stats":null,"previous_names":["contember/tokens-gone"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/contember/tokens-gone","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contember%2Ftokens-gone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contember%2Ftokens-gone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contember%2Ftokens-gone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contember%2Ftokens-gone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/contember","download_url":"https://codeload.github.com/contember/tokens-gone/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contember%2Ftokens-gone/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34786238,"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-25T02:00:05.521Z","response_time":101,"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":[],"created_at":"2026-06-25T18:01:47.182Z","updated_at":"2026-06-25T18:01:47.974Z","avatar_url":"https://github.com/contember.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tokens-gone\n\nLocal web dashboard for Claude Code token usage and cost. Reads\n`~/.claude/projects/**/*.jsonl`, aggregates tokens and dollars, lets you slice\nthe data interactively.\n\n## Run\n\n```bash\nnpx tokens-gone\n```\n\nThat's it — it builds nothing on your machine, starts a local HTTP server,\nand opens your browser at the dashboard. Subsequent runs reuse the on-disk\nparse cache (`~/.cache/tokens-gone/cache.json`), so warm scans are sub-second\neven with thousands of session files.\n\n### Flags\n\n```\n-p, --port \u003cn\u003e   Port to listen on (default 27821, or $PORT)\n--no-open        Don't open the browser\n-h, --help       Show help\n-v, --version    Print version\n```\n\n### Environment\n\n- `CLAUDE_CONFIG_DIR` — override the Claude data dir (default `~/.claude`).\n- `PORT` — same as `--port`.\n\n## Why\n\n`ccusage` works but is slow (tens of seconds on real data) and refetches\nLiteLLM pricing every run. tokens-gone is the same idea but:\n\n- Cold scan: ~8s for 1.7GB of JSONL (5000+ files); warm: ~700ms.\n- Hardcoded Anthropic pricing — no network requests, ever.\n- Browser UI with click-to-filter on charts, models, projects, sessions.\n\n## How it works\n\n- `server/scanner.ts` walks `~/.claude/projects/`, parses JSONL streamingly,\n  caches parsed entries on disk keyed by `(path, size, mtime)`. Unchanged\n  files are reused verbatim; appended files are tail-parsed.\n- `server/pricing.ts` resolves Anthropic Claude pricing by model name\n  substring (matches `claude-opus-4-7`, `anthropic/claude-sonnet-4-6`, etc.),\n  with tiered pricing for Sonnet \u003e200k and a 6× fast-mode multiplier for Opus.\n- `server/server.ts` exposes `/api/data` (gzipped) and `/api/refresh`.\n- The SPA loads all entries once and re-aggregates client-side on every\n  filter change — fast enough for ~300k entries.\n\n## Development\n\nRequires [Bun](https://bun.sh) for the dev/test loop. The published package\nruns on plain Node 20+.\n\n```bash\nbun install\nbun run dev                # backend on :27821 + vite on :5173 (open :5173)\nbun run dev:server         # just the backend (--hot)\nbun run dev:client         # just vite\n\nbun test\nbun run typecheck\nbun run build              # vite build + esbuild bundle of the server CLI\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontember%2Ftokens-gone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcontember%2Ftokens-gone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontember%2Ftokens-gone/lists"}