Discover and explore top open-source AI tools and projects—updated daily.
stormzhangMonitor local AI agent token usage and costs
New!
Top 99.8% on SourcePulse
This tool addresses the need for transparent tracking of token consumption and associated costs for local AI agents like Claude Code and Codex. It targets developers and researchers utilizing these models locally, providing real-time insights into usage, rate limits, and equivalent expenses, thereby enabling better resource management and cost control.
How It Works
The tracker integrates directly with Claude Code via its custom StatusLine API, pulling precise, local data on token usage, quota status (5h/7d sliding windows with countdowns), and context window utilization. For Codex, which lacks native StatusLine support, it monitors usage through available means. A central CLI Dashboard aggregates data from multiple agents, offering session-specific details and comprehensive daily, weekly, and monthly cost and usage reports. Its zero-configuration approach automatically detects installed agents, simplifying setup and ensuring data remains purely local for enhanced privacy.
Quick Start & Requirements
curl -sSL https://raw.githubusercontent.com/stormzhang/token-tracker/main/install.sh | bash or pip install --force-reinstall token-tracker.tt setup to initialize configuration for Claude Code and Codex status lines.tt for the interactive Dashboard, tt claude, tt codex, tt daily, tt weekly, tt monthly, tt sessions. tt unsetup to uninstall.https://raw.githubusercontent.com/stormzhang/token-tracker/main/install.sh.Highlighted Details
Maintenance & Community
The provided README does not contain specific details regarding notable contributors, sponsorships, partnerships, community channels (like Discord/Slack), or a public roadmap.
Licensing & Compatibility
Limitations & Caveats
The project includes a TODO list for future enhancements, indicating ongoing development, particularly for additional data reports and multi-dimensional analysis. The Codex integration relies on default styling due to the lack of official StatusLine API support. The StatusLine display is designed to degrade gracefully on terminals with insufficient width.
2 days ago
Inactive
Maciek-roboblog