Vibe Coding Tracker — AI Coding Assistant Usage Tracker
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, and Gemini usage, providing detailed cost breakdowns, token statistics, and code operation insights.
Note: CLI examples use the short alias
vct
. If you built from source, the compiled binary is namedvibe_coding_tracker
; create an alias or replacevct
with the full name when running commands.
🎯 Why Vibe Coding Tracker?
💰 Know Your Costs
Stop wondering how much your AI coding sessions cost. Get real-time cost tracking with automatic pricing updates from LiteLLM.
📊 Beautiful Visualizations
Choose your preferred view:
- Interactive Dashboard: Auto-refreshing terminal UI with live updates
- Static Reports: Professional tables for documentation
- Script-Friendly: Plain text and JSON for automation
- Full Precision: Export exact costs for accounting
🚀 Zero Configuration
Automatically detects and processes logs from Claude Code, Codex, and Gemini. No setup required—just run and analyze.
🎨 Rich Insights
- Token usage by model and date
- Cost breakdown by cache types
- File operations tracking
- Command execution history
- Git repository information
✨ Key Features
Feature | Description |
---|---|
🤖 Auto-Detection | Intelligently identifies Claude Code, Codex, or Gemini logs |
💵 Smart Pricing | Fuzzy model matching + daily cache for speed |
🎨 4 Display Modes | Interactive, Table, Text, and JSON outputs |
📈 Comprehensive Stats | Tokens, costs, file ops, and tool calls |
⚡ High Performance | Built with Rust for speed and reliability |
🔄 Live Updates | Real-time dashboard refreshes every second |
💾 Efficient Caching | Smart daily cache reduces API calls |
🚀 Quick Start
Installation
Prerequisites:
- Rust toolchain (1.70+) for building from source
- Node.js (v18+) for
npm
installation
From npm
(Recommended)
From Source
# Clone and build
# Binary location
# Optional: create a short alias (adjust the paths as needed)
First Run
# View your usage with the short alias (if available)
# Or run the binary built by Cargo
# Analyze a specific conversation
💡 Tip: Use
vct
as a short alias forvibe_coding_tracker
to save typing—create it manually withln -sf ./target/release/vibe_coding_tracker ~/.local/bin/vct
(or any path you prefer).
📖 Command Guide
🔍 Quick Reference
# Replace with `vibe_coding_tracker` if you are using the full binary name
)
💰 Usage Command
Track your spending across all AI coding sessions.
Basic Usage
# Interactive dashboard (recommended)
# Static table for reports
# Plain text for scripts
# JSON for data processing
What You Get
The tool scans these directories automatically:
~/.claude/projects/*.jsonl
(Claude Code)~/.codex/sessions/*.jsonl
(Codex)~/.gemini/tmp/<project_hash>/chats/*.json
(Gemini)
🎨 Interactive Mode (Default)
Live dashboard that updates every second
┌──────────────────────────────────────────────────────────────────┐
│ 📊 Token Usage Statistics │
└──────────────────────────────────────────────────────────────────┘
┌────────────┬──────────────────────┬────────────┬────────────┬────────────┬──────────────┬────────────┬────────────┐
│ Date │ Model │ Input │ Output │ Cache Read │ Cache Create │ Total │ Cost (USD) │
├────────────┼──────────────────────┼────────────┼────────────┼────────────┼──────────────┼────────────┼────────────┤
│ 2025-10-01 │ claude-sonnet-4-20… │ 45,230 │ 12,450 │ 230,500 │ 50,000 │ 338,180 │ $2.15 │
│ 2025-10-02 │ claude-sonnet-4-20… │ 32,100 │ 8,920 │ 180,000 │ 30,000 │ 251,020 │ $1.58 │
│ 2025-10-03 │ claude-sonnet-4-20… │ 28,500 │ 7,200 │ 150,000 │ 25,000 │ 210,700 │ $1.32 │
│ 2025-10-03 │ gpt-4-turbo │ 15,000 │ 5,000 │ 0 │ 0 │ 20,000 │ $0.25 │
│ │ TOTAL │ 120,830 │ 33,570 │ 560,500 │ 105,000 │ 819,900 │ $5.30 │
└────────────┴──────────────────────┴────────────┴────────────┴────────────┴──────────────┴────────────┴────────────┘
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ 💰 Total Cost: $5.30 | 🔢 Total Tokens: 819,900 | 📅 Entries: 4 | 🧠 Memory: 12.5 MB │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Press 'q', 'Esc', or 'Ctrl+C' to quit
Features:
- ✨ Auto-refreshes every second
- 🎯 Highlights today's entries
- 🔄 Shows recently updated rows
- 💾 Displays memory usage
- 📊 Summary statistics
Controls: Press q
, Esc
, or Ctrl+C
to exit
📋 Static Table Mode
Perfect for documentation and reports
📊 Token Usage Statistics
╔════════════╦══════════════════════╦════════════╦════════════╦════════════╦══════════════╦══════════════╦════════════╗
║ Date ║ Model ║ Input ║ Output ║ Cache Read ║ Cache Create ║ Total Tokens ║ Cost (USD) ║
╠════════════╬══════════════════════╬════════════╬════════════╬════════════╬══════════════╬══════════════╬════════════╣
║ 2025-10-01 ║ claude-sonnet-4-20… ║ 45,230 ║ 12,450 ║ 230,500 ║ 50,000 ║ 338,180 ║ $2.15 ║
║ 2025-10-02 ║ claude-sonnet-4-20… ║ 32,100 ║ 8,920 ║ 180,000 ║ 30,000 ║ 251,020 ║ $1.58 ║
║ 2025-10-03 ║ claude-sonnet-4-20… ║ 28,500 ║ 7,200 ║ 150,000 ║ 25,000 ║ 210,700 ║ $1.32 ║
║ ║ TOTAL ║ 105,830 ║ 28,570 ║ 560,500 ║ 105,000 ║ 799,900 ║ $5.05 ║
╚════════════╩══════════════════════╩════════════╩════════════╩════════════╩══════════════╩══════════════╩════════════╝
📝 Text Mode
Ideal for scripting and parsing
2025-10-01 > claude-sonnet-4-20250514: $2.154230
2025-10-02 > claude-sonnet-4-20250514: $1.583450
2025-10-03 > claude-sonnet-4-20250514: $1.321200
2025-10-03 > gpt-4-turbo: $0.250000
🗂️ JSON Mode
Full precision for accounting and integration
🔍 Output Comparison
Feature | Interactive | Table | Text | JSON |
---|---|---|---|---|
Best For | Monitoring | Reports | Scripts | Integration |
Cost Format | $2.15 | $2.15 | $2.154230 | 2.1542304567890123 |
Updates | Real-time | Static | Static | Static |
Colors | ✅ | ✅ | ❌ | ❌ |
Parseable | ❌ | ❌ | ✅ | ✅ |
💡 Use Cases
- Budget Tracking: Monitor your daily AI spending
- Cost Optimization: Identify expensive sessions
- Team Reporting: Generate usage reports for management
- Billing: Export precise costs for invoicing
- Monitoring: Real-time dashboard for active development
📊 Analysis Command
Deep dive into conversation files - single file or batch analysis.
Basic Usage
# Single file: Analyze and display
# Single file: Save to file
# Batch: Analyze all sessions with interactive table (default)
# Batch: Save aggregated results to JSON
# Batch with provider grouping: Output complete records grouped by provider (JSON format)
# Save the grouped results to a file
What You Get
Single File Analysis:
- Token Usage: Input, output, and cache statistics by model
- File Operations: Every read, write, and edit with full details
- Command History: All shell commands executed
- Tool Usage: Counts of each tool type used
- Metadata: User, machine ID, Git repo, timestamps
Batch Analysis:
- Aggregated Metrics: Grouped by date and model
- Line Counts: Edit, read, and write operations
- Tool Statistics: Bash, Edit, Read, TodoWrite, Write counts
- Interactive Display: Real-time TUI table (default)
- JSON Export: Structured data for further processing
Sample Output - Single File
Sample Output - Batch Analysis
Interactive Table (default when running vct analysis
):
┌──────────────────────────────────────────────────────────────────┐
│ 🔍 Analysis Statistics │
└──────────────────────────────────────────────────────────────────┘
┌────────────┬────────────────────┬────────────┬────────────┬────────────┬──────┬──────┬──────┬───────────┬───────┐
│ Date │ Model │ Edit Lines │ Read Lines │ Write Lines│ Bash │ Edit │ Read │ TodoWrite │ Write │
├────────────┼────────────────────┼────────────┼────────────┼────────────┼──────┼──────┼──────┼───────────┼───────┤
│ 2025-10-02 │ claude-sonnet-4-5…│ 901 │ 11,525 │ 53 │ 13 │ 26 │ 27 │ 10 │ 1 │
│ 2025-10-03 │ claude-sonnet-4-5…│ 574 │ 10,057 │ 1,415 │ 53 │ 87 │ 78 │ 30 │ 8 │
│ 2025-10-03 │ gpt-5-codex │ 0 │ 1,323 │ 0 │ 75 │ 0 │ 20 │ 0 │ 0 │
│ │ TOTAL │ 1,475 │ 22,905 │ 1,468 │ 141 │ 113 │ 125 │ 40 │ 9 │
└────────────┴────────────────────┴────────────┴────────────┴────────────┴──────┴──────┴──────┴───────────┴───────┘
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ 📝 Total Lines: 25,848 | 🔧 Total Tools: 428 | 📅 Entries: 3 | 🧠 Memory: 8.2 MB │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Press 'q', 'Esc', or 'Ctrl+C' to quit
JSON Export (with --output
):
💡 Use Cases
Single File Analysis:
- Usage Auditing: Track what the AI did in each session
- Cost Attribution: Calculate costs per project or feature
- Compliance: Export detailed activity logs
- Analysis: Understand coding patterns and tool usage
Batch Analysis:
- Productivity Tracking: Monitor coding activity over time
- Tool Usage Patterns: Identify most-used tools across sessions
- Model Comparison: Compare efficiency between different AI models
- Historical Analysis: Track trends in code operations by date
🔧 Version Command
Check your installation.
# Formatted output
# JSON format
# Plain text
Output
🚀 Vibe Coding Tracker
╔════════════════╦═════════╗
║ Version ║ 0.1.0 ║
╠════════════════╬═════════╣
║ Rust Version ║ 1.89.0 ║
╠════════════════╬═════════╣
║ Cargo Version ║ 1.89.0 ║
╚════════════════╩═════════╝
🔄 Update Command
Keep your installation up-to-date automatically.
The update command checks GitHub releases and downloads the latest version for your platform.
Basic Usage
# Interactive update with confirmation
# Check for updates without installing
# Force update without confirmation prompt
How It Works
- Check Latest Version: Fetches the latest release from GitHub API
- Compare Versions: Compares current version with the latest available
- Download Binary: Downloads the appropriate binary for your platform (Linux/macOS/Windows)
- Smart Replacement:
- Linux/macOS: Automatically replaces the binary (backs up old version to
.old
) - Windows: Downloads as
.new
and creates a batch script for safe replacement
- Linux/macOS: Automatically replaces the binary (backs up old version to
Platform Support
The update command automatically detects your platform and downloads the correct archive:
- Linux:
vibe_coding_tracker-v{version}-linux-x64-gnu.tar.gz
,vibe_coding_tracker-v{version}-linux-arm64-gnu.tar.gz
- macOS:
vibe_coding_tracker-v{version}-macos-x64.tar.gz
,vibe_coding_tracker-v{version}-macos-arm64.tar.gz
- Windows:
vibe_coding_tracker-v{version}-windows-x64.zip
,vibe_coding_tracker-v{version}-windows-arm64.zip
Windows Update Process
On Windows, the binary cannot be replaced while running. The update command:
- Downloads the new version as
vct.new
- Creates an update script (
update_vct.bat
) - Displays instructions to complete the update
Run the batch script after closing the application to finish the update.
💡 Smart Pricing System
How It Works
- Automatic Updates: Fetches pricing from LiteLLM daily
- Smart Caching: Stores pricing in
~/.vibe-coding-tracker/
for 24 hours - Fuzzy Matching: Finds best match even for custom model names
- Always Accurate: Ensures you get the latest pricing
Model Matching
Priority Order:
- ✅ Exact Match:
claude-sonnet-4
→claude-sonnet-4
- 🔄 Normalized:
claude-sonnet-4-20250514
→claude-sonnet-4
- 🔍 Substring:
custom-gpt-4
→gpt-4
- 🎯 Fuzzy (AI-powered): Uses Jaro-Winkler similarity (70% threshold)
- 💵 Fallback: Shows $0.00 if no match found
Cost Calculation
Total Cost = (Input Tokens × Input Cost) +
(Output Tokens × Output Cost) +
(Cache Read × Cache Read Cost) +
(Cache Creation × Cache Creation Cost)
🐳 Docker Support
# Build image
# Run with your sessions
🔍 Troubleshooting
Pricing Data Not Loading
# Check cache
# Force refresh
# Debug mode
RUST_LOG=debug
No Usage Data Shown
# Verify session directories
# Count session files
|
|
|
Analysis Command Fails
# Validate JSONL format
# Check file permissions
# Run with debug output
RUST_LOG=debug
Interactive Mode Issues
# Reset terminal if broken
# Check terminal type
# Use static table as fallback
⚡ Performance
Built with Rust for speed and reliability:
Operation | Time |
---|---|
Parse 10MB JSONL | ~320ms |
Analyze 1000 events | ~45ms |
Load cached pricing | ~2ms |
Interactive refresh | ~30ms |
Binary Size: ~3-5 MB (stripped)
📚 Learn More
- Developer Docs: See .github/copilot-instructions.md
- Report Issues: GitHub Issues
- Source Code: GitHub Repository
🤝 Contributing
Contributions welcome! Here's how:
- Fork the repository
- Create your feature branch
- Make your changes
- Submit a pull request
For development setup and guidelines, see .github/copilot-instructions.md.
📄 License
MIT License - see LICENSE for details.
🙏 Credits
- LiteLLM for model pricing data
- Claude Code, Codex, and Gemini teams for creating amazing AI coding assistants
- The Rust community for excellent tooling
Save money. Track usage. Code smarter.
⭐ Star this project if you find it useful!
Made with 🦀 Rust