vibe_coding_tracker 0.5.12

Vibe Coding Tracker - AI coding assistant telemetry/usage parser, aggregate JSONL events into CodeAnalysis results
Documentation
{
  "extensionName": "Gemini",
  "insightsVersion": "0.5.10-gdfb83b9-dirty",
  "machineId": "18f309cbbb654be69eff5ff79d2f3fa6",
  "records": [
    {
      "conversationUsage": {
        "gemini-3.1-pro-preview-customtools": {
          "cache_read_input_tokens": 39826,
          "input_tokens": 76348,
          "output_tokens": 9325,
          "thoughts_tokens": 11616,
          "tool_tokens": 0,
          "total_tokens": 97289
        }
      },
      "editFileDetails": [],
      "folderPath": "",
      "gitRemoteUrl": "https://github.com/Mai0313/VibeCodingTracker",
      "readFileDetails": [
        {
          "characterCount": 9775,
          "filePath": "README.md",
          "lineCount": 294,
          "timestamp": 1774606758274
        },
        {
          "characterCount": 7003,
          "filePath": "README.zh-CN.md",
          "lineCount": 293,
          "timestamp": 1774606758274
        },
        {
          "characterCount": 7016,
          "filePath": "README.zh-TW.md",
          "lineCount": 293,
          "timestamp": 1774606758274
        }
      ],
      "runCommandDetails": [],
      "taskId": "8a20078e-2d5e-4f81-a640-9b879bbb7e6d",
      "timestamp": 1774606920021,
      "toolCallCounts": {
        "Bash": 0,
        "Edit": 0,
        "Read": 3,
        "TodoWrite": 0,
        "Write": 4
      },
      "totalEditCharacters": 0,
      "totalEditLines": 0,
      "totalReadCharacters": 23794,
      "totalReadLines": 880,
      "totalUniqueFiles": 4,
      "totalWriteCharacters": 26003,
      "totalWriteLines": 894,
      "writeFileDetails": [
        {
          "characterCount": 8850,
          "content": "<div align=\"center\" markdown=\"1\">\n\n# Vibe Coding Tracker — AI Coding Assistant Usage Tracker\n\n[![Crates.io](https://img.shields.io/crates/v/vibe_coding_tracker?logo=rust&style=flat-square&color=E05D44)](https://crates.io/crates/vibe_coding_tracker)\n[![Crates.io Downloads](https://img.shields.io/crates/d/vibe_coding_tracker?logo=rust&style=flat-square)](https://crates.io/crates/vibe_coding_tracker)\n[![npm version](https://img.shields.io/npm/v/vibe-coding-tracker?logo=npm&style=flat-square&color=CB3837)](https://www.npmjs.com/package/vibe-coding-tracker)\n[![npm downloads](https://img.shields.io/npm/dt/vibe-coding-tracker?logo=npm&style=flat-square)](https://www.npmjs.com/package/vibe-coding-tracker)\n[![PyPI version](https://img.shields.io/pypi/v/vibe_coding_tracker?logo=python&style=flat-square&color=3776AB)](https://pypi.org/project/vibe_coding_tracker/)\n[![PyPI downloads](https://img.shields.io/pypi/dm/vibe_coding_tracker?logo=python&style=flat-square)](https://pypi.org/project/vibe-coding-tracker)\n[![rust](https://img.shields.io/badge/Rust-stable-orange?logo=rust&logoColor=white&style=flat-square)](https://www.rust-lang.org/)\n[![tests](https://img.shields.io/github/actions/workflow/status/Mai0313/VibeCodingTracker/test.yml?label=tests&logo=github&style=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&logo=github&style=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&style=flat-square)](https://github.com/Mai0313/VibeCodingTracker/tree/master?tab=License-1-ov-file)\n[![Star on GitHub](https://img.shields.io/github/stars/Mai0313/VibeCodingTracker?style=social&label=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</div>\n\n**Track your AI coding costs in real-time.** Vibe Coding Tracker is a powerful CLI tool that helps you monitor and analyze your Claude Code, Codex, Copilot, and Gemini usage, providing detailed cost breakdowns, token statistics, and code operation insights.\n\n[English](README.md) | [繁體中文](README.zh-TW.md) | [简体中文](README.zh-CN.md)\n\n> 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### 📊 Beautiful Visualizations\n\nChoose your preferred view:\n\n- **Interactive Dashboard**: Auto-refreshing terminal UI with live updates\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, and Gemini. 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\n- File operations tracking\n- Command execution history\n- Git repository information\n\n---\n\n## ✨ Key Features\n\n| Feature                    | Description                                                          |\n| -------------------------- | -------------------------------------------------------------------- |\n| 🤖 **Auto-Detection**      | Intelligently identifies Claude Code, Codex, Copilot, or Gemini logs |\n| 💵 **Smart Pricing**       | Fuzzy model matching + daily cache for speed                         |\n| 🎨 **4 Display Modes**     | Interactive, Table, Text, and JSON outputs                           |\n| 📈 **Comprehensive Stats** | Tokens, costs, file ops, and tool calls                              |\n| ⚡ **High Performance**    | Built with Rust for speed and reliability                            |\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> 👨‍💻 **Developers**: If you want to build from source or contribute to development, please see [CONTRIBUTING.md](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 short alias (if available)\nvct usage\n\n# Or run the binary built by Cargo/pip\nvibe_coding_tracker usage\n\n# Analyze a specific conversation\nvibe_coding_tracker analysis --path ~/.claude/projects/session.jsonl\n```\n\n---\n\n## 📖 Command Guide\n\n### 🔍 Quick Reference\n\n```bash\nvct <COMMAND> [OPTIONS]\n# Replace with `vibe_coding_tracker` if you are using the full binary name\n\nCommands:\nanalysis    Analyze JSONL conversation files (single file or all sessions)\nusage       Display token usage statistics\nversion     Display version information\nupdate      Update to the latest version from GitHub releases\nhelp        Print this message or the help of the given subcommand(s)\n```\n\n---\n\n## 💰 Usage Command\n\n**Track your spending across all AI coding sessions.**\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\nvct usage --json\n```\n\n### What You Get\n\nThe tool scans these directories automatically:\n\n- `~/.claude/projects/*.jsonl` (Claude Code)\n- `~/.codex/sessions/*.jsonl` (Codex)\n- `~/.copilot/history-session-state/*.json` (Copilot)\n- `~/.gemini/tmp/<project_hash>/chats/*.json` (Gemini)\n\n---\n\n## 📊 Analysis Command\n\n**Deep dive into conversation files - single file or batch analysis.**\n\n### Basic Usage\n\n```bash\n# Single file: Analyze and display\nvct analysis --path ~/.claude/projects/session.jsonl\n\n# Single file: Save to file\nvct analysis --path ~/.claude/projects/session.jsonl --output report.json\n\n# Batch: Analyze all sessions with interactive table (default)\nvct analysis\n\n# Batch: Static table output with daily averages\nvct analysis --table\n\n# Batch: Save aggregated results to JSON\nvct analysis --output batch_report.json\n\n# Batch with provider grouping: Output complete records grouped by provider (JSON format)\nvct analysis --all\n\n# Save the grouped results to a file\nvct analysis --all --output grouped_report.json\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 (even if already up-to-date)\nvct update --force\n```\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\t-v ~/.claude:/root/.claude \\\n\t-v ~/.codex:/root/.codex \\\n\t-v ~/.copilot:/root/.copilot \\\n\t-v ~/.gemini:/root/.gemini \\\n\tvibe_coding_tracker:latest usage\n```",
          "filePath": "README.md",
          "lineCount": 264,
          "timestamp": 1774606910741
        },
        {
          "characterCount": 6306,
          "content": "<div align=\"center\" markdown=\"1\">\n\n# Vibe Coding Tracker — AI 编程助手使用量追踪器\n\n[![Crates.io](https://img.shields.io/crates/v/vibe_coding_tracker?logo=rust&style=flat-square&color=E05D44)](https://crates.io/crates/vibe_coding_tracker)\n[![Crates.io Downloads](https://img.shields.io/crates/d/vibe_coding_tracker?logo=rust&style=flat-square)](https://crates.io/crates/vibe_coding_tracker)\n[![npm version](https://img.shields.io/npm/v/vibe-coding-tracker?logo=npm&style=flat-square&color=CB3837)](https://www.npmjs.com/package/vibe-coding-tracker)\n[![npm downloads](https://img.shields.io/npm/dt/vibe-coding-tracker?logo=npm&style=flat-square)](https://www.npmjs.com/package/vibe-coding-tracker)\n[![PyPI version](https://img.shields.io/pypi/v/vibe_coding_tracker?logo=python&style=flat-square&color=3776AB)](https://pypi.org/project/vibe_coding_tracker/)\n[![PyPI downloads](https://img.shields.io/pypi/dm/vibe_coding_tracker?logo=python&style=flat-square)](https://pypi.org/project/vibe-coding-tracker)\n[![rust](https://img.shields.io/badge/Rust-stable-orange?logo=rust&logoColor=white&style=flat-square)](https://www.rust-lang.org/)\n[![tests](https://img.shields.io/github/actions/workflow/status/Mai0313/VibeCodingTracker/test.yml?label=tests&logo=github&style=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&logo=github&style=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&style=flat-square)](https://github.com/Mai0313/VibeCodingTracker/tree/master?tab=License-1-ov-file)\n[![Star on GitHub](https://img.shields.io/github/stars/Mai0313/VibeCodingTracker?style=social&label=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</div>\n\n**实时追踪您的 AI 编程成本。** Vibe Coding Tracker 是一个强大的 CLI 工具,帮助您监控和分析 Claude Code、Codex、Copilot 和 Gemini 的使用情况,提供详细的成本分解、token 统计和代码操作洞察。\n\n[English](README.md) | [繁體中文](README.zh-TW.md) | [简体中文](README.zh-CN.md)\n\n> 注意:以下 CLI 示例默认使用短别名 `vct`。若您通过 npm/pip/cargo 安装,二进制文件名称可能为 `vibe_coding_tracker` 或 `vct`,可以自行建立别名,或在执行指令时将 `vct` 换成完整名称。\n\n---\n\n## 🎯 为什么选择 Vibe Coding Tracker?\n\n### 💰 了解您的成本\n\n不再疑惑您的 AI 编程会话花费多少。通过 [LiteLLM](https://github.com/BerriAI/litellm) 自动更新定价,获取**实时成本追踪**。\n\n### 📊 精美的可视化\n\n选择您偏好的视图:\n\n- **交互式仪表板**:自动刷新的终端 UI,实时更新\n- **静态报表**:专业的表格,适合文档\n- **脚本友好**:纯文本和 JSON,便于自动化\n- **全精度**:导出精确成本,用于财务核算\n\n### 🚀 零配置\n\n自动检测并处理 Claude Code、Codex、Copilot 和 Gemini 的日志。无需设置——只需运行和分析。\n\n### 🎨 丰富的洞察\n\n- 按模型和日期的 token 使用量\n- 按缓存类型的成本分解\n- 文件操作追踪\n- 命令执行历史\n- Git 仓库信息\n\n---\n\n## ✨ 核心特性\n\n| 特性                | 描述                                                |\n| ------------------- | --------------------------------------------------- |\n| 🤖 **自动检测**     | 智能识别 Claude Code、Codex、Copilot 或 Gemini 日志 |\n| 💵 **智能定价**     | 模糊模型匹配 + 每日缓存以提高速度                   |\n| 🎨 **4 种显示模式** | 交互式、表格、文本和 JSON 输出                      |\n| 📈 **全面统计**     | Token、成本、文件操作和工具调用                     |\n| ⚡ **高性能**       | 使用 Rust 构建,速度快且可靠                        |\n| 🔄 **实时更新**     | 仪表板每秒刷新                                      |\n| 💾 **高效缓存**     | 智能的每日缓存减少 API 调用                         |\n\n---\n\n## 🚀 快速开始\n\n### 安装\n\n选择最适合您的安装方式:\n\n> 👨‍💻 **开发者**:如果您想从源码构建或参与开发,请参阅 [CONTRIBUTING.md](CONTRIBUTING.md)。\n\n#### 方式 1: 从 npm 安装\n\n**前置条件**: [Node.js](https://nodejs.org/) v22 或更高版本\n\n选择以下任一包名称(三者完全相同):\n\n```bash\n# 主要包\nnpm install -g vibe-coding-tracker\n\n# 带 scope 的短别名\nnpm install -g @mai0313/vct\n\n# 带 scope 的完整名称\nnpm install -g @mai0313/vibe-coding-tracker\n```\n\n#### 方式 2: 从 PyPI 安装\n\n**前置条件**: Python 3.8 或更高版本\n\n```bash\npip install vibe_coding_tracker\n# 或使用 uv\nuv pip install vibe_coding_tracker\n```\n\n#### 方式 3: 从 crates.io 安装\n\n使用 Cargo 从 Rust 官方包注册表安装:\n\n```bash\ncargo install vibe_coding_tracker\n```\n\n### 首次运行\n\n```bash\n# 使用交互式仪表板查看使用量(已设置短别名时)\nvct usage\n\n# 或使用完整名称\nvibe_coding_tracker usage\n\n# 分析特定对话\nvibe_coding_tracker analysis --path ~/.claude/projects/session.jsonl\n```\n\n---\n\n## 📖 命令指南\n\n### 🔍 快速参考\n\n```bash\nvct <命令 >[选项]\n# 若未设置别名,请改用 `vibe_coding_tracker` 完整二进制名称\n\n命令:\nanalysis 分析对话文件并导出数据(支持单文件或所有会话)\nusage 显示 token 使用量统计\nversion 显示版本信息\nupdate 从 GitHub releases 更新到最新版本\nhelp 显示此信息或给定子命令的说明\n```\n\n---\n\n## 💰 Usage 命令\n\n**追踪您所有 AI 编程会话的支出。**\n\n### 基本用法\n\n```bash\n# 交互式仪表板(推荐)\nvct usage\n\n# 静态表格,适合报表\nvct usage --table\n\n# 纯文本,适合脚本\nvct usage --text\n\n# JSON,适合数据处理\nvct usage --json\n```\n\n### 您将获得什么\n\n该工具自动扫描这些目录:\n\n- `~/.claude/projects/*.jsonl`(Claude Code)\n- `~/.codex/sessions/*.jsonl`(Codex)\n- `~/.copilot/history-session-state/*.json`(Copilot)\n- `~/.gemini/tmp/<project_hash>/chats/*.json`(Gemini)\n\n---\n\n## 📊 Analysis 命令\n\n**深入了解对话文件 - 单文件或批量分析。**\n\n### 基本用法\n\n```bash\n# 单文件:分析并显示\nvct analysis --path ~/.claude/projects/session.jsonl\n\n# 单文件:保存到文件\nvct analysis --path ~/.claude/projects/session.jsonl --output report.json\n\n# 批量:使用交互式表格分析所有会话(默认)\nvct analysis\n\n# 批量:静态表格输出并显示每日平均\nvct analysis --table\n\n# 批量:将汇总结果保存为 JSON\nvct analysis --output batch_report.json\n\n# 批量并依提供者分组:输出完整的 records,依提供者分组(JSON 格式)\nvct analysis --all\n\n# 将分组结果保存到文件\nvct analysis --all --output grouped_report.json\n```\n\n---\n\n## 🔄 Update 命令\n\n**自动保持安装版本为最新。**\n\nupdate 命令适用于**所有安装方式**(npm/pip/cargo/manual),直接从 GitHub releases 下载并替换二进制文件。\n\n### 基本用法\n\n```bash\n# 检查更新\nvct update --check\n\n# 交互式更新(会询问确认)\nvct update\n\n# 强制更新 - 总是下载最新版本(即使已是最新版本)\nvct update --force\n```\n\n---\n\n## 💡 智能定价系统\n\n### 运作原理\n\n1. **自动更新**:每天从 [LiteLLM](https://github.com/BerriAI/litellm) 获取定价\n2. **智能缓存**:在 `~/.vibe_coding_tracker/` 中存储定价 24 小时\n3. **模糊匹配**:即使对于自定义模型名称也能找到最佳匹配\n4. **始终准确**:确保您获取最新的定价\n\n### 模型匹配\n\n**优先顺序**:\n\n1. ✅ **精确匹配**:`claude-sonnet-4` → `claude-sonnet-4`\n2. 🔄 **规范化**:`claude-sonnet-4-20250514` → `claude-sonnet-4`\n3. 🔍 **子字符串**:`custom-gpt-4` → `gpt-4`\n4. 🎯 **模糊(AI 驱动)**:使用 Jaro-Winkler 相似度(70% 阈值)\n5. 💵 **后备**:如果找不到匹配则显示 $0.00\n\n---\n\n## 🐳 Docker 支持\n\n```bash\n# 构建镜像\ndocker build -f docker/Dockerfile --target prod -t vibe_coding_tracker:latest .\n\n# 使用您的会话运行\ndocker run --rm \\\n\t-v ~/.claude:/root/.claude \\\n\t-v ~/.codex:/root/.codex \\\n\t-v ~/.copilot:/root/.copilot \\\n\t-v ~/.gemini:/root/.gemini \\\n\tvibe_coding_tracker:latest usage\n```",
          "filePath": "README.zh-CN.md",
          "lineCount": 264,
          "timestamp": 1774606910741
        },
        {
          "characterCount": 6319,
          "content": "<div align=\"center\" markdown=\"1\">\n\n# Vibe Coding Tracker — AI 程式設計助手使用量追蹤器\n\n[![Crates.io](https://img.shields.io/crates/v/vibe_coding_tracker?logo=rust&style=flat-square&color=E05D44)](https://crates.io/crates/vibe_coding_tracker)\n[![Crates.io Downloads](https://img.shields.io/crates/d/vibe_coding_tracker?logo=rust&style=flat-square)](https://crates.io/crates/vibe_coding_tracker)\n[![npm version](https://img.shields.io/npm/v/vibe-coding-tracker?logo=npm&style=flat-square&color=CB3837)](https://www.npmjs.com/package/vibe-coding-tracker)\n[![npm downloads](https://img.shields.io/npm/dt/vibe-coding-tracker?logo=npm&style=flat-square)](https://www.npmjs.com/package/vibe-coding-tracker)\n[![PyPI version](https://img.shields.io/pypi/v/vibe_coding_tracker?logo=python&style=flat-square&color=3776AB)](https://pypi.org/project/vibe_coding_tracker/)\n[![PyPI downloads](https://img.shields.io/pypi/dm/vibe_coding_tracker?logo=python&style=flat-square)](https://pypi.org/project/vibe-coding-tracker)\n[![rust](https://img.shields.io/badge/Rust-stable-orange?logo=rust&logoColor=white&style=flat-square)](https://www.rust-lang.org/)\n[![tests](https://img.shields.io/github/actions/workflow/status/Mai0313/VibeCodingTracker/test.yml?label=tests&logo=github&style=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&logo=github&style=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&style=flat-square)](https://github.com/Mai0313/VibeCodingTracker/tree/master?tab=License-1-ov-file)\n[![Star on GitHub](https://img.shields.io/github/stars/Mai0313/VibeCodingTracker?style=social&label=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</div>\n\n**即時追蹤您的 AI 程式設計成本。** Vibe Coding Tracker 是一個強大的 CLI 工具,幫助您監控和分析 Claude Code、Codex、Copilot 和 Gemini 的使用情況,提供詳細的成本分解、token 統計和程式碼操作洞察。\n\n[English](README.md) | [繁體中文](README.zh-TW.md) | [简体中文](README.zh-CN.md)\n\n> 注意:以下 CLI 範例預設使用短別名 `vct`。若您透過 npm/pip/cargo 安裝,產生的二進位檔名稱可能為 `vibe_coding_tracker` 或 `vct`,可以自行建立別名,或在執行指令時將 `vct` 換成完整名稱。\n\n---\n\n## 🎯 為什麼選擇 Vibe Coding Tracker?\n\n### 💰 了解您的成本\n\n不再疑惑您的 AI 程式設計會話花費多少。透過 [LiteLLM](https://github.com/BerriAI/litellm) 自動更新定價,獲取**即時成本追蹤**。\n\n### 📊 精美的視覺化\n\n選擇您偏好的檢視:\n\n- **互動式儀表板**:自動重新整理的終端 UI,即時更新\n- **靜態報表**:專業的表格,適合文件\n- **指令碼友善**:純文字和 JSON,便於自動化\n- **完整精度**:匯出精確成本,用於財務核算\n\n### 🚀 零設定\n\n自動偵測並處理 Claude Code、Codex、Copilot 和 Gemini 的日誌。無需設定——只需執行和分析。\n\n### 🎨 豐富的洞察\n\n- 按模型和日期的 token 使用量\n- 按快取類型的成本分解\n- 檔案操作追蹤\n- 命令執行歷史\n- Git 儲存庫資訊\n\n---\n\n## ✨ 核心特性\n\n| 特性                | 描述                                                |\n| ------------------- | --------------------------------------------------- |\n| 🤖 **自動偵測**     | 智慧識別 Claude Code、Codex、Copilot 或 Gemini 日誌 |\n| 💵 **智慧定價**     | 模糊模型匹配 + 每日快取以提高速度                   |\n| 🎨 **4 種顯示模式** | 互動式、表格、文字和 JSON 輸出                      |\n| 📈 **全面統計**     | Token、成本、檔案操作和工具呼叫                     |\n| ⚡ **高效能**       | 使用 Rust 建置,速度快且可靠                        |\n| 🔄 **即時更新**     | 儀表板每秒重新整理                                  |\n| 💾 **高效快取**     | 智慧的每日快取減少 API 呼叫                         |\n\n---\n\n## 🚀 快速開始\n\n### 安裝\n\n選擇最適合您的安裝方式:\n\n> 👨‍💻 **開發者**:如果您想從原始碼建置或貢獻開發,請參閱 [CONTRIBUTING.md](CONTRIBUTING.md)。\n\n#### 方式 1: 從 npm 安裝\n\n**前置條件**: [Node.js](https://nodejs.org/) v22 或更高版本\n\n選擇以下任一套件名稱(三者完全相同):\n\n```bash\n# 主要套件\nnpm install -g vibe-coding-tracker\n\n# 帶 scope 的短別名\nnpm install -g @mai0313/vct\n\n# 帶 scope 的完整名稱\nnpm install -g @mai0313/vibe-coding-tracker\n```\n\n#### 方式 2: 從 PyPI 安裝\n\n**前置條件**: Python 3.8 或更高版本\n\n```bash\npip install vibe_coding_tracker\n# 或使用 uv\nuv pip install vibe_coding_tracker\n```\n\n#### 方式 3: 從 crates.io 安裝\n\n使用 Cargo 從 Rust 官方套件庫安裝:\n\n```bash\ncargo install vibe_coding_tracker\n```\n\n### 首次執行\n\n```bash\n# 使用互動式儀表板檢視使用量(已設定短別名時)\nvct usage\n\n# 或使用完整名稱\nvibe_coding_tracker usage\n\n# 分析特定對話\nvibe_coding_tracker analysis --path ~/.claude/projects/session.jsonl\n```\n\n---\n\n## 📖 命令指南\n\n### 🔍 快速參考\n\n```bash\nvct <命令 >[選項]\n# 若未設定別名,請改用 `vibe_coding_tracker`完整二進位名稱\n\n命令:\nanalysis 分析對話檔案並匯出資料(支援單檔案或所有會話)\nusage 顯示 token 使用量統計\nversion 顯示版本資訊\nupdate 從 GitHub releases 更新到最新版本\nhelp 顯示此訊息或給定子命令的說明\n```\n\n---\n\n## 💰 Usage 命令\n\n**追蹤您所有 AI 程式設計會話的支出。**\n\n### 基本用法\n\n```bash\n# 互動式儀表板(推薦)\nvct usage\n\n# 靜態表格,適合報表\nvct usage --table\n\n# 純文字,適合指令碼\nvct usage --text\n\n# JSON,適合資料處理\nvct usage --json\n```\n\n### 您將獲得什麼\n\n該工具自動掃描這些目錄:\n\n- `~/.claude/projects/*.jsonl`(Claude Code)\n- `~/.codex/sessions/*.jsonl`(Codex)\n- `~/.copilot/history-session-state/*.json`(Copilot)\n- `~/.gemini/tmp/<project_hash>/chats/*.json`(Gemini)\n\n---\n\n## 📊 Analysis 命令\n\n**深入了解對話檔案 - 單檔案或批次分析。**\n\n### 基本用法\n\n```bash\n# 單檔案:分析並顯示\nvct analysis --path ~/.claude/projects/session.jsonl\n\n# 單檔案:儲存到檔案\nvct analysis --path ~/.claude/projects/session.jsonl --output report.json\n\n# 批次:使用互動式表格分析所有會話(預設)\nvct analysis\n\n# 批次:靜態表格輸出並顯示每日平均\nvct analysis --table\n\n# 批次:將彙總結果儲存為 JSON\nvct analysis --output batch_report.json\n\n# 批次並依提供者分組:輸出完整的 records,依提供者分組(JSON 格式)\nvct analysis --all\n\n# 將分組結果儲存到檔案\nvct analysis --all --output grouped_report.json\n```\n\n---\n\n## 🔄 Update 命令\n\n**自動保持安裝版本為最新。**\n\nupdate 命令適用於**所有安裝方式**(npm/pip/cargo/manual),直接從 GitHub releases 下載並替換二進位檔。\n\n### 基本用法\n\n```bash\n# 檢查更新\nvct update --check\n\n# 互動式更新(會詢問確認)\nvct update\n\n# 強制更新 - 總是下載最新版本(即使已是最新版本)\nvct update --force\n```\n\n---\n\n## 💡 智慧定價系統\n\n### 運作原理\n\n1. **自動更新**:每天從 [LiteLLM](https://github.com/BerriAI/litellm) 取得定價\n2. **智慧快取**:在 `~/.vibe_coding_tracker/` 中儲存定價 24 小時\n3. **模糊匹配**:即使對於自訂模型名稱也能找到最佳匹配\n4. **始終準確**:確保您取得最新的定價\n\n### 模型匹配\n\n**優先順序**:\n\n1. ✅ **精確匹配**:`claude-sonnet-4` → `claude-sonnet-4`\n2. 🔄 **規範化**:`claude-sonnet-4-20250514` → `claude-sonnet-4`\n3. 🔍 **子字串**:`custom-gpt-4` → `gpt-4`\n4. 🎯 **模糊(AI 驅動)**:使用 Jaro-Winkler 相似度(70% 閾值)\n5. 💵 **後備**:如果找不到匹配則顯示 $0.00\n\n---\n\n## 🐳 Docker 支援\n\n```bash\n# 建置映像\ndocker build -f docker/Dockerfile --target prod -t vibe_coding_tracker:latest .\n\n# 使用您的會話執行\ndocker run --rm \\\n\t-v ~/.claude:/root/.claude \\\n\t-v ~/.codex:/root/.codex \\\n\t-v ~/.copilot:/root/.copilot \\\n\t-v ~/.gemini:/root/.gemini \\\n\tvibe_coding_tracker:latest usage\n```",
          "filePath": "README.zh-TW.md",
          "lineCount": 264,
          "timestamp": 1774606910741
        },
        {
          "characterCount": 4528,
          "content": "# Contributing to Vibe Coding Tracker\n\nFirst off, thanks for taking the time to contribute!\n\nAll types of contributions are encouraged and valued. See the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles them. Please make sure to read the relevant section before making your contribution. It will make it a lot easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions. \n\n## Table of Contents\n\n- [I Have a Question](#i-have-a-question)\n- [I Want To Contribute](#i-want-to-contribute)\n  - [Reporting Bugs](#reporting-bugs)\n  - [Suggesting Enhancements](#suggesting-enhancements)\n  - [Your First Code Contribution](#your-first-code-contribution)\n  - [Development Guide](#development-guide)\n    - [Building from Source](#building-from-source)\n    - [Running Tests](#running-tests)\n    - [Code Quality](#code-quality)\n\n## I Have a Question\n\nBefore you ask a question, it is best to search for existing [Issues](https://github.com/Mai0313/VibeCodingTracker/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first.\n\nIf you then still feel the need to ask a question and need clarification, we recommend the following:\n\n- Open an [Issue](https://github.com/Mai0313/VibeCodingTracker/issues/new).\n- Provide as much context as you can about what you're running into.\n- Provide project and platform versions (nodejs, mac, linux, rust, etc), depending on what seems relevant.\n\n## I Want To Contribute\n\n### Reporting Bugs\n\nA good bug report shouldn't leave others needing to chase you up for more information. Therefore, we ask you to investigate carefully, collect information and describe the issue in detail in your report.\n\n- Make sure that you are using the latest version.\n- Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment components/versions (Make sure that you have read the [documentation](README.md)).\n- Check if other users have experienced (and potentially already solved) the same issue you are having. Check if there is not already a bug report existing for your bug or error in the [bug tracker](https://github.com/Mai0313/VibeCodingTracker/issues).\n\n### Suggesting Enhancements\n\nThis section guides you through submitting an enhancement suggestion, including completely new features and minor improvements to existing functionality.\n\n- Make sure that you are using the latest version.\n- Read the [documentation](README.md) carefully and find out if the functionality is already covered, maybe by an individual configuration.\n- Perform a [search](https://github.com/Mai0313/VibeCodingTracker/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.\n- Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature.\n\n### Your First Code Contribution\n\nUnsure where to begin contributing? You can start by looking through `good first issue` and `help wanted` issues.\n\n### Development Guide\n\n#### Building from Source\n\nFor users who want to customize the build or contribute to development:\n\n```bash\n# 1. Clone the repository\ngit clone https://github.com/Mai0313/VibeCodingTracker.git\ncd VibeCodingTracker\n\n# 2. Build release version\ncargo build --release\n\n# 3. Binary location\n./target/release/vibe_coding_tracker\n\n# 4. Optional: create a short alias\n# Linux/macOS:\nsudo ln -sf \"$(pwd)/target/release/vibe_coding_tracker\" /usr/local/bin/vct\n\n# Or install to user directory:\nmkdir -p ~/.local/bin\nln -sf \"$(pwd)/target/release/vibe_coding_tracker\" ~/.local/bin/vct\n# Make sure ~/.local/bin is in your PATH\n```\n\n**Prerequisites**: [Rust toolchain](https://rustup.rs/) 1.85 or higher\n\n> [!NOTE]\n> This project uses **Rust 2024 edition** and requires Rust 1.85+. Update your toolchain with `rustup update` if needed.\n\n#### Running Tests\n\nBefore submitting a pull request, ensure all tests pass:\n\n```bash\ncargo test\n```\n\n#### Code Quality\n\nWe use `rustfmt` and `clippy` to ensure code quality. Please run the following commands to check your code before submitting a pull request:\n\n```bash\n# Format your code\ncargo fmt --all\n\n# Run linting checks\ncargo clippy --all-targets --all-features -- -D warnings\n```",
          "filePath": "CONTRIBUTING.md",
          "lineCount": 102,
          "timestamp": 1774606910741
        }
      ]
    }
  ],
  "user": "wei"
}