{"id":45253904,"url":"https://github.com/janekbaraniewski/openusage","last_synced_at":"2026-05-10T10:58:07.670Z","repository":{"id":339648107,"uuid":"1154072370","full_name":"janekbaraniewski/openusage","owner":"janekbaraniewski","description":"The one dashboard you’ve been looking for — track spend and usage across Claude, Cursor, OpenRouter, Copilot, Gemini, Codex, and more.","archived":false,"fork":false,"pushed_at":"2026-03-05T14:37:07.000Z","size":16609,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-05T14:53:16.788Z","etag":null,"topics":["ai-cost","ai-cost-tracking","ai-spending","ai-usage","claude","claude-code","claude-code-usage","claude-usage-monitor","codex","coding-agents","copilot","copilot-usage","cursor","gemini-cli","llm-usage","openrouter","openrouter-usage"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/janekbaraniewski.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-02-10T01:31:54.000Z","updated_at":"2026-03-05T10:44:54.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/janekbaraniewski/openusage","commit_stats":null,"previous_names":["janekbaraniewski/agentusage"],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/janekbaraniewski/openusage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janekbaraniewski%2Fopenusage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janekbaraniewski%2Fopenusage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janekbaraniewski%2Fopenusage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janekbaraniewski%2Fopenusage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/janekbaraniewski","download_url":"https://codeload.github.com/janekbaraniewski/openusage/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janekbaraniewski%2Fopenusage/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30278153,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T20:45:49.896Z","status":"ssl_error","status_checked_at":"2026-03-08T20:45:49.525Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-cost","ai-cost-tracking","ai-spending","ai-usage","claude","claude-code","claude-code-usage","claude-usage-monitor","codex","coding-agents","copilot","copilot-usage","cursor","gemini-cli","llm-usage","openrouter","openrouter-usage"],"created_at":"2026-02-20T23:19:15.628Z","updated_at":"2026-05-10T10:58:07.659Z","avatar_url":"https://github.com/janekbaraniewski.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./assets/logo.gif\" alt=\"OpenUsage logo\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\u003cstrong\u003eOpenUsage.sh: terminal-first local quota and usage tracking for Claude Code, Codex CLI, Cursor, Copilot, and OpenRouter.\u003c/strong\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#install\"\u003eInstall\u003c/a\u003e \u0026middot;\n  \u003ca href=\"#supported-providers\"\u003eProviders\u003c/a\u003e \u0026middot;\n  \u003ca href=\"#configuration\"\u003eConfig\u003c/a\u003e \u0026middot;\n  \u003ca href=\"#keybindings\"\u003eKeybindings\u003c/a\u003e \u0026middot;\n  \u003ca href=\"#development\"\u003eDevelopment\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\nOpenUsage is the terminal-first local dashboard published at [openusage.sh](https://openusage.sh/). Publicly, the clearest brand reference is **OpenUsage.sh**. It auto-detects AI coding tools and API keys on your workstation and shows live quota, usage, spend, resets, rate limits, and model data in your terminal. It is built for mixed-tool workflows across Claude Code, Codex CLI, Cursor, Copilot, Gemini CLI, OpenRouter, OpenAI, Anthropic, and more. Zero config required — just run `openusage`.\n\n![OpenUsage dashboard](./assets/dashboard.png)\n\nRun it side-by-side with your coding agent:\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./assets/sidebyside.png\" alt=\"OpenUsage side by side\"\u003e\n  \u003cbr\u003e\n  \u003cem\u003eOpenUsage running alongside OpenCode monitoring live OpenRouter usage.\u003c/em\u003e\n\u003c/p\u003e\n\n## Install\n\n### macOS (Homebrew, recommended)\n\n```bash\nbrew install janekbaraniewski/tap/openusage\n```\n\n### All platforms (quick install script)\n\n```bash\ncurl -fsSL https://github.com/janekbaraniewski/openusage/releases/latest/download/install.sh | bash\n```\n\n### From source (Go 1.25+)\n\n```bash\ngo install github.com/janekbaraniewski/openusage/cmd/openusage@latest\n```\n\nRequires CGO (`CGO_ENABLED=1`). Pre-built binaries are also available on the [Releases](https://github.com/janekbaraniewski/openusage/releases) page.\n\n## Run\n\n```bash\nopenusage\n```\n\nAuto-detection picks up local tools and common API key env vars. No config needed.\n\n## Track coding agent usage across multiple platforms\n\nNative dashboards show one provider at a time. OpenUsage gives you one local-first view across coding agents, API platforms, and local runtimes so you can answer:\n\n- Which tool or provider is burning budget?\n- Which model caused the spike?\n- Which quota or reset is getting close?\n- Which sessions, projects, or MCP tools drove the change?\n\nIt is built for end-user tool tracking, not for instrumenting a separate AI app with tracing SDKs or a billing backend.\n\nIf you want the full positioning argument, read the guide: [best way to track coding agent usage and quotas across providers](https://openusage.sh/best-way-track-coding-agent-usage-quotas-across-providers/).\n\nIf the question is whether this is the right fit versus a simpler local limits tracker, use:\n\n- [OpenUsage.sh vs OpenUsage.ai](https://openusage.sh/docs/openusage-sh-vs-openusage-ai/)\n- [Capability matrix](https://openusage.sh/docs/capability-matrix/)\n- [Docs hub](https://openusage.sh/docs/)\n\n## Features\n\n- **Cross-provider tracking** — compare coding agents, API platforms, and local runtimes in one local dashboard\n- **Zero config** — auto-detects your AI tools and API keys, just run it\n- **Live dashboard** — see spend, quotas, rate limits, and per-model usage at a glance\n- **17 providers** — covers coding agents (Claude Code, Cursor, Copilot, Codex, Gemini CLI), API platforms (OpenAI, Anthropic, OpenRouter, and more), and local tools (Ollama)\n- **Background tracking** — collects data continuously, even when the dashboard is closed\n- **Deep cost insights** — combine providers like OpenCode + OpenRouter for breakdowns by model, tool, and hosting provider\n- **Tool integrations** — optional hooks for Claude Code, Codex CLI, and OpenCode provide richer, real-time usage data\n- **Customizable** — 15+ built-in themes, adjustable time windows, configurable thresholds, provider reordering, plus external theme files\n\n## Supported providers\n\n17 provider integrations covering coding agents, API platforms, and local tools. See [docs/providers.md](docs/providers.md) for all providers with detailed descriptions and screenshots.\n\n### Claude Code\n\n**Detection:** `claude` binary + `~/.claude` directory\n\nTracks daily activity, per-model token usage, 5-hour billing block computation, burn rate, and cost estimation.\n\n![Claude Code provider](./assets/claudecode.png)\n\n### OpenRouter\n\n**Detection:** `OPENROUTER_API_KEY` environment variable\n\nTracks credits, activity, generation stats, and per-model breakdown across multiple API endpoints.\n\n![OpenRouter provider](./assets/openrouter.png)\n\n### All providers\n\n#### Coding agents \u0026 IDEs\n\n| Provider | Detection | What it tracks |\n|---|---|---|\n| **Claude Code** | `claude` binary + `~/.claude` | Daily activity, per-model tokens, billing blocks, burn rate |\n| **Cursor** | `cursor` binary + local SQLite DBs | Plan spend \u0026 limits, per-model aggregation, Composer sessions |\n| **GitHub Copilot** | `gh` CLI + Copilot extension | Chat \u0026 completions quota, org billing, session tracking |\n| **Codex CLI** | `codex` binary + `~/.codex` | Session tokens, per-model breakdown, credits, rate limits |\n| **Gemini CLI** | `gemini` binary + `~/.gemini` | OAuth status, conversation count, per-model tokens |\n| **OpenCode** | `OPENCODE_API_KEY` / `ZEN_API_KEY` | Credits, activity, generation stats |\n| **Ollama** | `OLLAMA_HOST` / binary | Local models, per-model usage |\n\n#### API platforms\n\n| Provider | Detection | What it tracks |\n|---|---|---|\n| **OpenAI** | `OPENAI_API_KEY` | Rate limits via header probing |\n| **Anthropic** | `ANTHROPIC_API_KEY` | Rate limits via header probing |\n| **OpenRouter** | `OPENROUTER_API_KEY` | Credits, activity, per-model breakdown |\n| **Groq** | `GROQ_API_KEY` | Rate limits, daily usage windows |\n| **Mistral AI** | `MISTRAL_API_KEY` | Subscription, usage endpoints |\n| **DeepSeek** | `DEEPSEEK_API_KEY` | Rate limits, account balance |\n| **Moonshot (Kimi)** | `MOONSHOT_API_KEY` | Balance breakdown (cash + voucher), org limits, tier; supports api.moonshot.ai (default) and api.moonshot.cn |\n| **Perplexity** | Browser session at console.perplexity.ai | Tier, balance, lifetime spend, auto-reload, 30d usage analytics |\n| **OpenCode (Zen + Console)** | `OPENCODE_API_KEY` / `ZEN_API_KEY` + browser session at opencode.ai | Zen models (API key) + balance, monthly limit/usage, subscription, payment method (cookie) |\n| **xAI (Grok)** | `XAI_API_KEY` | Rate limits, API key info |\n| **Z.AI Coding Plan** | `ZAI_API_KEY` / `ZHIPUAI_API_KEY` | Coding plan quotas, model/tool usage, daily trends |\n| **Google Gemini API** | `GEMINI_API_KEY` / `GOOGLE_API_KEY` | Rate limits, model limits |\n| **Alibaba Cloud** | `ALIBABA_CLOUD_API_KEY` | Quotas, credits, per-model tracking |\n\n## Configuration\n\nNo config file needed — auto-detection handles everything. Override or extend via:\n\n- macOS/Linux: `~/.config/openusage/settings.json`\n- Windows: `%APPDATA%\\openusage\\settings.json`\n\n```json\n{\n  \"auto_detect\": true,\n  \"ui\": { \"refresh_interval_seconds\": 30 },\n  \"accounts\": [\n    {\n      \"id\": \"openai-personal\",\n      \"provider\": \"openai\",\n      \"api_key_env\": \"OPENAI_API_KEY\",\n      \"probe_model\": \"gpt-4.1-mini\"\n    }\n  ]\n}\n```\n\nFull reference: [`configs/example_settings.json`](configs/example_settings.json)\n\n### External themes\n\nYou can define custom themes as JSON files loaded at startup from:\n\n- `~/.config/openusage/themes/*.json` (macOS/Linux)\n- `%APPDATA%\\\\openusage\\\\themes\\\\*.json` (Windows)\n- Any extra directory in `OPENUSAGE_THEME_DIR` (path-list separated)\n\nTheme files use the same color token fields as built-ins. Browse the bundled examples for reference shapes — every shipped theme lives at [`internal/tui/bundled_themes/`](internal/tui/bundled_themes/).\n\n## Daemon\n\nBackground data collection, even when the dashboard isn't open:\n\n```bash\nopenusage telemetry daemon                # Run in foreground\nopenusage telemetry daemon install        # Install as system service (launchd / systemd)\nopenusage telemetry daemon status         # Check status\nopenusage telemetry daemon uninstall      # Uninstall\n```\n\nInstalled services snapshot the provider env vars currently set in your shell.\nIf you change API key env vars later, rerun `openusage telemetry daemon install`\nto refresh the service environment.\n\nManage tool integrations:\n\n```bash\nopenusage integrations list [--all]       # List integration statuses\nopenusage integrations install \u003cid\u003e       # Install hook/plugin\nopenusage integrations uninstall \u003cid\u003e     # Remove\n```\n\n## Keybindings\n\n| Key | Action |\n|---|---|\n| `Tab` | Switch views |\n| `j` / `k`, `Up` / `Down` | Move cursor |\n| `h` / `l`, `Left` / `Right` | Navigate panels |\n| `Enter` / `Esc` | Open detail / back |\n| `PgUp` / `PgDn` | Scroll tile |\n| `[ ]` | Switch detail tabs |\n| `r` | Refresh all |\n| `/` | Filter providers |\n| `t` | Cycle theme |\n| `w` | Cycle time window |\n| `,` | Open settings |\n| `Shift+J` / `Shift+K` | Reorder providers |\n| `?` | Help |\n| `q` | Quit |\n\n## Development\n\n```bash\nmake build    # Build binary to ./bin/openusage\nmake test     # Run tests with -race and coverage\nmake lint     # golangci-lint\nmake run      # go run cmd/openusage/main.go\nmake demo     # Preview with simulated data (no API keys needed)\n```\n\nDebug mode: `OPENUSAGE_DEBUG=1 openusage`\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanekbaraniewski%2Fopenusage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjanekbaraniewski%2Fopenusage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanekbaraniewski%2Fopenusage/lists"}