Metadata-Version: 2.4
Name: claude-cost
Version: 0.1.1
Summary: Live terminal dashboard for tracking Claude Code usage and costs
License: MIT
Project-URL: Homepage, https://github.com/mohsinahad/claude-cost
Project-URL: Repository, https://github.com/mohsinahad/claude-cost
Keywords: claude,anthropic,ai,usage,dashboard,terminal
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Utilities
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: rich>=13.0

# 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

```bash
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`:
> ```bash
> export PATH="$HOME/.local/bin:$PATH"
> ```

Then run:

```bash
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`:

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

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

```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/`)
