OpenUsage CLI
A terminal dashboard for spend, quotas and rate limits across Claude Code, Codex, Cursor, Copilot and other AI tools
- 246 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- Reads the home directories and logs of AI tools and environment variables with API keys to detect providers
- A background daemon runs continuously and writes spend data to a local database
- Hooks and the status bar change the config of Claude Code and other agents if you install them
Install
- Works in
Manual install
brew install janekbaraniewski/tap/openusageRecommended route for macOS. After that the openusage command starts the dashboard.
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- Reads the home directories and logs of AI tools and environment variables with API keys to detect providers
- A background daemon runs continuously and writes spend data to a local database
- Hooks and the status bar change the config of Claude Code and other agents if you install them
This is third-party code. Review the repository files before installing.
What it does
OpenUsage finds AI tools and API keys on your machine and gathers their spend, remaining quota, rate-limit reset times and per-model data into one terminal dashboard. It supports 37 providers in total: coding agents, API platforms such as OpenAI, Anthropic and OpenRouter, and local Ollama. A background daemon keeps the data in a local SQLite database, so history survives while the dashboard is closed. The `openusage daily`, `weekly`, `monthly`, `session` and `blocks` reports run without the interface, and `--json` makes any of them script-friendly for CI. The 5-hour billing block view shows burn rate and a projection. Claude Code gets a one-line status bar with session cost, today's total and context fill (`openusage statusline install`). For tmux, a segment shows the active tool's numbers (`openusage tmux install`). Snapshots export to JSON and CSV, and the built-in hub serves Prometheus metrics.
Who it is for. Developers who work across several AI tools and subscriptions and want one view of total spend and remaining limits without opening each vendor dashboard.
Good fit when
- Subscriptions for Claude Code and Codex run in parallel, and you need to know when the 5-hour window resets
- The OpenRouter and Anthropic bill keeps growing and it is unclear which model and project burn the money
- CI needs a daily token-spend summary as JSON
- You want session cost and burn rate in the tmux status bar
- The team needs spend metrics in Prometheus and Grafana
Not a fit when
- You need a budget that stops the agent: OpenUsage only shows spend and blocks nothing
- You need organization-wide accounting in the cloud: data lives locally on the machine running the daemon
- You need an exact match with the invoice: the price is an estimate where the provider does not report cost
Example request
Show how much I spent on Claude Code and Codex this week and print the daily report as JSONLimitations
Building from source needs Go 1.25 and CGO. Providers are detected through binaries, directories such as ~/.claude and environment variables, so a tool that leaves no trace on disk will not show up. The session and blocks reports are not available for every provider: remote platforms (OpenAI, Anthropic, OpenRouter) lack them because they expose no per-turn data. The status bar supports Claude Code only. Cost comes from a pricing table and stays an estimate when the provider does not report it.
How to disable. Stop the daemon and remove the binary (`brew uninstall openusage`). The local SQLite database is yours to delete. Remove the Claude Code status line and the tmux segment from your own configs.
FAQ
Which tools does OpenUsage see?
Among coding agents and IDEs: Claude Code, Codex CLI, Cursor, Copilot, Gemini CLI, OpenCode, Amp, Goose, Roo Code, Kilo Code, Kiro and Zed. Among API platforms: OpenAI, Anthropic, OpenRouter, Groq, Mistral, DeepSeek, Perplexity and xAI. Ollama is read locally. Detection works through binaries, tool home directories and API keys in the environment.
Does it need configuration?
No, running openusage is enough: tools and keys are picked up automatically. The Claude Code status bar and the tmux segment are separate commands, and themes, time windows and thresholds are set in the config.
Where does the data go?
A local daemon collects it into a SQLite database on your machine. The dashboard runs local-first and needs no cloud account.
How do I get metrics into Prometheus?
The built-in hub serves metrics in Prometheus format. State snapshots can also be exported as JSON or CSV, and model pricing can be looked up with the tool itself.
How do the daily and blocks reports differ?
daily groups spend by day, with weekly and monthly variants too. blocks splits data into 5-hour billing windows with burn rate and a projection, and works for Claude Code, Codex, Gemini CLI, Copilot, Cursor and several other agents.
Discussion
No questions or reviews yet.
Related
CLI toolsLocal ledger of AI agent work: tokens, estimated cost, steps, changed files and checks per task for Claude Code, Codex and OpenCode
A top-style terminal dashboard for Claude Code and Codex sessions: spend, tokens, context load, processes and tool calls.
ClawMetry reads the session files agents already write and shows the timeline, tool calls, tokens and cost in one dashboard.
A Claude Code plugin with /omh: a local dashboard of skills, agents, MCP, token use and cache for Claude Code and Codex.
A local proxy with a terminal dashboard: shows how many tokens each Claude Code and Codex request sends and saves the prompts to files
A terminal and web dashboard for Claude Code sessions, costs and settings, with budget alerts and a 30-day forecast.
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Repository stars | Main difference |
|---|---|---|---|
| OpenUsage (this card) | no | 246 | |
| ccusage | no | 19,425 | reads local logs for one set of agents; OpenUsage adds API platforms, a daemon and tmux |
| Claude Code Usage Monitor | no | 8,801 | watches one Claude Code usage; OpenUsage collects data across 37 providers |
README in short
The project description starts with the dashboard, lists three install routes and shows report commands with a per-provider support table. It then covers the tmux and status bar integrations, a features section and a reference of 37 providers with detection examples.