Skip to main content

Live terminal dashboard for tracking Claude Code usage and costs

Project description

claude-cost

Live terminal dashboard for tracking Claude Code token usage and costs.

Install as a Claude Code skill

/plugin marketplace add mohsinahad/claudemeter
/plugin install claude-cost@claude-cost

Then use:

/claude-cost             # launch live dashboard in a new tab
/claude-cost summary     # print today/month costs inline
/claude-cost reset       # reset config to defaults

Install as a standalone CLI

pipx install claude-cost        # recommended
# or
pip install claude-cost

Note: If pip warns that the script is installed in ~/.local/bin which is not on PATH, add this to your ~/.zshrc or ~/.bashrc:

export PATH="$HOME/.local/bin:$PATH"

Then run:

claude-cost           # live dashboard
claude-cost summary   # quick inline summary
claude-cost reset     # reset config

Budget alerts

Set spending limits in ~/.claude/dashboard_config.json:

{
  "daily_budget": 5.00,
  "monthly_budget": 50.00
}

To get automatic warnings after each Claude session, add a hook to ~/.claude/settings.json:

{
  "hooks": {
    "Stop": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "claude-cost check-budget"
          }
        ]
      }
    ]
  }
}

Claude will print a warning in your session whenever you hit 80% or 100% of your budget.

Usage

claude-cost --help     # show help
claude-cost --version  # show version
claude-cost            # launch the dashboard
claude-cost summary    # print costs inline (no TUI)
claude-cost check-budget  # check limits (exits 2 if over 80%)
claude-cost reset      # reset config to defaults

Keys inside the dashboard:

Key Action
q Quit
r Refresh
1 Last 24 hours
7 Last 7 days
3 Last 30 days

What it shows

  • Token usage (input / output / cached) per model
  • Cost breakdown by session and cumulative
  • Human cost estimate (time saved vs. manual coding)
  • Live-updating as you work

No API key or extra config needed — reads directly from ~/.claude/.

Requirements

  • Python 3.11+
  • Claude Code installed and used at least once (data lives in ~/.claude/)

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-0.2.0.tar.gz (15.4 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-0.2.0-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file claude_cost-0.2.0.tar.gz.

File metadata

  • Download URL: claude_cost-0.2.0.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for claude_cost-0.2.0.tar.gz
Algorithm Hash digest
SHA256 08fc4538c3370d08fa14b7b38ced678385180bff61622ae76e7f4eca27a8ab4c
MD5 628c59e4b9f1e877f3af7fc190a35dee
BLAKE2b-256 88629b1976cad6750c969bfd8cf779a8e86a6de7766a6ff66578f57dd73ba1cd

See more details on using hashes here.

Provenance

The following attestation bundles were made for claude_cost-0.2.0.tar.gz:

Publisher: publish.yml on mohsinahad/claude-cost

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-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: claude_cost-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for claude_cost-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 365d142f078472548ea3d4c2b57c7f0e2c952778b8490e6f9bbc2f922ad7baed
MD5 d2bdd245f9d4bf3747691b20abb32f4f
BLAKE2b-256 b23babd87e4934d954a0b9b76f476002e0cae4f4dad3c428cba069c410e1a8dc

See more details on using hashes here.

Provenance

The following attestation bundles were made for claude_cost-0.2.0-py3-none-any.whl:

Publisher: publish.yml on mohsinahad/claude-cost

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