Daily Claude cost analysis with before/after comparison and model health signals
Project description
claude-cost-compare
Daily Claude cost analysis with before/after comparison and model health signals.
Parses local usage data via ccusage and prints three tables:
- Daily cost — date, era, cost, tokens, model mix (Opus / Sonnet / Haiku)
- Before vs After — window comparison split at a cutoff date
- Real Signal — per-model health verdicts vs your baseline
Prerequisites
- Python 3.11+ (pip/uv install) or Homebrew
- ccusage:
npm install -g ccusage
Install
PyPI
pip install claude-cost-compare
# or
uv tool install claude-cost-compare
Homebrew
brew install patrickmazulo/claude-cost-compare/claude-cost-compare
npm install -g ccusage
Homebrew installs the CLI only. ccusage remains a separate npm peer dependency.
Usage
# Last 5 days vs today (default)
claude-cost-compare --range 5
# 7-day window split at a specific date
claude-cost-compare --range 7 --cutoff 2026-05-13
# Full billing period, split at May 13
claude-cost-compare --since 2026-05-01 --cutoff 2026-05-13
# Daily summary only — no comparisons
claude-cost-compare --summary --since 2026-05-01
Options
| Flag | Description |
|---|---|
--range, -r |
Days before cutoff for "before" window (default: 5) |
--cutoff, -c |
Before/after split date YYYY-MM-DD (default: today) |
--since, -s |
Explicit start date — overrides --range |
--summary |
Daily cost table only |
--plain |
Disable color (also respects NO_COLOR) |
Development
uv sync --dev
uv run pytest
uv run claude-cost-compare --range 5
Releasing
See docs/RELEASING.md for PyPI trusted publishing and Homebrew formula updates.
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file claude_cost_compare-0.1.0.tar.gz.
File metadata
- Download URL: claude_cost_compare-0.1.0.tar.gz
- Upload date:
- Size: 28.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2852655f04af0dc2f384e864dd08c0cfacaedf3548f51cda822be093f7c4f1cc
|
|
| MD5 |
2363b4970261bc79a9c054b5dea2a9b7
|
|
| BLAKE2b-256 |
e6bfd9fc2e37c7455da8f0ff8ee03bce731ea51c7c28e95d060b2a21b16bd70b
|
Provenance
The following attestation bundles were made for claude_cost_compare-0.1.0.tar.gz:
Publisher:
publish.yml on mazulo/claude-cost-compare
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claude_cost_compare-0.1.0.tar.gz -
Subject digest:
2852655f04af0dc2f384e864dd08c0cfacaedf3548f51cda822be093f7c4f1cc - Sigstore transparency entry: 1634051044
- Sigstore integration time:
-
Permalink:
mazulo/claude-cost-compare@08a0b288b13d8d43f113cb271f1e82b9e75a4400 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/mazulo
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@08a0b288b13d8d43f113cb271f1e82b9e75a4400 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file claude_cost_compare-0.1.0-py3-none-any.whl.
File metadata
- Download URL: claude_cost_compare-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ed327625693b89e47915d8deba5b335e63c1ea4ac34b1b04d7e95f04133de12
|
|
| MD5 |
d9c3515e040af206293315dc01fec139
|
|
| BLAKE2b-256 |
9fa6831b4f4e41e7b2ff2c2ad273c20c77698f51821074929e903d8e3c05b2af
|
Provenance
The following attestation bundles were made for claude_cost_compare-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on mazulo/claude-cost-compare
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claude_cost_compare-0.1.0-py3-none-any.whl -
Subject digest:
3ed327625693b89e47915d8deba5b335e63c1ea4ac34b1b04d7e95f04133de12 - Sigstore transparency entry: 1634051054
- Sigstore integration time:
-
Permalink:
mazulo/claude-cost-compare@08a0b288b13d8d43f113cb271f1e82b9e75a4400 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/mazulo
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@08a0b288b13d8d43f113cb271f1e82b9e75a4400 -
Trigger Event:
workflow_dispatch
-
Statement type: