Noureddine RAMDI / OpenUsage: a terminal dashboard for AI coding tool usage tracking via local SQLite scraping

Created Sat, 23 May 2026 20:41:14 +0000 Modified Sat, 23 May 2026 20:41:27 +0000

janekbaraniewski/openusage

OpenUsage tackles a problem that many developers face as they juggle multiple AI coding tools: How do you track usage and spending across various providers without relying on centralized APIs or complex configuration? Its approach is straightforward yet clever — it scrapes local SQLite databases and probes environment variables to reconstruct usage data from popular AI coding assistants like Claude Code, Cursor, Copilot, and others. This terminal-first dashboard is built in Go with a TUI powered by Bubble Tea, designed to run as a background daemon collecting continuous telemetry, while providing a rich, customizable interface for cost visibility all in one place.

what openusage does and how it works

OpenUsage is essentially a local dashboard for AI coding tool usage and cost tracking that supports 17 different providers. It works by auto-detecting installed AI coding tools on your machine, reading their local SQLite databases, binary paths, and environment variables without requiring any setup or API keys.

The architecture centers around a Go application that serves a Bubble Tea terminal UI and runs a background daemon collecting usage data continuously. This design allows the dashboard to remain lightweight and responsive, while telemetry data is gathered even when the dashboard isn’t open. The usage data is stored persistently in a local SQLite database, enabling historical analysis like burn rates, quota tracking, and billing block estimation.

The stack is Go-based with a focus on zero dependencies beyond the Go runtime and SQLite. The Bubble Tea framework is used for the terminal user interface, offering a modern, interactive experience within the terminal. The daemon runs as a background process, scraping data at intervals by probing local SQLite files of known AI coding tools and reading environment variables to identify usage and cost information.

Supported AI coding tools include Claude Code, Cursor, GitHub Copilot, OpenRouter, OpenAI, Anthropic, and more. The repo cleverly identifies these by probing their local artifacts rather than integrating with their APIs, which is a tradeoff that improves privacy and simplicity but requires upkeep if those tools change their local data formats.

The dashboard supports multiple themes with over 15 built-in color schemes, letting users customize the look and feel to their terminal preferences.

technical strengths and design tradeoffs

The most interesting aspect of OpenUsage is how it reconstructs cross-provider usage and spend data by scraping local SQLite databases and environment variables. Many monitoring tools rely on API integrations, but OpenUsage takes a local-first approach that requires zero configuration.

This method means OpenUsage can run entirely offline and keeps usage data private since it never sends telemetry to external servers. It also avoids the need for API keys, rate limits, or cloud dependencies.

Under the hood, the code handles probing multiple local SQLite databases belonging to different AI coding tools. This requires reverse engineering their database schemas and updating the scraper logic when those tools update their telemetry storage.

The background daemon architecture is well implemented, allowing continuous data collection without requiring the dashboard to be open. This is important for accurate cost tracking since usage can be intermittent.

The Bubble Tea TUI is a solid choice for terminal-first applications. It provides a responsive interface with customizable themes and detailed breakdowns per AI provider and model usage. This makes it easier for developers to understand their AI spend and usage patterns without leaving the terminal.

The tradeoff is that relying on local SQLite scraping is inherently fragile. If any AI coding tool changes its telemetry database structure, OpenUsage needs to update its scraping logic. This is a maintenance burden and a potential source of breakage.

Additionally, the local-first design means usage data is only as up-to-date as the local telemetry files. Some usage might not be recorded if the AI tools cache or delay writes.

Despite these tradeoffs, the repo’s code quality is good — the Go codebase is clean and idiomatic, making it approachable for contributors. The modular design isolates provider-specific scrapers, easing maintenance.

quick start

OpenUsage provides multiple installation methods with simple commands:

brew install janekbaraniewski/tap/openusage

All platforms (quick install script)

curl -fsSL https://github.com/janekbaraniewski/openusage/releases/latest/download/install.sh | bash

From source (Go 1.25+)

go install github.com/janekbaraniewski/openusage/cmd/openusage@latest

The source build requires CGO enabled (CGO_ENABLED=1). Pre-built binaries are also available on the Releases page.

Once installed, running openusage launches the terminal dashboard. The background daemon starts automatically to collect usage data continuously.

verdict

OpenUsage is a practical tool for developers who use multiple AI coding assistants and want to keep a close eye on their usage and costs across providers without juggling multiple dashboards or API keys.

Its local-first, zero-configuration approach is a clear strength for privacy-conscious users and those who prefer offline tools. However, the reliance on local SQLite scraping means it will need active maintenance to keep up with changes in the various AI coding tools’ telemetry formats.

The Bubble Tea UI is a solid, user-friendly way to visualize complex usage and cost data in your terminal. For devs comfortable with CLI tools who want detailed cross-provider spend analytics without cloud dependencies, OpenUsage is worth trying.

If you rely heavily on AI coding tools and want a consolidated, privacy-preserving usage dashboard, OpenUsage provides a neat solution with good technical foundations and sensible tradeoffs.


→ GitHub Repo: janekbaraniewski/openusage ⭐ 73 · Go