vibeusage 0.3.3 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,464 +1,372 @@
1
1
  <div align="center">
2
2
 
3
- <img src="dashboard/public/icon-192.png" width="96" alt="VibeUsage Icon" />
3
+ <img src="dashboard/public/icon-192.png" width="96" alt="VibeUsage icon" />
4
4
 
5
- # 🟢 VIBEUSAGE
5
+ # VibeUsage
6
6
 
7
- **QUANTIFY YOUR AI OUTPUT**
8
- _Track AI Token Usage Across All Your CLI Tools_
7
+ **Track token usage across AI coding CLIs.**
8
+ Local parsing, minimal data collection, and a shareable dashboard for Codex CLI, Claude Code, Gemini CLI, OpenCode, Hermes, OpenClaw, and more.
9
9
 
10
- [**www.vibeusage.cc**](https://www.vibeusage.cc)
11
-
12
- [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
13
10
  [![npm version](https://img.shields.io/npm/v/vibeusage.svg)](https://www.npmjs.com/package/vibeusage)
14
- [![Node.js Support](https://img.shields.io/badge/Node.js-20.x-brightgreen.svg)](https://nodejs.org/)
15
- [![Platform](https://img.shields.io/badge/Platform-macOS-lightgrey.svg)](https://www.apple.com/macos/)
11
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
12
+ [![Node.js](https://img.shields.io/badge/Node.js-20.x-brightgreen.svg)](https://nodejs.org/)
13
+ [![Website](https://img.shields.io/badge/Website-vibeusage.cc-black)](https://www.vibeusage.cc)
14
+
15
+ **[Let your agent install VibeUsage](docs/AI_AGENT_INSTALL.md)** ¡ [Open Dashboard](https://www.vibeusage.cc) ¡ [Visit Website](https://www.vibeusage.cc)
16
16
 
17
- [**English**](README.md) • [**中文说明**](README.zh-CN.md)
17
+ Give the install guide to ChatGPT, Claude, Codex, or your preferred agent — it can set up VibeUsage for you.
18
18
 
19
- [**Documentation**](docs/) • [**Dashboard**](https://www.vibeusage.cc) • [**Backend API**](BACKEND_API.md)
19
+ <sub>Wherever you work, whichever agent you use, VibeUsage keeps your AI usage in one place.</sub>
20
20
 
21
21
  <br/>
22
22
 
23
- <img src="docs/screenshots/dashboard.png" width="900" alt="VibeUsage Dashboard Preview"/>
23
+ [Docs](docs/) · [Backend API](BACKEND_API.md) · [npm](https://www.npmjs.com/package/vibeusage) · [English](README.md) · [中文说明](README.zh-CN.md)
24
24
 
25
- </div>
25
+ <br/>
26
26
 
27
- ---
27
+ <img src="docs/screenshots/dashboard.png" width="900" alt="VibeUsage dashboard screenshot" />
28
28
 
29
- ## 🚀 Quick Start
29
+ </div>
30
30
 
31
- Get started in 30 seconds:
31
+ ---
32
32
 
33
- ```bash
34
- npx vibeusage init
35
- ```
33
+ VibeUsage is a **token usage tracker for AI agent CLIs**. It installs lightweight local hooks/plugins, reads usage from local logs or local databases, aggregates usage into time buckets on your machine, and syncs only the data needed to power a dashboard, cost breakdowns, project usage views, public profiles, and leaderboards.
36
34
 
37
- That's it! Your AI token usage will now automatically sync to the [Dashboard](https://www.vibeusage.cc) 🎉
35
+ It is currently **macOS-first**, with support focused on real developer workflows around **Codex CLI, Every Code, Claude Code, Gemini CLI, OpenCode, Hermes, and OpenClaw**.
38
36
 
39
- ## ✨ Why VibeUsage?
37
+ ## Why VibeUsage
40
38
 
41
- - 📡 **Multi-Source Unified Tracking** - Support for Codex CLI, Every Code, Gemini CLI, Claude Code, Opencode, OpenClaw, and more
42
- - 🤖 **Multi-Model Statistics** - Unified tracking for GPT-4, Claude, Gemini, o1, and all AI models
43
- - 📁 **Project AI Footprint** - Track and publicly display token usage per repository, proving AI-assisted development
44
- - 🏆 **Global Leaderboard** - Weekly/monthly/all-time rankings, grow with the global developer community
45
- - 🌐 **Public Profiles** - Share your AI usage journey, optionally participate in leaderboards
46
- - 🔒 **Privacy-First** - Only track numbers, never upload your code or conversations
47
- - ⚡ **Zero-Config Auto-Sync** - Set up once, sync forever
48
- - 🎨 **Matrix-A Design** - Cyberpunk-style high-fidelity dashboard
49
- - 📈 **Deep Analytics** - Cost insights, trend forecasting, activity heatmaps
39
+ - **Agent-first onboarding** — hand the install guide to your AI agent, or run `npx --yes vibeusage init` yourself when you want manual setup.
40
+ - **Multi-client tracking** — unify usage across multiple AI coding CLIs in one timeline.
41
+ - **Privacy-first by design** — prompts, responses, code, and transcripts stay local.
42
+ - **Project-aware analytics** — view usage by public GitHub repository when repo identity can be resolved.
43
+ - **Useful dashboard, not just raw numbers** — see totals, model breakdowns, cost estimates, heatmaps, trends, and project usage.
44
+ - **Shareable presence** — optional public profile and leaderboard participation.
45
+ - **OpenClaw support with a sanitized path** — integrates through a local usage ledger instead of transcript parsing.
50
46
 
51
- ## 🧰 Supported AI CLIs
47
+ ## Quickstart
52
48
 
53
- | CLI Tool | Auto-Detection | Status |
54
- |----------|----------------|--------|
55
- | **Codex CLI** | ✅ | Full Support |
56
- | **Every Code** | ✅ | Full Support |
57
- | **Gemini CLI** | ✅ | Full Support |
58
- | **Claude Code** | ✅ | Full Support |
59
- | **Opencode** | ✅ | SQLite-First Support |
60
- | **OpenClaw** | ✅ | Full Support |
49
+ ### Requirements
61
50
 
62
- Whether you're using GPT-4, Claude 3.5 Sonnet, o1, or Gemini - all token consumption is unified and tracked.
51
+ - **Node.js 20.x**
52
+ - **macOS** is the primary supported environment today
53
+ - **`sqlite3` on PATH** for full OpenCode support
63
54
 
64
- ## 🌌 Overview
55
+ ### Install and link your device
65
56
 
66
- **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.
57
+ ```bash
58
+ npx --yes vibeusage init
59
+ ```
67
60
 
68
- > [!TIP]
69
- > **Core Index**: Our signature metric that reflects your flow state by analyzing token consumption rates and patterns.
61
+ What happens next:
70
62
 
71
- ## 📊 Dashboard Features
63
+ 1. VibeUsage detects supported local AI CLIs.
64
+ 2. It installs lightweight hooks/plugins where needed.
65
+ 3. It opens browser auth by default, or accepts a dashboard-issued link code.
66
+ 4. It performs an initial sync.
72
67
 
73
- ### 🎨 Matrix-A Design System
74
- High-performance dashboard built with React + Vite, featuring our cyberpunk-inspired design language with:
75
- - **Neural Divergence Map**: Visualize multi-engine load balancing and compute distribution
76
- - **Cost Intelligence**: Real-time, multi-dimensional cost breakdown and forecasting
77
- - **Activity Heatmap**: GitHub-style contribution graph with streak tracking
78
- - **Smart Notifications**: Non-intrusive system-level alerts with Golden visual style
68
+ Then keep using your normal AI tools — sync runs automatically in the background.
79
69
 
80
- ### 📈 Analytics & Insights
81
- - **AI Analytics**: Deep analysis of Input/Output tokens with dedicated tracking for Cached and Reasoning components
82
- - **Model Breakdown**: Per-model usage statistics and cost analysis
83
- - **Project Stats**: Track token usage by GitHub repository
84
- - **Trend Forecasting**: Predict future usage patterns
70
+ > [!IMPORTANT]
71
+ > Since `vibeusage@0.3.0`, **`init` is the only command that mutates local integration config**. If you upgrade from an older install layout, re-run `npx vibeusage init`.
85
72
 
86
- ### 🏆 Community Features
87
- - **Global Leaderboard**: Daily, weekly, monthly, and all-time rankings with privacy-safe display names
88
- - **Public Profiles**: Share your AI usage journey with a privacy-safe public profile
89
- - **Leaderboard Categories**: Compete in overall rankings or by specific models (GPT, Claude, etc.)
73
+ ### Install with a dashboard link code
90
74
 
91
- <img src="docs/screenshots/landing.png" width="900" alt="VibeUsage Landing Preview"/>
75
+ ```bash
76
+ npx --yes vibeusage init --link-code <code>
77
+ ```
92
78
 
93
- ## 🔒 Privacy Guarantee
79
+ This is useful when you want to copy an install command from the dashboard or let another AI assistant perform the install for you.
94
80
 
95
- We believe your code and thoughts are your own. VibeUsage is built with strict privacy pillars to ensure your data never leaves your control.
81
+ ## Supported clients
96
82
 
97
- | Protection | Description |
98
- |------------|-------------|
99
- | 🛡️ **No Content Upload** | Never upload prompts or responses - only compute token counts locally |
100
- | 📡 **Local Aggregation** | All analysis happens on your machine - only send 30-minute usage buckets |
101
- | 🔐 **Hashed Identity** | Device tokens are SHA-256 hashed server-side - raw credentials never stored |
102
- | 🔦 **Full Transparency** | Audit the sync logic yourself in `src/lib/rollout.js` - literally only numbers and timestamps |
83
+ | Tool | Detection | Sync trigger / install method | Primary local data source |
84
+ | --- | --- | --- | --- |
85
+ | **Codex CLI** | Auto-detected | `notify` hook | `~/.codex/sessions/**/rollout-*.jsonl` |
86
+ | **Every Code** | Auto-detected | `notify` hook | `~/.code/sessions/**/rollout-*.jsonl` |
87
+ | **Claude Code** | Auto-detected | `Stop` + `SessionEnd` hooks | local hook output |
88
+ | **Gemini CLI** | Auto-detected | `SessionEnd` hook | `~/.gemini/tmp/**/chats/session-*.json` |
89
+ | **OpenCode** | Auto-detected | plugin + local parsing | `~/.local/share/opencode/opencode.db` (legacy message files are fallback only) |
90
+ | **Hermes** | Auto-detected when installed | plugin + local parsing | `~/.vibeusage/tracker/hermes.usage.jsonl` |
91
+ | **OpenClaw** | Auto-detected when installed | session plugin | local sanitized usage ledger |
103
92
 
104
- ## 📦 Installation
93
+ ### Hermes note
105
94
 
106
- ### Standard Setup
95
+ Hermes uses a dedicated plugin-ledger path:
107
96
 
108
- Initialize your environment once - VibeUsage handles all synchronization automatically in the background:
97
+ **`vibeusage init` installs Hermes plugin → Hermes lifecycle hooks append `~/.vibeusage/tracker/hermes.usage.jsonl` → `vibeusage sync` parses only that ledger**
109
98
 
110
- ```bash
111
- npx vibeusage init
112
- ```
99
+ - no prompt / response content upload
100
+ - no fallback parsing of `~/.hermes/state.db`, `~/.hermes/sessions/`, or trajectory files
101
+ - plugin hooks collect locally only; upload still happens in `vibeusage sync`
113
102
 
114
- > [!IMPORTANT]
115
- > 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.
103
+ ### OpenClaw note
116
104
 
117
- ### Authentication Methods
105
+ OpenClaw uses a dedicated privacy-preserving path:
118
106
 
119
- 1. **Browser Auth** (default) - Opens browser for secure authentication
120
- 2. **Link Code** - Use `--link-code` to authenticate via dashboard-generated code
121
- 3. **Password** - Direct password authentication (fallback)
122
- 4. **Access Token** - For CI/automated environments
107
+ **OpenClaw session plugin → local sanitized usage ledger → `vibeusage sync --from-openclaw`**
123
108
 
124
- ### CLI Options
109
+ - no transcript parsing
110
+ - no prompt / response content upload
111
+ - requires an OpenClaw gateway restart after plugin linking
125
112
 
126
- ```bash
127
- npx vibeusage init [options]
128
-
129
- Options:
130
- --yes Skip consent prompts (non-interactive environments)
131
- --dry-run Preview changes without writing files
132
- --link-code <code> Authenticate using a link code from dashboard
133
- --base-url <url> Override the default API endpoint
134
- --debug Enable debug output
135
- ```
113
+ See [`docs/openclaw-integration.md`](docs/openclaw-integration.md) for the exact contract.
136
114
 
137
- ### Auto-Configuration
115
+ ## What VibeUsage tracks
138
116
 
139
- Once `init` completes, all supported CLI tools are automatically configured for data sync:
117
+ VibeUsage focuses on **usage accounting**, not content capture.
140
118
 
141
- | Tool | Config Location | Method |
142
- |------|----------------|--------|
143
- | **Codex CLI** | `~/.codex/config.toml` | `notify` hook |
144
- | **Every Code** | `~/.code/config.toml` (or `CODE_HOME`) | `notify` hook |
145
- | **Gemini CLI** | `~/.gemini/settings.json` (or `GEMINI_HOME`) | `SessionEnd` hook |
146
- | **Opencode** | OpenCode config/plugins | SQLite-first parser plugin |
147
- | **Claude Code** | `~/.claude/settings.json` | `Stop` + `SessionEnd` hooks |
148
- | **OpenClaw** | Auto-links when installed | Session plugin (requires restart) |
119
+ Tracked fields include:
149
120
 
150
- No further intervention required! 🎉
121
+ - source / tool name
122
+ - model identity
123
+ - input tokens
124
+ - cached input tokens
125
+ - output tokens
126
+ - reasoning output tokens
127
+ - total tokens
128
+ - time bucket metadata
129
+ - project / public repo attribution when resolvable
151
130
 
152
- If any integration drifts later, re-run `npx vibeusage init`. The read-only commands intentionally do not rewrite local hook/plugin state.
131
+ ## What VibeUsage does not upload
153
132
 
154
- ## 💡 Usage
133
+ VibeUsage does **not** upload:
155
134
 
156
- ### Manual Sync
135
+ - prompts
136
+ - responses
137
+ - source code
138
+ - chat transcripts
139
+ - OpenClaw transcript content
140
+ - raw workspace contents
141
+ - secrets, tokens, or credentials
157
142
 
158
- While sync happens automatically, you can manually trigger synchronization anytime:
143
+ For OpenClaw specifically, the supported path is limited to sanitized local usage metadata plus token counts.
159
144
 
160
- ```bash
161
- # Manually sync latest local session data
162
- npx vibeusage sync
145
+ ## How it works
163
146
 
164
- # Check current link status
165
- npx vibeusage status
147
+ ```mermaid
148
+ graph LR
149
+ A[Codex CLI] --> G[VibeUsage CLI]
150
+ B[Every Code] --> G
151
+ C[Claude Code] --> G
152
+ D[Gemini CLI] --> G
153
+ E[OpenCode] --> G
154
+ F[Hermes] --> G
155
+ H[OpenClaw] --> G
156
+ G --> I[Local aggregation into 30-min UTC buckets]
157
+ I --> J[VibeUsage backend]
158
+ J --> K[Dashboard]
159
+ J --> L[Project usage]
160
+ J --> M[Public profile / leaderboard]
166
161
  ```
167
162
 
168
- ### Health Check
169
-
170
- Run comprehensive diagnostics to identify issues:
171
-
172
- ```bash
173
- # Basic health check
174
- npx vibeusage doctor
163
+ At a high level:
175
164
 
176
- # JSON output for debugging
177
- npx vibeusage doctor --json --out doctor.json
165
+ 1. `init` installs lightweight hooks/plugins for supported tools.
166
+ 2. Your AI clients continue running normally.
167
+ 3. VibeUsage reads local usage artifacts incrementally.
168
+ 4. Usage is aggregated locally into **30-minute UTC buckets**.
169
+ 5. Batched uploads power the dashboard and API.
178
170
 
179
- # Test against a different endpoint
180
- npx vibeusage doctor --base-url https://your-instance.insforge.app
181
- ```
171
+ ## Dashboard features
182
172
 
183
- ### Debug Mode
173
+ VibeUsage ships with a hosted dashboard at [www.vibeusage.cc](https://www.vibeusage.cc).
184
174
 
185
- Enable debug output to see detailed request/response information:
175
+ <img src="docs/screenshots/landing.png" width="900" alt="VibeUsage landing page screenshot" />
186
176
 
187
- ```bash
188
- VIBEUSAGE_DEBUG=1 npx vibeusage sync
189
- # or
190
- npx vibeusage sync --debug
191
- ```
177
+ ### Included views
192
178
 
193
- ### Uninstall
179
+ - **Usage summary** — total, input, output, cached, and reasoning token views
180
+ - **Model breakdown** — compare model families and individual models
181
+ - **Cost breakdown** — estimate usage cost from pricing data
182
+ - **Activity heatmap** — view active days and streak-like usage patterns
183
+ - **Trend views** — inspect usage over day / week / month / total windows
184
+ - **Project usage panel** — see which public GitHub repositories consumed the most tokens
185
+ - **Install panel** — generate install / link-code flows from the dashboard
186
+ - **Optional public view** — share a public page for your usage profile
187
+ - **Leaderboard** — participate in community rankings
194
188
 
195
- ```bash
196
- # Standard uninstall (keeps data)
197
- npx vibeusage uninstall
189
+ ## CLI commands
198
190
 
199
- # Full purge - removes all data including config and cached sessions
200
- npx vibeusage uninstall --purge
201
- ```
191
+ | Command | Purpose |
192
+ | --- | --- |
193
+ | `vibeusage init` | Install local integrations, link auth, and perform initial setup |
194
+ | `vibeusage sync` | Parse local usage and upload pending buckets |
195
+ | `vibeusage status` | Show current config, queue, upload, and integration status |
196
+ | `vibeusage diagnostics` | Emit machine-readable diagnostics JSON |
197
+ | `vibeusage doctor` | Run a health report and surface likely problems |
198
+ | `vibeusage uninstall` | Remove VibeUsage integration state |
202
199
 
203
- ## 🏗️ Architecture
200
+ ### Command examples
204
201
 
205
- ```mermaid
206
- graph LR
207
- A[Codex CLI] -->|Rollout Logs| G(Tracker CLI)
208
- B[Every Code] -->|Rollout Logs| G
209
- C[Gemini CLI] -->|Session Logs| G
210
- D[Opencode] -->|SQLite DB| G
211
- E[Claude Code] -->|Hook Output| G
212
- F[OpenClaw] -->|Session Plugin → Sanitized Ledger| G
213
- G -->|AI Tokens| H{Core Relay}
214
- H --> I[VibeUsage Dashboard]
215
- H --> J[AI Analytics Engine]
216
- H --> K[Leaderboard Service]
217
- H --> L[Public View API]
218
- ```
219
-
220
- ### Tech Stack
202
+ ```bash
203
+ # Install / repair local integration setup
204
+ npx --yes vibeusage init
221
205
 
222
- - **CLI**: Node.js 20.x, CommonJS
223
- - **Dashboard**: React 18 + Vite + TailwindCSS + TypeScript
224
- - **Backend**: InsForge Edge Functions (Deno)
225
- - **Database**: InsForge Database (PostgreSQL)
226
- - **Design**: Matrix-A Design System
206
+ # Preview setup changes without writing files
207
+ npx vibeusage init --dry-run
227
208
 
228
- ### Components
209
+ # Manual sync
210
+ npx vibeusage sync
229
211
 
230
- - **Tracker CLI** (`src/`): Node.js CLI that parses logs from multiple AI tools and syncs token data
231
- - **Core Relay** (InsForge Edge Functions): Serverless backend handling ingestion, aggregation, and API
232
- - **Dashboard** (`dashboard/`): React + Vite frontend for visualization
233
- - **AI Analytics Engine**: Cost calculation, model breakdown, and usage forecasting
212
+ # Drain the queue completely
213
+ npx vibeusage sync --drain
234
214
 
235
- ### Data Flow
215
+ # Status overview
216
+ npx vibeusage status
236
217
 
237
- 1. AI CLI tools generate logs during usage
238
- 2. Local `notify-handler` detects changes and triggers sync
239
- 3. CLI incrementally parses logs, SQLite state, and the OpenClaw sanitized ledger, extracting whitelist token counts only
240
- 4. Data aggregated into 30-minute UTC buckets locally
241
- 5. Batch upload to InsForge with idempotent deduplication
242
- 6. Dashboard queries aggregated results for visualization
218
+ # Full diagnostics JSON
219
+ npx vibeusage diagnostics --out diagnostics.json
243
220
 
244
- ### Log Sources
221
+ # Health report
222
+ npx vibeusage doctor
245
223
 
246
- | Tool | Log Location | Override Env |
247
- |------|-------------|--------------|
248
- | **Codex CLI** | `~/.codex/sessions/**/rollout-*.jsonl` | `CODEX_HOME` |
249
- | **Every Code** | `~/.code/sessions/**/rollout-*.jsonl` | `CODE_HOME` |
250
- | **Gemini CLI** | `~/.gemini/tmp/**/chats/session-*.json` | `GEMINI_HOME` |
251
- | **Opencode** | `~/.local/share/opencode/opencode.db` (legacy `storage/message/**/*.json` fallback) | `OPENCODE_HOME` |
252
- | **Claude Code** | Parsed from hook output | - |
253
- | **OpenClaw** | Session plugin → local sanitized usage ledger | - |
224
+ # Remove integrations
225
+ npx vibeusage uninstall
226
+ ```
254
227
 
255
- ## ⚙️ Configuration
228
+ Run `node bin/tracker.js --help` or `npx vibeusage --help` for the current CLI surface.
256
229
 
257
- <details>
258
- <summary><b>Environment Variables</b></summary>
230
+ ## Configuration
259
231
 
260
- ### Core Settings
232
+ ### Runtime settings
261
233
 
262
234
  | Variable | Description | Default |
263
- |----------|-------------|---------|
264
- | `VIBEUSAGE_HTTP_TIMEOUT_MS` | CLI HTTP timeout in ms (`0` disables, clamped `1000..120000`) | `20000` |
265
- | `VITE_VIBEUSAGE_HTTP_TIMEOUT_MS` | Dashboard request timeout in ms (`0` disables, clamped `1000..30000`) | `15000` |
266
- | `VIBEUSAGE_DEBUG` | Enable debug output (`1` or `true` to enable) | - |
267
- | `VIBEUSAGE_DASHBOARD_URL` | Custom dashboard URL | `https://www.vibeusage.cc` |
268
- | `VIBEUSAGE_INSFORGE_BASE_URL` | Custom API base URL | `https://5tmappuk.us-east.insforge.app` |
269
- | `VIBEUSAGE_DEVICE_TOKEN` | Pre-configured device token (for CI) | - |
235
+ | --- | --- | --- |
236
+ | `VIBEUSAGE_INSFORGE_BASE_URL` | API base URL override | hosted default |
237
+ | `VIBEUSAGE_DASHBOARD_URL` | Dashboard URL override | `https://www.vibeusage.cc` |
238
+ | `VIBEUSAGE_DEVICE_TOKEN` | Preconfigured device token | unset |
239
+ | `VIBEUSAGE_HTTP_TIMEOUT_MS` | CLI HTTP timeout | `20000` |
240
+ | `VIBEUSAGE_DEBUG` | Debug output (`1` / `true`) | off |
270
241
 
271
- ### CLI Tool Overrides
242
+ ### Local tool path overrides
272
243
 
273
244
  | Variable | Description | Default |
274
- |----------|-------------|---------|
275
- | `CODEX_HOME` | Codex CLI directory override | `~/.codex` |
276
- | `CODE_HOME` | Every Code directory override | `~/.code` |
277
- | `GEMINI_HOME` | Gemini CLI directory override | `~/.gemini` |
245
+ | --- | --- | --- |
246
+ | `CODEX_HOME` | Codex CLI home override | `~/.codex` |
247
+ | `CODE_HOME` | Every Code home override | `~/.code` |
248
+ | `GEMINI_HOME` | Gemini CLI home override | `~/.gemini` |
278
249
  | `OPENCODE_HOME` | OpenCode data directory override | `~/.local/share/opencode` |
279
250
 
280
- </details>
251
+ ## FAQ
281
252
 
282
- See also: [`docs/openclaw-integration.md`](docs/openclaw-integration.md) for the OpenClaw single-path accounting contract.
253
+ ### Does VibeUsage upload my code or conversations?
283
254
 
284
- ## 🔧 Troubleshooting
255
+ No. VibeUsage is designed around local parsing and minimal upload. It tracks token accounting and related metadata needed for usage reporting.
285
256
 
286
- <details>
287
- <summary><b>Data not appearing in Dashboard</b></summary>
257
+ ### Which command should I run after upgrading?
288
258
 
289
- 1. Check status: `npx vibeusage status`
290
- 2. Force manual sync: `npx vibeusage sync`
291
- 3. Check OpenCode SQLite reader health: `npx vibeusage status --diagnostics`
292
- 4. Run `npx vibeusage doctor` if OpenCode usage looks incomplete
293
- 5. Verify CLI tool hooks are configured (re-run `init` if needed)
294
- 6. Check debug output: `VIBEUSAGE_DEBUG=1 npx vibeusage sync`
259
+ Run:
295
260
 
296
- > [!NOTE]
297
- > 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`.
298
-
299
- </details>
261
+ ```bash
262
+ npx --yes vibeusage init
263
+ ```
300
264
 
301
- <details>
302
- <summary><b>Streak shows 0 days while totals look correct</b></summary>
265
+ `init` is the only supported command that repairs or updates local integration config.
303
266
 
304
- Streak is defined as consecutive days ending today. If today's total is 0, streak will be 0.
267
+ ### My OpenCode totals look incomplete. What should I check?
305
268
 
306
- If you expect a non-zero streak, clear cached auth/heatmap data and sign in again:
269
+ Run:
307
270
 
308
- ```javascript
309
- localStorage.removeItem("vibeusage.dashboard.auth.v1");
310
- Object.keys(localStorage)
311
- .filter((k) => k.startsWith("vibeusage.heatmap."))
312
- .forEach((k) => localStorage.removeItem(k));
313
- location.reload();
271
+ ```bash
272
+ npx vibeusage status
273
+ npx vibeusage doctor
314
274
  ```
315
275
 
316
- Complete the landing page sign-in flow again after reload.
276
+ If OpenCode support is incomplete, the most common issue is missing `sqlite3` on `PATH`, or a local SQLite query failure.
317
277
 
318
- Note: `insforge-auth-token` is not used by the dashboard; use `vibeusage.dashboard.auth.v1`.
278
+ ### My OpenClaw usage is not showing up. What should I check?
319
279
 
320
- </details>
280
+ 1. Run `npx vibeusage init`
281
+ 2. Restart the OpenClaw gateway
282
+ 3. Generate a real OpenClaw turn
283
+ 4. Run `npx vibeusage sync --from-openclaw`
284
+ 5. Inspect `npx vibeusage status` / `npx vibeusage doctor`
321
285
 
322
- <details>
323
- <summary><b>Timeout errors on slow connections</b></summary>
286
+ ### Is this Linux / Windows ready?
324
287
 
325
- Increase HTTP timeout for slow connections:
288
+ Not fully yet. VibeUsage is currently **macOS-first**. Cross-platform support is still on the roadmap.
326
289
 
327
- ```bash
328
- VIBEUSAGE_HTTP_TIMEOUT_MS=60000 npx vibeusage sync
329
- ```
290
+ ## For AI assistants
330
291
 
331
- </details>
292
+ If you want ChatGPT, Claude, or another assistant to install VibeUsage for you, use the guide here:
332
293
 
333
- ## 💻 Development
294
+ - [`docs/AI_AGENT_INSTALL.md`](docs/AI_AGENT_INSTALL.md)
334
295
 
335
- ### Local Development
296
+ ## Documentation
336
297
 
337
- ```bash
338
- # Clone the repository
339
- git clone https://github.com/your-username/vibeusage.git
340
- cd vibeusage
298
+ - [OpenClaw integration contract](docs/openclaw-integration.md)
299
+ - [Backend API](BACKEND_API.md)
300
+ - [Dashboard API notes](docs/dashboard/api.md)
301
+ - [Repository sitemap](docs/repo-sitemap.md)
302
+ - [AI agent install guide](docs/AI_AGENT_INSTALL.md)
341
303
 
342
- # Install dependencies
343
- npm install
304
+ ## Development
344
305
 
345
- # Start dashboard dev server
346
- cd dashboard
306
+ ```bash
307
+ git clone https://github.com/victorGPT/vibeusage.git
308
+ cd vibeusage
347
309
  npm install
348
- npm run dev
310
+ npm --prefix dashboard install
311
+ npm --prefix dashboard run dev
349
312
  ```
350
313
 
351
- ### Development Commands
314
+ ### Useful commands
352
315
 
353
316
  ```bash
354
- # Run tests
317
+ # test suite
355
318
  npm test
356
319
 
357
- # Run local CI checks
320
+ # full local CI gate
358
321
  npm run ci:local
359
322
 
360
- # Validate copy registry
361
- npm run validate:copy
362
-
363
- # Validate UI hardcoded text
364
- npm run validate:ui-hardcode
365
-
366
- # Validate architecture guardrails
367
- npm run validate:guardrails
368
-
369
- # Build backend functions
323
+ # build generated edge artifacts
370
324
  npm run build:insforge
371
325
 
372
- # Check backend build (no write)
326
+ # verify generated edge artifacts are current
373
327
  npm run build:insforge:check
374
328
 
375
- # Run smoke tests
376
- npm run smoke
377
- ```
378
-
379
- ### OpenSpec Workflow
380
-
381
- This project uses **OpenSpec** for spec-driven development. Before making significant changes:
382
-
383
- 1. Read [`openspec/project.md`](openspec/project.md) for project conventions
384
- 2. Check [`openspec/AGENTS.md`](openspec/AGENTS.md) for the full OpenSpec workflow
385
- 3. Run `npx openspec list` to see active changes
386
- 4. Run `npx openspec list --specs` to see existing specifications
329
+ # validate UI copy registry
330
+ npm run validate:copy
387
331
 
388
- See [CLAUDE.md](CLAUDE.md) for detailed guidelines.
332
+ # validate UI hardcoded strings
333
+ npm run validate:ui-hardcode
389
334
 
390
- ### Repository Navigation
335
+ # architecture guardrails
336
+ npm run validate:guardrails
391
337
 
392
- ```bash
393
- # Read the repository sitemap first
394
- cat docs/repo-sitemap.md
338
+ # smoke checks
339
+ npm run smoke
395
340
  ```
396
341
 
397
- ## 🗺️ Roadmap
398
-
399
- - [ ] Windows support
400
- - [ ] Linux support
401
- - [ ] Enhanced project-level statistics
402
- - [ ] Team collaboration features
403
- - [ ] Custom report exports
404
- - [ ] Additional AI CLI support
405
-
406
- See [Issues](https://github.com/your-username/vibeusage/issues) for detailed plans.
342
+ ## Contributing
407
343
 
408
- ## 🤝 Contributing
344
+ Contributions are welcome.
409
345
 
410
- We welcome all forms of contributions!
346
+ Before opening a larger change:
411
347
 
412
- 1. Fork the repository
413
- 2. Create a feature branch (`git checkout -b feature/amazing-feature`)
414
- 3. Commit your changes (`git commit -m 'Add amazing feature'`)
415
- 4. Push to the branch (`git push origin feature/amazing-feature`)
416
- 5. Create a Pull Request
348
+ - read [`AGENTS.md`](AGENTS.md)
349
+ - read [`docs/repo-sitemap.md`](docs/repo-sitemap.md)
350
+ - use the OpenSpec workflow for significant product or architecture changes
351
+ - keep user-facing copy in `dashboard/src/content/copy.csv`
417
352
 
418
- ### Development Guidelines
353
+ ## Roadmap
419
354
 
420
- - All user-facing text must be registered in `dashboard/src/content/copy.csv`
421
- - Follow the OpenSpec proposal process for significant changes
422
- - Code must pass all tests and validations
423
- - See [CLAUDE.md](CLAUDE.md) for detailed conventions
355
+ - broader Linux support
356
+ - Windows support
357
+ - richer project-level analytics
358
+ - better team / collaboration views
359
+ - more supported AI coding clients
424
360
 
425
- ## 📜 License
361
+ ## License
426
362
 
427
- This project is licensed under the [MIT License](LICENSE).
428
-
429
- ## 🙏 Acknowledgments
430
-
431
- - [InsForge](https://insforge.app) - Backend infrastructure
432
- - [Matrix-A Design System](docs/dashboard/matrix-a.md) - UI framework
433
- - All our amazing contributors
363
+ [MIT](LICENSE)
434
364
 
435
365
  ---
436
366
 
437
367
  <div align="center">
438
- <b>System_Ready // 2024-2026 VibeUsage</b><br/>
439
- <i>"Quantify Your AI Output. Own Your Data."</i><br/><br/>
440
-
441
- Made with 💚 by developers, for developers
442
-
443
- [Website](https://www.vibeusage.cc) •
444
- [Dashboard](https://www.vibeusage.cc) •
445
- [Docs](docs/) •
446
- [API](BACKEND_API.md)
368
+ <b>More tokens. More vibe.</b><br/>
369
+ <a href="https://www.vibeusage.cc">Website</a> ¡
370
+ <a href="https://github.com/victorGPT/vibeusage">GitHub</a> ¡
371
+ <a href="https://www.npmjs.com/package/vibeusage">npm</a>
447
372
  </div>
448
-
449
-
450
- ## AI Agent 快速安装
451
-
452
- 复制以下内容发送给你的 AI 助手:
453
-
454
- ```
455
- 请帮我安装 VibeUsage 来追踪 AI Token 用量。
456
-
457
- 执行以下命令:
458
- npx --yes vibeusage init
459
-
460
- 安装完成后验证:
461
- vibeusage status
462
- ```
463
-
464
- 或者查看完整指南: https://github.com/victorGPT/vibeusage/blob/main/docs/AI_AGENT_INSTALL.md