Skip to main content

Terminal-based Claude Code usage limit visualizer with real-time burn-up charts

Project description

🔥 ccburn

CI Release npm PyPI Python GitHub Release WinGet npm downloads PyPI downloads GitHub downloads License

Burning tokens

Watch your tokens burn — before you get burned.

TUI and CLI for Claude Code usage limits — burn-up charts, compact mode for status bars, JSON for automation.

ccburn screenshot

Features

  • Real-time burn-up charts — Visualize session and weekly usage with live-updating terminal graphics
  • Pace indicators — 🧊 Cool. 🔥 On pace. 🚨 Too hot.
  • Multiple output modes — Full TUI, compact single-line for status bars, or JSON for scripting
  • Automatic data persistence — SQLite-backed history for trend analysis
  • Dynamic window title — Terminal tab shows current usage at a glance
  • Zoom views — Focus on recent activity with --since

Installation

Run claude and login first to refresh credentials.

WinGet (Windows)

winget install JuanjoFuchs.ccburn

npx

npx ccburn

npm

npm install -g ccburn

pip

pip install ccburn

From Source

git clone https://github.com/JuanjoFuchs/ccburn.git
cd ccburn
pip install -e ".[dev]"

Quick Start

  1. Run Claude Code first to ensure credentials are fresh:
    claude
    
  2. Run ccburn:
    ccburn              # Session limit (default)
    ccburn weekly       # Weekly limit
    ccburn weekly-sonnet # Weekly Sonnet limit
    

Usage Examples

# Full TUI with burn-up chart (default)
ccburn

# Weekly usage view
ccburn weekly

# Compact output for tmux/status bars
ccburn --compact
# Output: Session: 🔥 45% (2h14m) | Weekly: 🧊 12% | Sonnet: 🧊 3%

# JSON output for scripting/automation
ccburn --json

# Zoom to last 30 minutes
ccburn --since 30m

# Single snapshot (no live updates)
ccburn --once

# Custom refresh interval (seconds)
ccburn --interval 10

Command Line Reference

Usage: ccburn [OPTIONS] [LIMIT]

Arguments:
  [LIMIT]  Which limit to display [default: session]
           Options: session, weekly, weekly-sonnet

Options:
  -i, --interval INTEGER  Refresh interval in seconds [default: 5/30]
  -s, --since TEXT        Only show data since (e.g., 30m, 2h, 1d)
  -j, --json              Output JSON and exit
  -o, --once              Print once and exit (no live updates)
  -c, --compact           Single-line output for status bars
  --debug                 Show debug information
  --version               Show version and exit
  --help                  Show this message and exit

Pace Indicators

Emoji Status Meaning
🧊 Behind pace Usage below expected budget — you have headroom
🔥 On pace Usage tracking with expected budget
🚨 Ahead of pace Usage above expected budget — slow down!

Requirements

  • Python 3.10+
  • Claude Code installed with valid credentials
  • Terminal with Unicode support (for charts and emojis)

How It Works

ccburn reads your Claude Code credentials and fetches usage data from the Anthropic API. It calculates:

  • Budget pace — Where you "should" be based on time elapsed in the window
  • Burn rate — How fast you're consuming your limit
  • Time to limit — Estimated time until you hit 100% (if current rate continues)

Data is stored locally in SQLite for historical analysis and to minimize API calls when running multiple instances.

Troubleshooting

"Credentials not found"

Ensure Claude Code is installed and you've logged in at least once:

claude  # This will prompt for login if needed

Chart not displaying correctly

Ensure your terminal supports Unicode and has a monospace font with emoji support. Recommended terminals:

  • Windows: Windows Terminal
  • macOS: iTerm2, Terminal.app
  • Linux: Kitty, Alacritty, GNOME Terminal

Stale data indicator

If you see "(stale)" in the header, ccburn couldn't reach the API. It will continue showing cached data and retry automatically.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT

Acknowledgments

  • Rich — Beautiful terminal formatting
  • Plotext — Terminal plotting
  • Typer — CLI framework

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

ccburn-0.4.2.tar.gz (40.6 kB view details)

Uploaded Source

Built Distribution

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

ccburn-0.4.2-py3-none-any.whl (39.2 kB view details)

Uploaded Python 3

File details

Details for the file ccburn-0.4.2.tar.gz.

File metadata

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

File hashes

Hashes for ccburn-0.4.2.tar.gz
Algorithm Hash digest
SHA256 21fb0e0f9e034b2385281837ea6170a59186380304f1a4967cc49d74e7009d9d
MD5 2b1b99bdfa56f53fa415989c063872a5
BLAKE2b-256 776ffa4fce8d16d9938c6ead6316372ccfc50793c6cb3bb0537e9f148c1bd416

See more details on using hashes here.

Provenance

The following attestation bundles were made for ccburn-0.4.2.tar.gz:

Publisher: release.yml on JuanjoFuchs/ccburn

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

File details

Details for the file ccburn-0.4.2-py3-none-any.whl.

File metadata

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

File hashes

Hashes for ccburn-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e16fcc67f6760df8c0f97fa47588862347802683540a07df87f9f8d9baf7a331
MD5 da97a0a2bd9b59e531363cad063b7ed5
BLAKE2b-256 5cbcf68f2ae4ffe1b2f972ced075c678b1ed00da8ba1c66f3389a59c59b3ae35

See more details on using hashes here.

Provenance

The following attestation bundles were made for ccburn-0.4.2-py3-none-any.whl:

Publisher: release.yml on JuanjoFuchs/ccburn

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