{"id":49281814,"url":"https://github.com/mai0313/vibecodingtracker","last_synced_at":"2026-07-01T20:00:50.726Z","repository":{"id":317395637,"uuid":"1067109075","full_name":"Mai0313/VibeCodingTracker","owner":"Mai0313","description":"Track AI coding costs in real-time — a lightweight Rust CLI/TUI for Claude Code, Codex, Copilot \u0026 Gemini usage and cost analytics","archived":false,"fork":false,"pushed_at":"2026-06-26T19:23:56.000Z","size":1864,"stargazers_count":9,"open_issues_count":0,"forks_count":3,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-27T07:04:42.668Z","etag":null,"topics":["ai","claude-code","cli","codex","copilot","cost-tracking","developer-tools","gemini","llm","rust","token-usage","tui"],"latest_commit_sha":null,"homepage":"https://mai0313.github.io/VibeCodingTracker/","language":"Rust","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/Mai0313.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","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":null,"dco":null,"cla":null}},"created_at":"2025-09-30T11:47:21.000Z","updated_at":"2026-06-26T19:23:59.000Z","dependencies_parsed_at":"2025-10-03T17:34:46.367Z","dependency_job_id":null,"html_url":"https://github.com/Mai0313/VibeCodingTracker","commit_stats":null,"previous_names":["mai0313/codex_usage","mai0313/vibecodingtracker"],"tags_count":64,"template":false,"template_full_name":null,"purl":"pkg:github/Mai0313/VibeCodingTracker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mai0313%2FVibeCodingTracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mai0313%2FVibeCodingTracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mai0313%2FVibeCodingTracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mai0313%2FVibeCodingTracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mai0313","download_url":"https://codeload.github.com/Mai0313/VibeCodingTracker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mai0313%2FVibeCodingTracker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35020872,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-01T02:00:05.325Z","response_time":130,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","claude-code","cli","codex","copilot","cost-tracking","developer-tools","gemini","llm","rust","token-usage","tui"],"created_at":"2026-04-25T19:01:16.874Z","updated_at":"2026-07-01T20:00:50.718Z","avatar_url":"https://github.com/Mai0313.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\" markdown=\"1\"\u003e\n\n# Vibe Coding Tracker — AI Coding Assistant Usage Tracker\n\n\u003cimg src=\"assets/social-preview.png\" alt=\"Vibe Coding Tracker social preview\" width=\"640\"\u003e\n\n[![Crates.io](https://img.shields.io/crates/v/vibe_coding_tracker?logo=rust\u0026style=flat-square\u0026color=E05D44)](https://crates.io/crates/vibe_coding_tracker)\n[![Crates.io Downloads](https://img.shields.io/crates/d/vibe_coding_tracker?logo=rust\u0026style=flat-square)](https://crates.io/crates/vibe_coding_tracker)\n[![npm version](https://img.shields.io/npm/v/vibe-coding-tracker?logo=npm\u0026style=flat-square\u0026color=CB3837)](https://www.npmjs.com/package/vibe-coding-tracker)\n[![npm downloads](https://img.shields.io/npm/dt/vibe-coding-tracker?logo=npm\u0026style=flat-square)](https://www.npmjs.com/package/vibe-coding-tracker)\n[![PyPI version](https://img.shields.io/pypi/v/vibe_coding_tracker?logo=python\u0026style=flat-square\u0026color=3776AB)](https://pypi.org/project/vibe_coding_tracker/)\n[![PyPI downloads](https://img.shields.io/pypi/dm/vibe_coding_tracker?logo=python\u0026style=flat-square)](https://pypi.org/project/vibe-coding-tracker)\n[![rust](https://img.shields.io/badge/Rust-stable-orange?logo=rust\u0026logoColor=white\u0026style=flat-square)](https://www.rust-lang.org/)\n[![tests](https://img.shields.io/github/actions/workflow/status/Mai0313/VibeCodingTracker/test.yml?label=tests\u0026logo=github\u0026style=flat-square)](https://github.com/Mai0313/VibeCodingTracker/actions/workflows/test.yml)\n[![code-quality](https://img.shields.io/github/actions/workflow/status/Mai0313/VibeCodingTracker/code-quality-check.yml?label=code-quality\u0026logo=github\u0026style=flat-square)](https://github.com/Mai0313/VibeCodingTracker/actions/workflows/code-quality-check.yml)\n[![license](https://img.shields.io/badge/License-MIT-green.svg?labelColor=gray\u0026style=flat-square)](https://github.com/Mai0313/VibeCodingTracker/tree/main?tab=License-1-ov-file)\n[![Star on GitHub](https://img.shields.io/github/stars/Mai0313/VibeCodingTracker?style=social\u0026label=Star)](https://github.com/Mai0313/VibeCodingTracker)\n[![PRs](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/Mai0313/VibeCodingTracker/pulls)\n\n\u003c/div\u003e\n\n**Track your AI coding costs in real-time.** Vibe Coding Tracker is a lightweight, high-performance CLI tool built in Rust that monitors and analyzes your Claude Code, Codex, Copilot, Gemini, and OpenCode usage — with detailed cost breakdowns, token statistics, and code operation insights, all while keeping the memory footprint minimal.\n\n[English](README.md) | [繁體中文](README.zh-TW.md) | [简体中文](README.zh-CN.md)\n\n\u003e Note: CLI examples use the short alias `vct`. If you installed via npm/pip/cargo, the binary might be named `vibe_coding_tracker` or `vct`. Create an alias or replace `vct` with the full name when running commands if needed.\n\n---\n\n## Why Vibe Coding Tracker?\n\n### Know Your Costs\n\nStop wondering how much your AI coding sessions cost. Get **real-time cost tracking** with automatic pricing updates from [LiteLLM](https://github.com/BerriAI/litellm).\n\n### Ultra-Lightweight\n\nBuilt with Rust for minimal resource footprint. The interactive TUI dashboard typically sits at **under ~50 MB of resident memory** once the first refresh is done, even with hundreds of long-context sessions on disk — no Electron, no bloated runtimes. The usage path parses each session file in a lean usage-only mode and bypasses the cache, and we tune glibc's arena count at startup to keep long-running RSS honest.\n\n### Beautiful Visualizations\n\nChoose your preferred view:\n\n- **Interactive Dashboard**: Auto-refreshing terminal UI with live updates, scrollable model list (arrow keys), and compact K/M/B number formatting\n- **Static Reports**: Professional tables for documentation\n- **Script-Friendly**: Plain text and JSON for automation\n- **Full Precision**: Export exact costs for accounting\n\n### Zero Configuration\n\nAutomatically detects and processes logs from Claude Code, Codex, Copilot, Gemini, and OpenCode. No setup required — just run and analyze.\n\n### Rich Insights\n\n- Token usage by model and date\n- Cost breakdown by cache types (read / create)\n- File operations tracking (edit, read, write lines)\n- Tool call history (Bash, Edit, Read, Write, TodoWrite)\n- Per-provider totals\n\n---\n\n## Key Features\n\n| Feature               | Description                                                          |\n| --------------------- | -------------------------------------------------------------------- |\n| **Multi-Provider**    | Claude Code, Codex, Copilot, and Gemini — all in one place           |\n| **Smart Pricing**     | Fuzzy model matching + daily cache from LiteLLM                      |\n| **4 Display Modes**   | Interactive TUI, static table, plain text, and JSON                  |\n| **Dual Analysis**     | Token/cost stats (`usage`) + code operation stats (`analysis`)       |\n| **Ultra-Lightweight** | Under ~50 MB RSS in the TUI, streaming JSONL parse — built with Rust |\n| **Live Updates**      | Real-time dashboard refreshes every second                           |\n| **Efficient Caching** | Smart daily cache reduces API calls                                  |\n\n---\n\n## Quick Start\n\n### Installation\n\nChoose the installation method that works best for you:\n\n\u003e **Developers**: If you want to build from source or contribute to development, please see [CONTRIBUTING.md](.github/CONTRIBUTING.md).\n\n#### Method 1: Install from npm\n\n**Prerequisites**: [Node.js](https://nodejs.org/) v22 or higher\n\nChoose one of the following package names (they are identical):\n\n```bash\n# Main package\nnpm install -g vibe-coding-tracker\n\n# Short alias with scope\nnpm install -g @mai0313/vct\n\n# Full name with scope\nnpm install -g @mai0313/vibe-coding-tracker\n```\n\n#### Method 2: Install from PyPI\n\n**Prerequisites**: Python 3.8 or higher\n\n```bash\npip install vibe_coding_tracker\n# Or with uv\nuv pip install vibe_coding_tracker\n```\n\n#### Method 3: Install from crates.io\n\nInstall using Cargo from the official Rust package registry:\n\n```bash\ncargo install vibe_coding_tracker\n```\n\n### First Run\n\n```bash\n# View your usage with the interactive dashboard\nvct usage\n\n# Or run the binary built by Cargo/pip\nvibe_coding_tracker usage\n\n# Analyze code operations across all sessions\nvct analysis\n```\n\n---\n\n## Command Guide\n\n### Quick Reference\n\n```\nvct \u003cCOMMAND\u003e [OPTIONS]\n# Replace with `vibe_coding_tracker` if you are using the full binary name\n\nCommands:\n  analysis    Analyze JSONL conversation files (single file or all sessions)\n  usage       Display token usage statistics\n  statusline  Cache Claude Code rate limits from a statusLine hook (stdin JSON)\n  version     Display version information\n  update      Update to the latest version from GitHub releases\n  help        Print this message or the help of the given subcommand(s)\n```\n\nTime range flags (shared by `usage` and `analysis`, mutually exclusive, default `--all`):\n\n| Flag          | Window                            |\n| ------------- | --------------------------------- |\n| `--daily`     | Sessions modified today           |\n| `--weekly`    | Current ISO week (Monday → today) |\n| `--monthly`   | Current calendar month            |\n| `-a`, `--all` | Every session on disk (default)   |\n\n---\n\n## Usage Command\n\n**Track your spending across all AI coding sessions.**\n\n### Flags\n\n| Flag                                           | Purpose                             |\n| ---------------------------------------------- | ----------------------------------- |\n| *(none)*                                       | Interactive TUI dashboard (default) |\n| `--table`                                      | Static table, no TUI                |\n| `--text`                                       | Plain text, script-friendly         |\n| `--json`                                       | JSON with enriched pricing metadata |\n| `--output \u003cFILE\u003e`                              | Save enriched JSON to a file        |\n| `--daily` / `--weekly` / `--monthly` / `--all` | Time range filter (see table above) |\n\n### Basic Usage\n\n```bash\n# Interactive dashboard (recommended)\nvct usage\n\n# Static table for reports\nvct usage --table\n\n# Plain text for scripts\nvct usage --text\n\n# JSON for data processing (includes cost_usd and matched_model fields)\nvct usage --json\n\n# Save enriched JSON straight to a file\nvct usage --output report.json\n\n# Combine time range with output format\nvct usage --weekly\nvct usage --table --monthly\nvct usage --json --daily\n```\n\n\u003e [!NOTE]\n\u003e Model rows are sorted by cost in ascending order, so the highest-spending model is listed last (right above the `TOTAL` row in `--table`). This applies to the interactive dashboard, `--table`, and `--text` output; `--json` preserves the same order. The interactive dashboard also hides models with zero usage in the selected range.\n\n### Preview: Interactive Dashboard (`vct usage`)\n\n```\n┌─────────────────────────────────────────────────────────────────────────────────────────────┐\n│ Model                         Input   Output  Cache Read  Cache Write    Total  Cost (USD)  │\n│                                                                                             │\n│ gemini-3.1-pro-preview         129K    10.3K       67.4K            0     207K       $0.40  │\n│ claude-haiku-4-5-20251001     5.57K    19.8K       4.63M         620K    5.27M       $1.34  │\n│ claude-opus-4-6               25.7K     179K       40.8M        2.57M    43.6M      $77.59  │\n└─────────────────────────────────────────────────────────────────────────────────────────────┘\n┌─────────────────────────────────────────────────────────────────────────────────────────────┐\n│ Provider                      Tokens      Cost   Active Days                                │\n│                                                                                             │\n│ Claude Code                    48.9M    $78.93             3                                │\n│ Gemini                          207K     $0.40             1                                │\n└─────────────────────────────────────────────────────────────────────────────────────────────┘\n┌─────────────────────────────────────────────────────────────────────────────────────────────┐\n│  Total Cost: $79.33  |  Total Tokens: 49.3M  |  Models: 3  |  Memory: 42.8 MB               │\n└─────────────────────────────────────────────────────────────────────────────────────────────┘\n  ↑/↓ scroll  PgUp/PgDn page  g/G top/end  r refresh  q quit  |  ★ github.com/Mai0313/VibeCodingTracker\n```\n\n### What It Scans\n\nThe tool automatically scans these directories:\n\n- `~/.claude/projects/**/*.jsonl` (Claude Code — recursive, includes subagent logs)\n- `~/.codex/sessions/**/*.jsonl` (Codex — recursive, includes daily subdirectories)\n- `~/.copilot/session-state/\u003csessionId\u003e/events.jsonl` (Copilot CLI)\n- `~/.gemini/tmp/\u003cproject_hash\u003e/chats/*.jsonl` (Gemini CLI)\n- `~/.local/share/opencode/opencode.db` (OpenCode — SQLite database; honors `$XDG_DATA_HOME`)\n\n### Live Quota Panels\n\nAt the bottom of the interactive dashboard, the per-provider stats sit on the left and two live quota panels sit on the right:\n\n```\n┌ Provider/Tokens/Cost/Days ┬ Claude ────────┬ Codex ──────────┐\n│ Claude    1.2M  $3.00  4d │ 5h ▰▰▱▱▱  16%  │ Plan: plus      │\n│ Codex      800K $0.00  6d │    ↻ 4h13m     │ 5h ▰▰▱▱▱  27%   │\n│ ...                       │ 7d ▰▰▰▱▱  28%  │ 7d ▱▱▱▱▱   4%   │\n│                           │ updated 2m ago │ Credits: 0  +2  │\n└───────────────────────────┴────────────────┴─────────────────┘\n```\n\n- **Claude** — 5-hour and weekly rate-limit usage. Claude Code only exposes these limits through its `statusLine` hook, so wire `vct statusline ingest` into your statusLine (see [Statusline Command](#statusline-command)) for this panel to populate.\n- **Codex** — plan tier, 5-hour and weekly usage, and credit balance. Pulled live from the ChatGPT backend (`wham/usage`) using the token in `~/.codex/auth.json` on a background thread; when unavailable it falls back to the newest `rate_limits` in your Codex session logs (the title shows `(API)` vs `(session)`).\n\nQuota panels appear only in the interactive TUI; `--table`, `--text`, and `--json` are unchanged.\n\n---\n\n## Analysis Command\n\n**Deep dive into code operations — see exactly what your AI assistant did.**\n\n### Flags\n\n| Flag                                           | Purpose                                                     |\n| ---------------------------------------------- | ----------------------------------------------------------- |\n| *(none)*                                       | Interactive TUI dashboard over all sessions                 |\n| `--path \u003cFILE\u003e`                                | Analyze a single JSONL/JSON conversation file (prints JSON) |\n| `--table`                                      | Static table with per-provider totals                       |\n| `--text`                                       | Plain text, script-friendly                                 |\n| `--json`                                       | JSON array of aggregated rows printed to stdout             |\n| `--output \u003cFILE\u003e`                              | Save results as pretty-printed JSON                         |\n| `--daily` / `--weekly` / `--monthly` / `--all` | Time range filter (see table above)                         |\n\nSee [`examples/`](examples/) for sample inputs and matching JSON outputs for all four providers.\n\n### Basic Usage\n\n```bash\n# Interactive dashboard for all sessions (default)\nvct analysis\n\n# Static table output with per-provider totals\nvct analysis --table\n\n# Plain text for scripts\nvct analysis --text\n\n# JSON of aggregated rows for data processing\nvct analysis --json\n\n# Analyze a single conversation file → stdout JSON\nvct analysis --path ~/.claude/projects/session.jsonl\n\n# Save results to JSON\nvct analysis --output report.json\n\n# Combine time range with output format\nvct analysis --weekly\nvct analysis --table --monthly\nvct analysis --json --daily\nvct analysis --output today.json --daily\n```\n\n### Preview: Interactive Dashboard (`vct analysis`)\n\n```\n┌─────────────────────────────────────────────────────────────────────────────────────────────┐\n│ Model                     Edit Lines  Read Lines Write Lines  Bash  Edit  Read  Write       │\n│                                                                                             │\n│ claude-haiku-4-5-20251001           0           0           0    43     0    59      0      │\n│ claude-opus-4-6                1.28K       13.3K       1.58K    82   146   209     62       │\n│ gemini-3.1-pro-preview             0           0           0     0     0     0      0       │\n└─────────────────────────────────────────────────────────────────────────────────────────────┘\n┌─────────────────────────────────────────────────────────────────────────────────────────────┐\n│ Provider        Edit Lines Read Lines Write Lines Bash Edit Read TodoWrite Write Days       │\n│                                                                                             │\n│ Claude Code          1.28K      13.3K       1.58K  125  146  268        18    62    3       │\n│ Gemini                   0          0           0    0    0    0         0     0    1       │\n└─────────────────────────────────────────────────────────────────────────────────────────────┘\n┌─────────────────────────────────────────────────────────────────────────────────────────────┐\n│  Total Lines: 16.1K  |  Total Tools: 619  |  Models: 3  |  Memory: 41.2 MB                  │\n└─────────────────────────────────────────────────────────────────────────────────────────────┘\n  ↑/↓ scroll  PgUp/PgDn page  g/G top/end  r refresh  q quit  |  ★ github.com/Mai0313/VibeCodingTracker\n```\n\n---\n\n## Statusline Command\n\n**Feed Claude Code rate limits into the `usage` dashboard.**\n\nClaude Code only exposes its 5-hour / weekly rate limits through the `statusLine` hook's stdin JSON, so `vct` captures them from there and caches them to `~/.vibe_coding_tracker/claude_rate_limits.json` for the Claude quota panel.\n\n### If you already have a statusLine\n\nAdd one backgrounded line to your existing statusLine script. It has zero impact on your current display and is isolated, so a vct error can never disturb the statusLine:\n\n```bash\nprintf '%s' \"$input\" | vct statusline ingest \u003e/dev/null 2\u003e\u00261 \u0026\n```\n\n### If you do not have a statusLine yet\n\nPoint Claude Code's `~/.claude/settings.json` straight at vct, which caches the limits and prints a compact one-line status:\n\n```json\n{\n  \"statusLine\": {\n    \"type\": \"command\",\n    \"command\": \"vct statusline\"\n  }\n}\n```\n\n---\n\n## Update Command\n\n**Keep your installation up-to-date automatically.**\n\nThe update command works for **all installation methods** (npm/pip/cargo/manual) by directly downloading and replacing the binary from GitHub releases.\n\n### Basic Usage\n\n```bash\n# Check for updates\nvct update --check\n\n# Interactive update with confirmation\nvct update\n\n# Force update — always downloads latest version\nvct update --force\n```\n\n### Preview (`vct update --check`)\n\n```\nCurrent version: v0.10.3\nChecking for latest release...\nLatest version: v0.10.3 — you are up to date!\n```\n\n---\n\n## Version Command\n\nReport the embedded build metadata (binary version, Rust toolchain, Cargo version):\n\n```bash\nvct version          # Pretty table\nvct version --text   # One-field-per-line, script-friendly\nvct version --json   # Machine-readable JSON\n```\n\nThe binary version is produced at build time by `build.rs` from `git describe`, so development builds include commit count + short SHA + `dirty` suffix when applicable.\n\n---\n\n## Smart Pricing System\n\n### How It Works\n\n1. **Automatic Updates**: Fetches pricing from [LiteLLM](https://github.com/BerriAI/litellm) daily\n2. **Smart Caching**: Stores pricing in `~/.vibe_coding_tracker/` for 24 hours\n3. **Fuzzy Matching**: Finds best match even for custom model names\n4. **Always Accurate**: Ensures you get the latest pricing\n\n### Model Matching\n\n**Priority Order**:\n\n1. **Exact Match**: `claude-sonnet-4` → `claude-sonnet-4`\n2. **Normalized**: `claude-sonnet-4-20250514` → `claude-sonnet-4`\n3. **Substring**: `custom-gpt-4` → `gpt-4`\n4. **Fuzzy (AI-powered)**: Uses Jaro-Winkler similarity (70% threshold)\n5. **Fallback**: Shows $0.00 if no match found\n\n---\n\n## Docker Support\n\n```bash\n# Build image\ndocker build -f docker/Dockerfile --target prod -t vibe_coding_tracker:latest .\n\n# Run with your sessions\ndocker run --rm \\\n    -v ~/.claude:/root/.claude \\\n    -v ~/.codex:/root/.codex \\\n    -v ~/.copilot:/root/.copilot \\\n    -v ~/.gemini:/root/.gemini \\\n    -v ~/.local/share/opencode:/root/.local/share/opencode \\\n    vibe_coding_tracker:latest usage\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmai0313%2Fvibecodingtracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmai0313%2Fvibecodingtracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmai0313%2Fvibecodingtracker/lists"}