For Vibe Coders, tools like Anthropic's Claude Code have become indispensable for many engineers. From generating boilerplate code to debugging complex algorithms, Claude Code can significantly boost productivity. However, this power comes with a need for oversight. Unmonitored usage can lead to unexpected costs, performance bottlenecks, and an incomplete understanding of how these powerful tools are impacting your development lifecycle.
Effective monitoring is not just about tracking expenses; it's about understanding value. Are you using the most cost-effective models for your tasks? Are there patterns in your workflow that could be optimized? How is AI-assistance translating into tangible productivity gains for your team? Answering these questions requires data, and that's where open-source monitoring tools come into play.
While Claude Code provides some level of usage information, a dedicated ecosystem of open-source tools has emerged to offer deeper, more actionable insights. These tools cater to a range of needs, from the individual developer wanting a quick check of their daily token consumption to the enterprise team looking to build a comprehensive observability platform around their AI usage.
In this article, we’ll take a deep dive into three distinct open-source tools that help you monitor your Claude Code usage:
ccusage
: A fast and simple command-line interface (CLI) for quick, ad-hoc analysis of your local usage data.Claude-Code-Usage-Monitor
: An interactive, real-time terminal dashboard that helps you stay on top of your current session and avoid hitting token limits.claude-code-otel
: A full-fledged, enterprise-grade observability stack for comprehensive, long-term monitoring of team-wide usage, performance, and costs.
We’ll explore the architecture, features, and ideal use cases for each, helping you choose the right tool to master your Claude Code development workflow.
Want an integrated, All-in-One platform for your Developer Team to work together with maximum productivity?
Apidog delivers all your demands, and replaces Postman at a much more affordable price!
ccusage

For developers who value speed, simplicity, and efficiency, ccusage
is the perfect tool. Created by GitHub user ryoppippi
, it’s a lightweight and incredibly fast CLI tool that provides clear, concise reports on your Claude Code usage and costs by analyzing the local JSONL log files that Claude Code generates.
Key Features:
- Multiple Report Views: Get insights tailored to your questions with
daily
,monthly
,session
, andblocks
reports (which align with Claude Code's 5-hour billing windows). - Live Monitoring: With the
ccusage blocks --live
command, you can get a real-time dashboard that shows your active session progress, token "burn rate," and projected costs. - Cost and Model Analysis: The tool doesn't just count tokens; it translates them into USD and can break down costs by the specific models you've used (Opus, Sonnet, Haiku, etc.).
- Flexible Output: While its default human-readable tables are beautifully formatted and even adapt to your terminal width, you can also export any report to JSON with the
--json
flag for easy integration into other scripts or tools. - Zero-Dependency Execution: Using
npx
, you can runccusage
instantly without a permanent installation, making it ideal for quick, one-off checks.
How it Works:

ccusage
is a NodeJS-based tool written in TypeScript. Its magic lies in its simplicity. It directly parses the .jsonl
files stored in your local Claude Code configuration directory (e.g., ~/.config/claude/logs/
). It reads these event logs, aggregates the token counts for prompts and responses, applies up-to-date pricing information for each model, and presents the data in a clean, tabular format. This local-first approach means it's incredibly fast and works entirely offline (provided it has cached the pricing data once).

Installation and Usage:
Getting started with ccusage
couldn't be easier. For a no-install, direct run, simply use:
npx ccusage@latest
This command will fetch the latest version and show you a daily report. For more detailed views, you can specify the report type:
# See a summary of usage for each month
npx ccusage@latest monthly
# Group usage by conversation sessions
npx ccusage@latest session --breakdown
# Monitor the current 5-hour billing block in real-time
npx ccusage@latest blocks --live
Who is it for?
ccusage
is the ideal tool for the individual developer. It’s perfect for:
- Answering the question, "How much did I spend on Claude Code yesterday?"
- Checking your token usage at the end of a long coding session.
- Performing simple, ad-hoc analysis without the overhead of a complex setup.
- Piping usage data into other scripts via its JSON output.
If you need a quick, no-fuss way to get a handle on your personal Claude Code usage, ccusage
is a fantastic starting point.
Claude-Code-Usage-Monitor

While ccusage
excels at post-hoc analysis, Claude-Code-Usage-Monitor
by Maciek-roboblog
is designed to be your live companion during your coding sessions. This Python-based tool provides a persistent, real-time terminal dashboard that not only shows you what you've used but also predicts what you're going to use, helping you avoid unexpectedly hitting your token limits.

Key Features:
- Interactive Real-time Dashboard: The monitor provides a constantly updating view (every 3 seconds) of your token usage within the current 5-hour session window.
- Predictive Analysis: Its standout feature is the "burn rate" calculation. It analyzes your recent usage to predict when you might exhaust your tokens for the session, giving you a chance to slow down.
- Visual Progress Bars: The UI is rich and intuitive, with color-coded progress bars for both your token consumption and the time remaining in your session.
- Plan and Timezone Aware: You can configure the monitor for different Claude Code plans (Pro, Max5, Max20) and set your local timezone for accurate session reset predictions. It can even auto-detect your plan based on past usage.
- Warning System: The tool actively alerts you when you're approaching your token limit, helping you manage your usage more proactively.
How it Works:
Similar to ccusage
, this tool also monitors the local Claude Code log files. However, instead of just reporting on past data, it maintains a live state of your current 5-hour session. It understands Claude Code's rolling window system and calculates your token usage and burn rate within that context. It's written in Python and uses the rich
library to create its polished and interactive terminal interface.
Installation and Usage:
The recommended way to install Claude-Code-Usage-Monitor
is using uv
, a modern Python package installer that handles virtual environments automatically.
# Install uv (if you don't have it)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install the tool
uv tool install claude-monitor
# Run the monitor
claude-monitor
Once running, it will take over your terminal window and display the live dashboard. You can customize it with various flags:
# Specify your plan and timezone
claude-monitor --plan max20 --timezone America/New_York
Who is it for?
Claude-Code-Usage-Monitor
is for the developer who wants to stay continuously informed during their work. It’s perfect for:
- Users on the free or "Pro" tier who have stricter token limits and need to manage them carefully.
- Developers engaged in long, intensive coding sessions who want to pace their usage.
- Anyone who wants to avoid the jarring experience of being cut off mid-thought because they've hit a limit.
- Visual learners who prefer a graphical dashboard over static reports.
If you want a tool that acts like a "guardian angel" for your token budget, watching over your shoulder and keeping you on track, this is the one for you.
claude-code-otel

The first two tools are fantastic for individual developers, but what if you need to monitor Claude Code usage across an entire team or organization? This is where claude-code-otel
by ColeMurray
shines. It’s not just a tool; it’s a complete, self-hosted observability solution built on industry-standard open-source components.

Key Features:
- Full Observability Stack: It provides a pre-configured setup of OpenTelemetry, Prometheus, Loki, and Grafana, the same robust tools used for monitoring production infrastructure.
- Comprehensive Dashboards: The project comes with pre-built Grafana dashboards for deep analysis of cost, user activity, tool performance, productivity metrics (like lines of code changed), API latency, errors, and more.
- Team-Wide Monitoring: It's designed from the ground up to aggregate data from multiple users, allowing you to see trends, identify power users, and manage costs at a team or project level.
- Data Sovereignty and Security: Because you host the entire stack yourself, all your usage data, including potentially sensitive user prompts (if you choose to log them), stays within your own infrastructure.
- Standard-Based: By using OpenTelemetry, it adheres to a vendor-neutral standard for telemetry data, making it extensible and future-proof.
How it Works:
This solution takes a fundamentally different approach. It leverages Claude Code's built-in support for OpenTelemetry (OTel). By setting a few environment variables, you can configure the Claude Code CLI to emit detailed metrics and logs. claude-code-otel
provides a docker-compose
setup that spins up the entire backend to receive and process this data:
- OpenTelemetry Collector: Receives the telemetry data from all users' Claude Code instances.
- Prometheus: Scrapes and stores the metrics (e.g., token counts, costs, latency).
- Loki: Ingests and stores the event logs (e.g., user prompts, tool results, API errors).
- Grafana: Queries Prometheus and Loki to visualize the data in powerful, interactive dashboards.

Installation and Usage:
Setting up claude-code-otel
is more involved than the other tools but is remarkably streamlined thanks to Docker.
- Clone the repository:
git clone https://github.com/ColeMurray/claude-code-otel.git
cd claude-code-otel
2. Start the stack:
make up
3. Configure your local Claude Code environment to send data to your new stack by setting environment variables:
export CLAUDE_CODE_ENABLE_TELEMETRY=1
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
# ... and a few others
4. Access your dashboards by navigating to http://localhost:3000
in your browser.
Who is it for?
claude-code-otel
is the definitive solution for engineering teams, platform teams, and management. It’s ideal for:
- Organizations looking to measure the ROI of their AI development tools.
- Team leads who need to manage a shared budget for Claude Code usage.
- Platform engineers who need to monitor the performance and reliability of AI tools.
- Any organization that requires a centralized, secure, and powerful way to understand how AI is being used across their development teams.
Conclusion: Choosing Your Lens
The journey to mastering your Claude Code usage begins with visibility. The three tools we've explored offer different lenses through which to view your interaction with this powerful AI assistant.
- Start with
ccusage
for a simple, powerful, and fast way to get answers to common questions about your past usage. - Graduate to
Claude-Code-Usage-Monitor
when you want to move from reactive analysis to proactive, real-time management of your token budget during your coding sessions. - Adopt
claude-code-otel
when your focus shifts from individual usage to team-wide observability, cost management, and performance analysis.
Each of these open-source projects represents a fantastic contribution to the developer community, empowering users to move from being passive consumers of AI technology to active, informed participants. By choosing the right tool for your needs, you can unlock a new level of control and insight, ensuring you're getting the most value out of your AI-assisted development workflow.
Want an integrated, All-in-One platform for your Developer Team to work together with maximum productivity?
Apidog delivers all your demands, and replaces Postman at a much more affordable price!