Features currently in development and planned for future releases of Claude Code Usage Monitor.
Status: 🔶 In Active Development
Intelligent Auto Mode with machine learning will actively learn your actual token limits and usage patterns.
📊 Data Collection Pipeline:
- Monitors and stores token usage patterns in local DuckDB database
- Tracks session starts, consumption rates, and limit boundaries
- Builds comprehensive dataset of YOUR specific usage patterns
- No data leaves your machine - 100% local processing
🤖 Machine Learning Features:
- Pattern Recognition: Identifies recurring usage patterns and peak times
- Anomaly Detection: Spots when your token allocation changes
- Regression Models: Predicts future token consumption based on historical data
- Classification: Automatically categorizes your usage tier (Pro/Max5/Max20/Custom)
💾 DuckDB Integration:
- Lightweight, embedded analytical database
- No external server required - all data stays local
- Efficient SQL queries for real-time analysis
- Automatic data optimization and compression
🎯 Dynamic Adaptation:
- Learns your actual limits, not predefined ones
- Adapts when Claude changes your allocation
- Improves predictions with each session
- No manual plan selection needed
| Current Approach | ML-Powered Approach |
|---|---|
| Fixed 7K, 35K, 140K limits | Learns YOUR actual limits |
| Manual plan selection | Automatic detection |
| Basic linear predictions | Advanced ML predictions |
| No historical learning | Improves over time |
| Can't adapt to changes | Dynamic adaptation |
- 🔒 100% Local: All ML processing happens on your machine
- 🚫 No Cloud: Your usage data never leaves your computer
- 💾 Local Database: DuckDB stores data in
~/.claude_monitor/usage.db - 🗑️ Easy Cleanup: Delete the database file to reset ML learning
- 🔐 Your Data, Your Control: No telemetry, no tracking, no sharing
- Database Schema Design - Design DuckDB tables for usage data
- Data Collection Module - Implement usage pattern tracking
- ML Pipeline - Create model training and prediction system
- Pattern Analysis - Develop usage pattern recognition
- Auto-Detection Engine - Smart plan switching based on ML
- Performance Optimization - Efficient real-time ML processing
- Testing Framework - Comprehensive ML model testing
Status: 🔶 In Planning Phase
Publish Claude Code Usage Monitor as an easy-to-install pip package for system-wide availability.
🚀 Easy Installation:
# Future installation method
pip install claude-usage-monitor
# Run from anywhere
claude-monitor --plan max5 --reset-hour 9⚙️ System Integration:
- Global configuration files (
~/.claude-monitor/config.yaml) - User preference management
- Cross-platform compatibility (Windows, macOS, Linux)
📋 Command Aliases:
claude-monitor- Main commandcmonitor- Short aliasccm- Ultra-short alias
🔄 Auto-Updates:
# Easy version management
pip install --upgrade claude-usage-monitor
claude-monitor --version
claude-monitor --check-updates- Package Structure - Create proper Python package structure
- Setup.py Configuration - Define dependencies and metadata
- Entry Points - Configure command-line entry points
- Configuration System - Implement global config management
- Cross-Platform Testing - Test on Windows, macOS, Linux
- Documentation - Create PyPI documentation
- CI/CD Pipeline - Automated testing and publishing
- Version Management - Semantic versioning and changelog
claude-usage-monitor/
├── claude_monitor/
│ ├── __init__.py
│ ├── cli.py # Command-line interface
│ ├── monitor.py # Core monitoring logic
│ ├── config.py # Configuration management
│ ├── ml/ # ML components (future)
│ └── utils.py # Utilities
├── setup.py
├── requirements.txt
├── README.md
└── tests/
Status: 🔶 In Planning Phase
Docker containerization for easy deployment, consistent environments, and optional web dashboard.
🚀 One-Command Setup:
# Future Docker usage
docker run -e PLAN=max5 -e RESET_HOUR=9 maciek/claude-usage-monitor
# With persistent data
docker run -v ~/.claude_monitor:/data maciek/claude-usage-monitor
# Web dashboard mode
docker run -p 8080:8080 maciek/claude-usage-monitor --web-mode🔧 Environment Configuration:
CLAUDE_PLAN- Set monitoring planRESET_HOUR- Configure reset timeTIMEZONE- Set timezoneWEB_MODE- Enable web dashboardML_ENABLED- Enable ML features
📊 Web Dashboard:
- Real-time token usage visualization
- Historical usage charts
- Session timeline view
- Mobile-responsive interface
- REST API for integrations
⚡ Lightweight Design:
- Alpine Linux base image
- Multi-stage build optimization
- Minimal resource footprint
- Fast startup time
- Dockerfile Creation - Multi-stage build optimization
- Web Interface - React-based dashboard development
- API Design - REST API for data access
- Volume Management - Persistent data handling
- Environment Variables - Configuration via env vars
- Docker Compose - Easy orchestration
- Security Hardening - Non-root user, minimal attack surface
- Documentation - Docker deployment guide
# Multi-stage build example
FROM node:alpine AS web-builder
# Build web dashboard
FROM python:alpine AS app
# Install Python dependencies
# Copy web assets
# Configure entry point- Historical usage tracking and insights
- Weekly/monthly usage reports
- Usage pattern visualization
- Trend analysis and forecasting
- Desktop notifications for token warnings
- Email alerts for usage milestones
- Slack/Discord integration
- Webhook support for custom integrations
- Real-time ML prediction graphs
- Confidence intervals for predictions
- Interactive usage charts
- Session timeline visualization
- Team usage coordination
- Shared usage insights (anonymized)
- Organization-level analytics
- Role-based access control
- iOS/Android apps for remote monitoring
- Push notifications
- Mobile-optimized dashboard
- Offline usage tracking
- Custom notification plugins
- Third-party integrations
- User-developed extensions
- Plugin marketplace
Current Focus: Evaluating different ML approaches for token prediction
Algorithms Under Consideration:
- LSTM Networks: For sequential pattern recognition
- Prophet: For time series forecasting with seasonality
- Isolation Forest: For anomaly detection in usage patterns
- DBSCAN: For clustering similar usage sessions
- XGBoost: For feature-based limit prediction
Research Questions:
- How accurately can we predict individual user token limits?
- What usage patterns indicate subscription tier changes?
- Can we detect and adapt to Claude API changes automatically?
- How much historical data is needed for accurate predictions?
Data Collection (anonymized and voluntary):
- Token consumption patterns across different subscription tiers
- Session duration and frequency analysis
- Geographic and timezone usage variations
- Correlation between coding tasks and token consumption
Areas of Focus:
- Real-time ML inference optimization
- Memory usage minimization
- Battery life impact on mobile devices
- Network usage optimization for web features
Skills Needed: Python, Machine Learning, DuckDB, Time Series Analysis
Open Tasks:
- Implement ARIMA models for token prediction
- Create anomaly detection for usage pattern changes
- Design efficient data storage schema
- Develop model validation frameworks
Skills Needed: React, TypeScript, REST APIs, Responsive Design
Open Tasks:
- Build real-time dashboard interface
- Create mobile-responsive layouts
- Implement WebSocket for live updates
- Design intuitive user experience
Skills Needed: Docker, CI/CD, GitHub Actions, Package Management
Open Tasks:
- Create efficient Docker builds
- Set up automated testing pipelines
- Configure PyPI publishing workflow
- Implement cross-platform testing
Skills Needed: React Native, iOS/Android, Push Notifications
Open Tasks:
- Design mobile app architecture
- Implement offline functionality
- Create push notification system
- Optimize for battery life
Ruff Integration: This project uses Ruff for fast Python linting and formatting.
# Install pre-commit for automatic code quality checks
uv tool install pre-commit --with pre-commit-uv
# Install pre-commit hooks
pre-commit install
# Run ruff manually
ruff check . # Lint code
ruff format . # Format code
ruff check --fix . # Auto-fix issuesPre-commit Hooks: Automatic code quality checks run before each commit:
- Ruff linting and formatting
- Import sorting
- Trailing whitespace removal
- YAML and TOML validation
VS Code Integration: The project includes VS Code settings for:
- Auto-format on save with Ruff
- Real-time linting feedback
- Import organization
- Consistent code style
-
Feature Planning
- Create GitHub issue with detailed requirements
- Discuss implementation approach in issue comments
- Get feedback from maintainers before starting
-
Development Process
- Fork repository and create feature branch
- Code is automatically formatted and linted via pre-commit hooks
- Write tests for new functionality
- Update documentation
-
Testing Requirements
- Unit tests for core functionality
- Integration tests for ML components
- Cross-platform testing for packaging
- Performance benchmarks for optimization
-
Review Process
- Submit pull request with clear description
- Respond to code review feedback
- Ensure all tests pass
- Update changelog and documentation
High Priority:
- ML algorithm implementation
- PyPI package structure
- Cross-platform compatibility
- Performance optimization
Medium Priority:
- Web dashboard development
- Docker containerization
- Advanced analytics features
- Mobile app planning
Low Priority:
- Plugin system architecture
- Multi-user features
- Enterprise features
- Advanced integrations
For technical discussions about development:
📧 Email: maciek@roboblog.eu 💬 GitHub: Open issues for feature discussions 🔧 Technical Questions: Include code examples and specific requirements
Ready to contribute? Check out CONTRIBUTING.md for detailed guidelines!