{"id":49961265,"url":"https://github.com/omrikais/cctally","last_synced_at":"2026-06-15T07:02:11.488Z","repository":{"id":356684012,"uuid":"1228680723","full_name":"omrikais/cctally","owner":"omrikais","description":"Claude Code usage tracker and local dashboard for Pro/Max subscription limits - weekly cost-per-percent trend, quota forecasts, threshold alerts. ccusage-compatible.","archived":false,"fork":false,"pushed_at":"2026-06-11T21:59:10.000Z","size":20022,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-11T23:12:59.585Z","etag":null,"topics":["anthropic","ccusage","ccusage-alternative","claude","claude-code","claude-code-cost","claude-code-dashboard","claude-code-quota","cli","codex","cost-tracking","dashboard","developer-tools","homebrew","npm-package","productivity","python","quota-tracking","tui","usage-tracker"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/cctally","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/omrikais.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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-04T09:05:02.000Z","updated_at":"2026-06-11T21:59:14.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/omrikais/cctally","commit_stats":null,"previous_names":["omrikais/cctally"],"tags_count":66,"template":false,"template_full_name":null,"purl":"pkg:github/omrikais/cctally","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omrikais%2Fcctally","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omrikais%2Fcctally/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omrikais%2Fcctally/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omrikais%2Fcctally/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omrikais","download_url":"https://codeload.github.com/omrikais/cctally/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omrikais%2Fcctally/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34236552,"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":["anthropic","ccusage","ccusage-alternative","claude","claude-code","claude-code-cost","claude-code-dashboard","claude-code-quota","cli","codex","cost-tracking","dashboard","developer-tools","homebrew","npm-package","productivity","python","quota-tracking","tui","usage-tracker"],"created_at":"2026-05-18T02:36:49.671Z","updated_at":"2026-06-15T07:02:11.483Z","avatar_url":"https://github.com/omrikais.png","language":"Python","funding_links":[],"categories":["Companion Apps \u0026 GUIs"],"sub_categories":["GateGuard — Fact-Forcing PreToolUse Gate"],"readme":"\u003cp align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"docs/img/logo-dark.png\"\u003e\n    \u003cimg src=\"docs/img/logo-light.png\" alt=\"cctally\" width=\"600\"\u003e\n  \u003c/picture\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eClaude Code usage tracker and local dashboard for Pro/Max subscription limits - weekly cost-per-percent trend, quota forecasts, threshold alerts. ccusage-compatible.\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/cctally\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/cctally.svg\" alt=\"npm version\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/cctally\"\u003e\u003cimg src=\"https://img.shields.io/npm/dm/cctally.svg\" alt=\"npm downloads\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/omrikais/cctally/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/omrikais/cctally.svg\" alt=\"Apache-2.0 license\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/omrikais/cctally/stargazers\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/omrikais/cctally.svg\" alt=\"GitHub stars\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nIf you're using `ccusage` to watch Claude Code spend, `cctally` covers the same ground and adds the parts you reach for next: a live web dashboard, a forecast that tells you whether you're going to cap this week, threshold alerts when you cross a percent, and a persistent week-over-week trend of cost per percent of quota. All local, no account, no telemetry.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/img/dashboard-desktop.png\" alt=\"cctally dashboard, desktop view\" width=\"900\"\u003e\n\u003c/p\u003e\n\n## Installation\n\n**Requirements:** Python 3.11+, macOS or Linux, Claude Code installed and run at least once.\n\n### Homebrew (macOS / Linux)\n\n```bash\nbrew install omrikais/cctally/cctally\ncctally setup\n```\n\n### npm\n\n```bash\nnpm install -g cctally\ncctally setup\n```\n\nNeeds Python 3. If `cctally setup` fails with \"python3 not found\", install it with `brew install python` (macOS) and try again.\n\n### From source\n\n```bash\ngit clone https://github.com/omrikais/cctally\ncd cctally\n./bin/cctally setup\n```\n\n`cctally setup` (any channel) symlinks the binaries into `~/.local/bin/`, adds three additive hooks to `~/.claude/settings.json` (never overwrites existing entries), and bootstraps the local SQLite cache. If `~/.local/bin/` isn't on your PATH, the script prints the line to add.\n\n```bash\ncctally setup --status     # verify hooks + symlinks\ncctally daily              # cost-by-day, your first table\ncctally dashboard          # opens http://127.0.0.1:8789\n```\n\nFor status-line integration, alerts, and configuration, see [docs/installation.md](docs/installation.md) and [docs/configuration.md](docs/configuration.md).\n\n## What it looks like\n\n### Dashboard\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003cimg src=\"docs/img/dashboard-modal.png\" alt=\"Dashboard with trend modal open\"\u003e\n      \u003cbr\u003e\u003cem\u003eAny panel expands into a focused view. The trend modal shows twelve weeks of cost per percent.\u003c/em\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n      \u003cimg src=\"docs/img/dashboard-warn.png\" alt=\"Dashboard in warn state\"\u003e\n      \u003cbr\u003e\u003cem\u003eWhen the forecast projects a cap before the weekly reset, the modal goes amber.\u003c/em\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"2\" align=\"center\"\u003e\n      \u003cimg src=\"docs/img/dashboard-mobile.png\" alt=\"Dashboard on phone\" width=\"350\"\u003e\n      \u003cbr\u003e\u003cem\u003eThe same dashboard on your phone.\u003c/em\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n### CLI tables\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/img/cli-report.svg\" alt=\"cctally report: $ per 1% weekly trend\"\u003e\n  \u003cbr\u003e\n  \u003cem\u003eWeekly cost as dollars per percent of quota, with the delta against the prior week.\u003c/em\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/img/cli-forecast.svg\" alt=\"cctally forecast: will I cap this week?\"\u003e\n  \u003cbr\u003e\n  \u003cem\u003eProjected percent at the weekly reset, plus the daily budget to stay under the cap.\u003c/em\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/img/cli-five-hour-blocks.svg\" alt=\"cctally five-hour-blocks: 5h analytics with model breakdown\"\u003e\n  \u003cbr\u003e\n  \u003cem\u003eEach 5-hour window, broken down by model.\u003c/em\u003e\n\u003c/p\u003e\n\n### Live terminal\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/img/cli-tui.svg\" alt=\"cctally tui: live terminal dashboard\"\u003e\n  \u003cbr\u003e\n  \u003cem\u003eThe same data in the terminal, refreshed live.\u003c/em\u003e\n\u003c/p\u003e\n\n## What cctally adds\n\n`cctally` started as a local-first replacement for [`ccusage`](https://github.com/ryoppippi/ccusage), and it stays compatible at the level of common CLI flows (`daily`, `monthly`, `weekly`, `session`, `blocks`). Paste from ccusage verbatim: `cctally claude \u003ccmd\u003e` is a drop-in for `ccusage claude \u003ccmd\u003e` (and `cctally codex \u003ccmd\u003e` for `ccusage codex \u003ccmd\u003e`), with the flat forms (`cctally daily`, `cctally codex-daily`, …) kept as aliases. Beyond that, it adds:\n\n- **Live web dashboard.** Nine-panel SSE-driven view at `localhost:8789` (current week, forecast, trend, sessions, weekly, monthly, blocks, daily, recent alerts), with per-panel modals, a mobile layout, threshold alerts, and a settings drawer.\n- **TUI live mode.** The same data inside your terminal (`cctally tui`; requires the optional `rich` package).\n- **$-per-1% weekly trend.** The `report` table reframes weekly cost as cost-per-percent-of-quota, so spending efficiency is visible week over week.\n- **Forecast.** Projects current-week percent and daily $/% budgets against the 100% and 90% ceilings (`cctally forecast`).\n- **Threshold alerts.** Configurable percent crossings with native macOS popups (`cctally alerts`).\n- **5-hour block analytics.** Per-block usage with model and project breakdowns (`cctally five-hour-blocks --breakdown=model`).\n- **Time-window diff.** Compare two windows with model and project decomposition (`cctally diff`).\n- **Project rollup.** Usage by Git project (`cctally project`).\n- **Codex parity.** `cctally codex daily / monthly / session` are drop-ins for `ccusage codex daily / monthly / session`; the flat `codex-*` forms (drop-ins for the standalone `ccusage-codex` binary) remain as aliases, plus an added `cctally codex weekly` / `cctally codex-weekly` rollup (upstream has no `codex weekly`).\n- **Persistent SQLite.** Week-over-week comparisons survive across runs.\n\n**On speed.** Pricing is embedded and computed at query time from a delta-tail SQLite cache (`~/.local/share/cctally/cache.db`), with no shell-outs. First-table latency on 30 days of session data: **~2.6s (cctally) vs ~31s (ccusage)**, about 12× faster. Measured by `bench/cctally-vs-ccusage.sh` on macOS arm64, 2026-05-05; your numbers will vary.[^bench]\n\n\u003c!--\n  Footnote target uses an absolute URL because GitHub's relative-link\n  rewriter doesn't traverse into GFM footnote `\u003cli\u003e` content; on the\n  repo home page (`/omrikais/cctally`, no trailing slash) the browser\n  would resolve `bench/README.md` against the page URL and produce\n  `/omrikais/bench/README.md` — a broken path. Regular paragraph links\n  are unaffected.\n--\u003e\n[^bench]: Methodology and reproduction: [`bench/README.md`](https://github.com/omrikais/cctally/blob/main/bench/README.md).\n\n## Documentation\n\n- [Installation](docs/installation.md): symlinks, status-line wiring, Python version.\n- [Configuration](docs/configuration.md): `config.json` shape and week-start rules.\n- [Architecture](docs/architecture.md): data flow, caches, week boundaries.\n- [Runtime data](docs/runtime-data.md): what lives in `~/.local/share/cctally/`.\n- [Command reference](docs/commands/): one page per subcommand.\n\n## License\n\nApache 2.0. See [`LICENSE`](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomrikais%2Fcctally","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomrikais%2Fcctally","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomrikais%2Fcctally/lists"}