3 Open Source Tools to Monitor Claude Code Usages

Lynn Mikami

Lynn Mikami

24 June 2025

3 Open Source Tools to Monitor Claude Code Usages

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:

  1. ccusage: A fast and simple command-line interface (CLI) for quick, ad-hoc analysis of your local usage data.
  2. 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.
  3. 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 a great API Testing tool that generates beautiful API Documentation?

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!
button

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:

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:

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:

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:

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:

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:

  1. OpenTelemetry Collector: Receives the telemetry data from all users' Claude Code instances.
  2. Prometheus: Scrapes and stores the metrics (e.g., token counts, costs, latency).
  3. Loki: Ingests and stores the event logs (e.g., user prompts, tool results, API errors).
  4. 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.

  1. 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:


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.

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 a great API Testing tool that generates beautiful API Documentation?

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!
button

Practice API Design-first in Apidog

Discover an easier way to build and use APIs