Claude Usage Monitor (Python Package)
Professional CLI tool for monitoring Claude AI token usage with zero external dependencies.
Credits & Attribution
This package is based on the original Claude-Code-Usage-Monitor by Maciej (maciek@roboblog.eu). This version transforms it into a zero-dependency pip-installable package while maintaining all original functionality.
Installation
pip install claude-token-monitor
Quick Start
# Default monitoring (Pro plan)
claude-monitor
# Monitor with Max5 plan
claude-monitor --plan max5
# Custom timezone and reset hour
claude-monitor --plan max20 --timezone US/Eastern --reset-hour 9
# Show help
claude-monitor --help
Features
- 📊 Real-time token monitoring with visual progress bars
- 🔮 Smart predictions based on usage patterns
- 🎯 Multi-plan support (Pro, Max5, Max20, Custom)
- 🌍 Timezone handling for accurate reset times
- 🎨 Beautiful terminal UI with colors and emojis
- ⚡ Zero external dependencies - completely self-contained
- 🔄 Auto-refresh every 3 seconds
- 📱 Cross-platform (Windows, macOS, Linux)
Commands
# Basic usage
claude-monitor # Start monitoring with Pro plan
claude-monitor --plan max5 # Monitor with Max5 plan
claude-monitor --once # Run once and exit
claude-monitor --summary # Show summary only
# Configuration
claude-monitor --list-plans # Show available plans
claude-monitor --list-timezones # Show timezone options
claude-monitor --info # Show configuration info
# Customization
claude-monitor --timezone US/Pacific # Set timezone
claude-monitor --reset-hour 10 # Set reset hour
claude-monitor --refresh 5 # Set refresh interval
claude-monitor --no-color # Disable colors
Plans Supported
- Pro: 40 conversations per 5 hours, 200 daily
- Max5: 5 conversations per 5 hours, 30 daily
- Max20: 20 conversations per 5 hours, 100 daily
- Custom: Configurable limits
How It Works
This package reads Claude's conversation logs directly from your local filesystem:
- Location:
~/.config/claude/projects/(Unix) or%APPDATA%\claude\(Windows) - Format: JSONL files containing conversation data
- Processing: Extracts token usage and groups into 5-hour billing windows
- Predictions: Analyzes usage patterns to predict future consumption
Zero Dependencies
This package uses only Python's built-in libraries:
datetimefor timezone handling (no pytz needed)jsonfor parsing JSONL filesargparsefor CLI interfaceos/sysfor system operations
Requirements
- Python 3.7+
- Claude Desktop installed and used at least once
- Access to Claude's local data directory
Development
# Clone repository
git clone <repository-url>
cd claude-token-monitor/python
# Install in development mode
pip install -e .
# Run directly
python -m claude_monitor.cli --help
License
MIT License - see LICENSE file for details.
Metadata
Release files for claude-token-monitor 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| claude_token_monitor-1.0.0.tar.gz | 20.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| claude_token_monitor-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 43.2 kB
Release files / claude_token_monitor-1.0.0.tar.gz
| Download URL | claude_token_monitor-1.0.0.tar.gz |
|---|---|
| Size | 20.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
06a4fcb7d7ee8ffb4b808efbf483062cf0c072f3ada502ad5e22583ede1cc635
|
|
BLAKE2b-256 checksum How to use checksums |
2ca02387fe31f5097b7b191f680adf1b6c1f78f2fdbe3ae74a6e1ad349044c45
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.13
|
Release files / claude_token_monitor-1.0.0-py3-none-any.whl
| Download URL | claude_token_monitor-1.0.0-py3-none-any.whl |
|---|---|
| Size | 22.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
11dcabd733ea1254677adaefaa04751dd1090dd53824a08e3ffb2e46cb26df57
|
|
BLAKE2b-256 checksum How to use checksums |
54b1195c1cf79f090a02af0b81ee640b1d1ff5b8377728070829f5ab8c5889c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.13
|