New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

vibeusage

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vibeusage

Codex CLI token usage tracker (macOS-first, notify-driven).

latest
npmnpm
Version
0.3.1
Version published
Weekly downloads
21
-27.59%
Maintainers
1
Weekly downloads
 
Created
Source
VibeUsage Icon

🟢 VIBEUSAGE

QUANTIFY YOUR AI OUTPUT Track AI Token Usage Across All Your CLI Tools

www.vibeusage.cc

License: MIT npm version Node.js Support Platform

English中文说明

DocumentationDashboardBackend API


VibeUsage Dashboard Preview

🚀 Quick Start

Get started in 30 seconds:

npx vibeusage init

That's it! Your AI token usage will now automatically sync to the Dashboard 🎉

✨ Why VibeUsage?

  • 📡 Multi-Source Unified Tracking - Support for Codex CLI, Every Code, Gemini CLI, Claude Code, Opencode, OpenClaw, and more
  • 🤖 Multi-Model Statistics - Unified tracking for GPT-4, Claude, Gemini, o1, and all AI models
  • 📁 Project AI Footprint - Track and publicly display token usage per repository, proving AI-assisted development
  • 🏆 Global Leaderboard - Weekly/monthly/all-time rankings, grow with the global developer community
  • 🌐 Public Profiles - Share your AI usage journey, optionally participate in leaderboards
  • 🔒 Privacy-First - Only track numbers, never upload your code or conversations
  • Zero-Config Auto-Sync - Set up once, sync forever
  • 🎨 Matrix-A Design - Cyberpunk-style high-fidelity dashboard
  • 📈 Deep Analytics - Cost insights, trend forecasting, activity heatmaps

🧰 Supported AI CLIs

CLI ToolAuto-DetectionStatus
Codex CLIFull Support
Every CodeFull Support
Gemini CLIFull Support
Claude CodeFull Support
OpencodeSQLite-First Support
OpenClawFull Support

Whether you're using GPT-4, Claude 3.5 Sonnet, o1, or Gemini - all token consumption is unified and tracked.

🌌 Overview

VibeUsage is an intelligent token usage tracking system designed for macOS developers. Through the all-new Matrix-A Design System, it provides a high-fidelity cyberpunk-style dashboard that transforms your AI Output into quantifiable metrics, supported by the Neural Divergence Map for real-time monitoring of multi-model compute distribution.

[!TIP] Core Index: Our signature metric that reflects your flow state by analyzing token consumption rates and patterns.

📊 Dashboard Features

🎨 Matrix-A Design System

High-performance dashboard built with React + Vite, featuring our cyberpunk-inspired design language with:

  • Neural Divergence Map: Visualize multi-engine load balancing and compute distribution
  • Cost Intelligence: Real-time, multi-dimensional cost breakdown and forecasting
  • Activity Heatmap: GitHub-style contribution graph with streak tracking
  • Smart Notifications: Non-intrusive system-level alerts with Golden visual style

📈 Analytics & Insights

  • AI Analytics: Deep analysis of Input/Output tokens with dedicated tracking for Cached and Reasoning components
  • Model Breakdown: Per-model usage statistics and cost analysis
  • Project Stats: Track token usage by GitHub repository
  • Trend Forecasting: Predict future usage patterns

🏆 Community Features

  • Global Leaderboard: Daily, weekly, monthly, and all-time rankings with privacy-safe display names
  • Public Profiles: Share your AI usage journey with a privacy-safe public profile
  • Leaderboard Categories: Compete in overall rankings or by specific models (GPT, Claude, etc.)
VibeUsage Landing Preview

🔒 Privacy Guarantee

We believe your code and thoughts are your own. VibeUsage is built with strict privacy pillars to ensure your data never leaves your control.

ProtectionDescription
🛡️ No Content UploadNever upload prompts or responses - only compute token counts locally
📡 Local AggregationAll analysis happens on your machine - only send 30-minute usage buckets
🔐 Hashed IdentityDevice tokens are SHA-256 hashed server-side - raw credentials never stored
🔦 Full TransparencyAudit the sync logic yourself in src/lib/rollout.js - literally only numbers and timestamps

📦 Installation

Standard Setup

Initialize your environment once - VibeUsage handles all synchronization automatically in the background:

npx vibeusage init

[!IMPORTANT] Starting with vibeusage@0.3.0, init is the only supported command that writes local integration config. If you upgrade from an older install layout, re-run npx vibeusage init; status, diagnostics, doctor, and sync will not auto-repair legacy hooks.

Authentication Methods

  • Browser Auth (default) - Opens browser for secure authentication
  • Link Code - Use --link-code to authenticate via dashboard-generated code
  • Password - Direct password authentication (fallback)
  • Access Token - For CI/automated environments

CLI Options

npx vibeusage init [options]

Options:
  --yes              Skip consent prompts (non-interactive environments)
  --dry-run          Preview changes without writing files
  --link-code <code> Authenticate using a link code from dashboard
  --base-url <url>   Override the default API endpoint
  --debug            Enable debug output

Auto-Configuration

Once init completes, all supported CLI tools are automatically configured for data sync:

ToolConfig LocationMethod
Codex CLI~/.codex/config.tomlnotify hook
Every Code~/.code/config.toml (or CODE_HOME)notify hook
Gemini CLI~/.gemini/settings.json (or GEMINI_HOME)SessionEnd hook
OpencodeOpenCode config/pluginsSQLite-first parser plugin
Claude Code~/.claude/settings.jsonStop + SessionEnd hooks
OpenClawAuto-links when installedSession plugin (requires restart)

No further intervention required! 🎉

If any integration drifts later, re-run npx vibeusage init. The read-only commands intentionally do not rewrite local hook/plugin state.

💡 Usage

Manual Sync

While sync happens automatically, you can manually trigger synchronization anytime:

# Manually sync latest local session data
npx vibeusage sync

# Check current link status
npx vibeusage status

Health Check

Run comprehensive diagnostics to identify issues:

# Basic health check
npx vibeusage doctor

# JSON output for debugging
npx vibeusage doctor --json --out doctor.json

# Test against a different endpoint
npx vibeusage doctor --base-url https://your-instance.insforge.app

Debug Mode

Enable debug output to see detailed request/response information:

VIBEUSAGE_DEBUG=1 npx vibeusage sync
# or
npx vibeusage sync --debug

Uninstall

# Standard uninstall (keeps data)
npx vibeusage uninstall

# Full purge - removes all data including config and cached sessions
npx vibeusage uninstall --purge

🏗️ Architecture

graph LR
    A[Codex CLI] -->|Rollout Logs| G(Tracker CLI)
    B[Every Code] -->|Rollout Logs| G
    C[Gemini CLI] -->|Session Logs| G
    D[Opencode] -->|SQLite DB| G
    E[Claude Code] -->|Hook Output| G
    F[OpenClaw] -->|Session Plugin| G
    G -->|AI Tokens| H{Core Relay}
    H --> I[VibeUsage Dashboard]
    H --> J[AI Analytics Engine]
    H --> K[Leaderboard Service]
    H --> L[Public View API]

Tech Stack

  • CLI: Node.js 20.x, CommonJS
  • Dashboard: React 18 + Vite + TailwindCSS + TypeScript
  • Backend: InsForge Edge Functions (Deno)
  • Database: InsForge Database (PostgreSQL)
  • Design: Matrix-A Design System

Components

  • Tracker CLI (src/): Node.js CLI that parses logs from multiple AI tools and syncs token data
  • Core Relay (InsForge Edge Functions): Serverless backend handling ingestion, aggregation, and API
  • Dashboard (dashboard/): React + Vite frontend for visualization
  • AI Analytics Engine: Cost calculation, model breakdown, and usage forecasting

Data Flow

  • AI CLI tools generate logs during usage
  • Local notify-handler detects changes and triggers sync
  • CLI incrementally parses logs and SQLite state, extracting whitelist token counts only
  • Data aggregated into 30-minute UTC buckets locally
  • Batch upload to InsForge with idempotent deduplication
  • Dashboard queries aggregated results for visualization

Log Sources

ToolLog LocationOverride Env
Codex CLI~/.codex/sessions/**/rollout-*.jsonlCODEX_HOME
Every Code~/.code/sessions/**/rollout-*.jsonlCODE_HOME
Gemini CLI~/.gemini/tmp/**/chats/session-*.jsonGEMINI_HOME
Opencode~/.local/share/opencode/opencode.db (legacy storage/message/**/*.json fallback)OPENCODE_HOME
Claude CodeParsed from hook output-
OpenClawSession plugin integration-

⚙️ Configuration

Environment Variables

Core Settings

VariableDescriptionDefault
VIBEUSAGE_HTTP_TIMEOUT_MSCLI HTTP timeout in ms (0 disables, clamped 1000..120000)20000
VITE_VIBEUSAGE_HTTP_TIMEOUT_MSDashboard request timeout in ms (0 disables, clamped 1000..30000)15000
VIBEUSAGE_DEBUGEnable debug output (1 or true to enable)-
VIBEUSAGE_DASHBOARD_URLCustom dashboard URLhttps://www.vibeusage.cc
VIBEUSAGE_INSFORGE_BASE_URLCustom API base URLhttps://5tmappuk.us-east.insforge.app
VIBEUSAGE_DEVICE_TOKENPre-configured device token (for CI)-

CLI Tool Overrides

VariableDescriptionDefault
CODEX_HOMECodex CLI directory override~/.codex
CODE_HOMEEvery Code directory override~/.code
GEMINI_HOMEGemini CLI directory override~/.gemini
OPENCODE_HOMEOpenCode data directory override~/.local/share/opencode

🔧 Troubleshooting

Data not appearing in Dashboard
  • Check status: npx vibeusage status
  • Force manual sync: npx vibeusage sync
  • Check OpenCode SQLite reader health: npx vibeusage status --diagnostics
  • Run npx vibeusage doctor if OpenCode usage looks incomplete
  • Verify CLI tool hooks are configured (re-run init if needed)
  • Check debug output: VIBEUSAGE_DEBUG=1 npx vibeusage sync

[!NOTE] Current OpenCode releases store usage in ~/.local/share/opencode/opencode.db. Legacy message JSON files are treated as fallback only. Complete OpenCode support requires the sqlite3 CLI to be available on PATH.

Streak shows 0 days while totals look correct

Streak is defined as consecutive days ending today. If today's total is 0, streak will be 0.

If you expect a non-zero streak, clear cached auth/heatmap data and sign in again:

localStorage.removeItem("vibeusage.dashboard.auth.v1");
Object.keys(localStorage)
  .filter((k) => k.startsWith("vibeusage.heatmap."))
  .forEach((k) => localStorage.removeItem(k));
location.reload();

Complete the landing page sign-in flow again after reload.

Note: insforge-auth-token is not used by the dashboard; use vibeusage.dashboard.auth.v1.

Timeout errors on slow connections

Increase HTTP timeout for slow connections:

VIBEUSAGE_HTTP_TIMEOUT_MS=60000 npx vibeusage sync

💻 Development

Local Development

# Clone the repository
git clone https://github.com/your-username/vibeusage.git
cd vibeusage

# Install dependencies
npm install

# Start dashboard dev server
cd dashboard
npm install
npm run dev

Development Commands

# Run tests
npm test

# Run local CI checks
npm run ci:local

# Validate copy registry
npm run validate:copy

# Validate UI hardcoded text
npm run validate:ui-hardcode

# Validate architecture guardrails
npm run validate:guardrails

# Build backend functions
npm run build:insforge

# Check backend build (no write)
npm run build:insforge:check

# Run smoke tests
npm run smoke

OpenSpec Workflow

This project uses OpenSpec for spec-driven development. Before making significant changes:

  • Read openspec/project.md for project conventions
  • Check openspec/AGENTS.md for the full OpenSpec workflow
  • Run openspec list to see active changes
  • Run openspec list --specs to see existing specifications

See CLAUDE.md for detailed guidelines.

Repository Navigation

# Read the repository sitemap first
cat docs/repo-sitemap.md

🗺️ Roadmap

  • Windows support
  • Linux support
  • Enhanced project-level statistics
  • Team collaboration features
  • Custom report exports
  • Additional AI CLI support

See Issues for detailed plans.

🤝 Contributing

We welcome all forms of contributions!

  • Fork the repository
  • Create a feature branch (git checkout -b feature/amazing-feature)
  • Commit your changes (git commit -m 'Add amazing feature')
  • Push to the branch (git push origin feature/amazing-feature)
  • Create a Pull Request

Development Guidelines

  • All user-facing text must be registered in dashboard/src/content/copy.csv
  • Follow the OpenSpec proposal process for significant changes
  • Code must pass all tests and validations
  • See CLAUDE.md for detailed conventions

📜 License

This project is licensed under the MIT License.

🙏 Acknowledgments

System_Ready // 2024-2026 VibeUsage
"Quantify Your AI Output. Own Your Data."

Made with 💚 by developers, for developers

WebsiteDashboardDocsAPI

AI Agent 快速安装

复制以下内容发送给你的 AI 助手:

请帮我安装 VibeUsage 来追踪 AI Token 用量。

执行以下命令:
npx --yes vibeusage init

安装完成后验证:
vibeusage status

或者查看完整指南: https://github.com/victorGPT/vibeusage/blob/main/docs/AI_AGENT_INSTALL.md

FAQs

Package last updated on 03 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts