claude-code-usage-bar  by leeguooooo

Real-time Claude Code usage monitoring CLI

Created 9 months ago
259 stars

Top 97.9% on SourcePulse

GitHubView on GitHub
Project Summary

A lightweight, highly configurable status-line monitor for Claude Code, designed to provide real-time insights into Anthropic API usage and session metrics. It targets Claude Code users who need immediate visibility into rate-limit consumption, model parameters, and prompt-cache status without leaving their development environment, thereby optimizing API interactions and cost awareness.

How It Works

This project integrates with Claude Code's statusLine hook, leveraging its stdin payload and API headers to display critical data. It employs a Python backend that can run in a low-CPU daemon mode or an inline mode. The system parses API responses for rate-limit percentages and reset timers, extracts model and context window details, and calculates prompt-cache countdowns by analyzing transcript data. Its core advantage lies in presenting complex information concisely on a single line with extensive visual customization.

Quick Start & Requirements

  • Primary install: pip install claude-statusbar followed by cs --setup. Restart Claude Code.
  • Prerequisites: Claude Code v2.1.80+ and a Python environment.
  • Resource Footprint: Daemon mode consumes <1% CPU. Setup involves modifying ~/.claude/settings.json.
  • Links: Repository, Changelog

Highlighted Details

  • API Rate Limits: Displays rolling 5-hour and 7-day usage percentages with corresponding reset timers.
  • Model & Context: Shows the active model (e.g., Opus 4.7) and current context window utilization (e.g., 350.0k/1.0M tokens).
  • Prompt Cache: Features an auto-detected prompt-cache countdown (5min/1h TTL) with color-coded urgency, crucial for subscribers to manage quota efficiently.
  • Customization: Offers 3 distinct visual styles (classic, capsule, hairline) and 9 themes, configurable via command-line flags or a persistent JSON configuration file.
  • Session Metrics: Optionally displays session cost (API-equivalent value), project/branch status, Git ahead/behind counts, session duration, and lines added/removed.
  • Activity Tracking: Includes an "activity line" to show in-progress todos, active tools, and completed tool rollups.

Maintenance & Community

The project is actively maintained, with the latest release v3.10.0 on June 2, 2026. Notable contributions include the show_cache_age widget. Community interaction details like Discord/Slack are not explicitly provided in the README.

Licensing & Compatibility

  • License: MIT License.
  • Compatibility: Permissive for commercial use and integration into closed-source projects. Requires Claude Code v2.1.80+.

Limitations & Caveats

The tool is dependent on the Claude Code environment. Many advanced features, such as session cost, project/branch details, and tool/agent tracking, are opt-in and require explicit configuration. The bar_shimmer feature is experimental.

Health Check
Last Commit

19 hours ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
32 stars in the last 30 days

Explore Similar Projects

Starred by Wei-Lin Chiang Wei-Lin Chiang(Cofounder of LMArena), Joe Walnes Joe Walnes(Head of Experimental Projects at Stripe), and
9 more.

ccusage by ccusage

0.8%
16k
CLI tool for Claude Code usage analysis
Created 1 year ago
Updated 1 day ago
Starred by Dan Guido Dan Guido(Cofounder of Trail of Bits), Joe Walnes Joe Walnes(Head of Experimental Projects at Stripe), and
4 more.

opcode by winfunc

0.1%
22k
GUI for Claude Code
Created 11 months ago
Updated 7 months ago
Feedback? Help us improve.