Skip to main content

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:

  1. Daily cost — date, era, cost, tokens, model mix (Opus / Sonnet / Haiku)
  2. Before vs After — window comparison split at a cutoff date
  3. 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

claude_cost_compare-0.1.0.tar.gz (28.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

claude_cost_compare-0.1.0-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

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

Hashes for claude_cost_compare-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2852655f04af0dc2f384e864dd08c0cfacaedf3548f51cda822be093f7c4f1cc
MD5 2363b4970261bc79a9c054b5dea2a9b7
BLAKE2b-256 e6bfd9fc2e37c7455da8f0ff8ee03bce731ea51c7c28e95d060b2a21b16bd70b

See more details on using hashes here.

Provenance

The following attestation bundles were made for claude_cost_compare-0.1.0.tar.gz:

Publisher: publish.yml on mazulo/claude-cost-compare

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file claude_cost_compare-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for claude_cost_compare-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3ed327625693b89e47915d8deba5b335e63c1ea4ac34b1b04d7e95f04133de12
MD5 d9c3515e040af206293315dc01fec139
BLAKE2b-256 9fa6831b4f4e41e7b2ff2c2ad273c20c77698f51821074929e903d8e3c05b2af

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page