vibeusage 0.3.2 โ†’ 0.3.4

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,360 @@
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, 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/)
16
-
17
- [**English**](README.md) โ€ข [**ไธญๆ–‡่ฏดๆ˜Ž**](README.zh-CN.md)
18
-
19
- [**Documentation**](docs/) โ€ข [**Dashboard**](https://www.vibeusage.cc) โ€ข [**Backend API**](BACKEND_API.md)
20
-
21
- <br/>
22
-
23
- <img src="docs/screenshots/dashboard.png" width="900" alt="VibeUsage Dashboard Preview"/>
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)
24
14
 
25
- </div>
26
-
27
- ---
15
+ **[Let your agent install VibeUsage](docs/AI_AGENT_INSTALL.md)** ยท [Open Dashboard](https://www.vibeusage.cc) ยท [Visit Website](https://www.vibeusage.cc)
28
16
 
29
- ## ๐Ÿš€ Quick Start
17
+ Give the install guide to ChatGPT, Claude, Codex, or your preferred agent โ€” it can set up VibeUsage for you.
30
18
 
31
- Get started in 30 seconds:
32
-
33
- ```bash
34
- npx vibeusage init
35
- ```
19
+ <sub>Wherever you work, whichever agent you use, VibeUsage keeps your AI usage in one place.</sub>
36
20
 
37
- That's it! Your AI token usage will now automatically sync to the [Dashboard](https://www.vibeusage.cc) ๐ŸŽ‰
21
+ <br/>
38
22
 
39
- ## โœจ Why VibeUsage?
23
+ [Docs](docs/) ยท [Backend API](BACKEND_API.md) ยท [npm](https://www.npmjs.com/package/vibeusage) ยท [English](README.md) ยท [ไธญๆ–‡่ฏดๆ˜Ž](README.zh-CN.md)
40
24
 
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
25
+ <br/>
50
26
 
51
- ## ๐Ÿงฐ Supported AI CLIs
27
+ <img src="docs/screenshots/dashboard.png" width="900" alt="VibeUsage dashboard screenshot" />
52
28
 
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 |
29
+ </div>
61
30
 
62
- Whether you're using GPT-4, Claude 3.5 Sonnet, o1, or Gemini - all token consumption is unified and tracked.
31
+ ---
63
32
 
64
- ## ๐ŸŒŒ Overview
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.
65
34
 
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.
35
+ It is currently **macOS-first**, with support focused on real developer workflows around **Codex CLI, Every Code, Claude Code, Gemini CLI, OpenCode, and OpenClaw**.
67
36
 
68
- > [!TIP]
69
- > **Core Index**: Our signature metric that reflects your flow state by analyzing token consumption rates and patterns.
37
+ ## Why VibeUsage
70
38
 
71
- ## ๐Ÿ“Š Dashboard Features
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.
72
46
 
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
47
+ ## Quickstart
79
48
 
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
49
+ ### Requirements
85
50
 
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.)
51
+ - **Node.js 20.x**
52
+ - **macOS** is the primary supported environment today
53
+ - **`sqlite3` on PATH** for full OpenCode support
90
54
 
91
- <img src="docs/screenshots/landing.png" width="900" alt="VibeUsage Landing Preview"/>
55
+ ### Install and link your device
92
56
 
93
- ## ๐Ÿ”’ Privacy Guarantee
57
+ ```bash
58
+ npx --yes vibeusage init
59
+ ```
94
60
 
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.
61
+ What happens next:
96
62
 
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 |
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.
103
67
 
104
- ## ๐Ÿ“ฆ Installation
68
+ Then keep using your normal AI tools โ€” sync runs automatically in the background.
105
69
 
106
- ### Standard Setup
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`.
107
72
 
108
- Initialize your environment once - VibeUsage handles all synchronization automatically in the background:
73
+ ### Install with a dashboard link code
109
74
 
110
75
  ```bash
111
- npx vibeusage init
76
+ npx --yes vibeusage init --link-code <code>
112
77
  ```
113
78
 
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.
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.
116
80
 
117
- ### Authentication Methods
81
+ ## Supported clients
118
82
 
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
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
+ | **OpenClaw** | Auto-detected when installed | session plugin | local sanitized usage ledger |
123
91
 
124
- ### CLI Options
92
+ ### OpenClaw note
125
93
 
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
- ```
94
+ OpenClaw uses a dedicated privacy-preserving path:
136
95
 
137
- ### Auto-Configuration
96
+ **OpenClaw session plugin โ†’ local sanitized usage ledger โ†’ `vibeusage sync --from-openclaw`**
138
97
 
139
- Once `init` completes, all supported CLI tools are automatically configured for data sync:
98
+ - no transcript parsing
99
+ - no prompt / response content upload
100
+ - requires an OpenClaw gateway restart after plugin linking
140
101
 
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) |
102
+ See [`docs/openclaw-integration.md`](docs/openclaw-integration.md) for the exact contract.
149
103
 
150
- No further intervention required! ๐ŸŽ‰
104
+ ## What VibeUsage tracks
151
105
 
152
- If any integration drifts later, re-run `npx vibeusage init`. The read-only commands intentionally do not rewrite local hook/plugin state.
106
+ VibeUsage focuses on **usage accounting**, not content capture.
153
107
 
154
- ## ๐Ÿ’ก Usage
108
+ Tracked fields include:
155
109
 
156
- ### Manual Sync
110
+ - source / tool name
111
+ - model identity
112
+ - input tokens
113
+ - cached input tokens
114
+ - output tokens
115
+ - reasoning output tokens
116
+ - total tokens
117
+ - time bucket metadata
118
+ - project / public repo attribution when resolvable
157
119
 
158
- While sync happens automatically, you can manually trigger synchronization anytime:
120
+ ## What VibeUsage does not upload
159
121
 
160
- ```bash
161
- # Manually sync latest local session data
162
- npx vibeusage sync
122
+ VibeUsage does **not** upload:
163
123
 
164
- # Check current link status
165
- npx vibeusage status
166
- ```
124
+ - prompts
125
+ - responses
126
+ - source code
127
+ - chat transcripts
128
+ - OpenClaw transcript content
129
+ - raw workspace contents
130
+ - secrets, tokens, or credentials
167
131
 
168
- ### Health Check
132
+ For OpenClaw specifically, the supported path is limited to sanitized local usage metadata plus token counts.
169
133
 
170
- Run comprehensive diagnostics to identify issues:
134
+ ## How it works
171
135
 
172
- ```bash
173
- # Basic health check
174
- npx vibeusage doctor
136
+ ```mermaid
137
+ graph LR
138
+ A[Codex CLI] --> G[VibeUsage CLI]
139
+ B[Every Code] --> G
140
+ C[Claude Code] --> G
141
+ D[Gemini CLI] --> G
142
+ E[OpenCode] --> G
143
+ F[OpenClaw] --> G
144
+ G --> H[Local aggregation into 30-min UTC buckets]
145
+ H --> I[VibeUsage backend]
146
+ I --> J[Dashboard]
147
+ I --> K[Project usage]
148
+ I --> L[Public profile / leaderboard]
149
+ ```
175
150
 
176
- # JSON output for debugging
177
- npx vibeusage doctor --json --out doctor.json
151
+ At a high level:
178
152
 
179
- # Test against a different endpoint
180
- npx vibeusage doctor --base-url https://your-instance.insforge.app
181
- ```
153
+ 1. `init` installs lightweight hooks/plugins for supported tools.
154
+ 2. Your AI clients continue running normally.
155
+ 3. VibeUsage reads local usage artifacts incrementally.
156
+ 4. Usage is aggregated locally into **30-minute UTC buckets**.
157
+ 5. Batched uploads power the dashboard and API.
182
158
 
183
- ### Debug Mode
159
+ ## Dashboard features
184
160
 
185
- Enable debug output to see detailed request/response information:
161
+ VibeUsage ships with a hosted dashboard at [www.vibeusage.cc](https://www.vibeusage.cc).
186
162
 
187
- ```bash
188
- VIBEUSAGE_DEBUG=1 npx vibeusage sync
189
- # or
190
- npx vibeusage sync --debug
191
- ```
163
+ <img src="docs/screenshots/landing.png" width="900" alt="VibeUsage landing page screenshot" />
192
164
 
193
- ### Uninstall
165
+ ### Included views
194
166
 
195
- ```bash
196
- # Standard uninstall (keeps data)
197
- npx vibeusage uninstall
167
+ - **Usage summary** โ€” total, input, output, cached, and reasoning token views
168
+ - **Model breakdown** โ€” compare model families and individual models
169
+ - **Cost breakdown** โ€” estimate usage cost from pricing data
170
+ - **Activity heatmap** โ€” view active days and streak-like usage patterns
171
+ - **Trend views** โ€” inspect usage over day / week / month / total windows
172
+ - **Project usage panel** โ€” see which public GitHub repositories consumed the most tokens
173
+ - **Install panel** โ€” generate install / link-code flows from the dashboard
174
+ - **Optional public view** โ€” share a public page for your usage profile
175
+ - **Leaderboard** โ€” participate in community rankings
198
176
 
199
- # Full purge - removes all data including config and cached sessions
200
- npx vibeusage uninstall --purge
201
- ```
177
+ ## CLI commands
202
178
 
203
- ## ๐Ÿ—๏ธ Architecture
179
+ | Command | Purpose |
180
+ | --- | --- |
181
+ | `vibeusage init` | Install local integrations, link auth, and perform initial setup |
182
+ | `vibeusage sync` | Parse local usage and upload pending buckets |
183
+ | `vibeusage status` | Show current config, queue, upload, and integration status |
184
+ | `vibeusage diagnostics` | Emit machine-readable diagnostics JSON |
185
+ | `vibeusage doctor` | Run a health report and surface likely problems |
186
+ | `vibeusage uninstall` | Remove VibeUsage integration state |
204
187
 
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
- ```
188
+ ### Command examples
219
189
 
220
- ### Tech Stack
190
+ ```bash
191
+ # Install / repair local integration setup
192
+ npx --yes vibeusage init
221
193
 
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
194
+ # Preview setup changes without writing files
195
+ npx vibeusage init --dry-run
227
196
 
228
- ### Components
197
+ # Manual sync
198
+ npx vibeusage sync
229
199
 
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
200
+ # Drain the queue completely
201
+ npx vibeusage sync --drain
234
202
 
235
- ### Data Flow
203
+ # Status overview
204
+ npx vibeusage status
236
205
 
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
206
+ # Full diagnostics JSON
207
+ npx vibeusage diagnostics --out diagnostics.json
243
208
 
244
- ### Log Sources
209
+ # Health report
210
+ npx vibeusage doctor
245
211
 
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 | - |
212
+ # Remove integrations
213
+ npx vibeusage uninstall
214
+ ```
254
215
 
255
- ## โš™๏ธ Configuration
216
+ Run `node bin/tracker.js --help` or `npx vibeusage --help` for the current CLI surface.
256
217
 
257
- <details>
258
- <summary><b>Environment Variables</b></summary>
218
+ ## Configuration
259
219
 
260
- ### Core Settings
220
+ ### Runtime settings
261
221
 
262
222
  | 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) | - |
223
+ | --- | --- | --- |
224
+ | `VIBEUSAGE_INSFORGE_BASE_URL` | API base URL override | hosted default |
225
+ | `VIBEUSAGE_DASHBOARD_URL` | Dashboard URL override | `https://www.vibeusage.cc` |
226
+ | `VIBEUSAGE_DEVICE_TOKEN` | Preconfigured device token | unset |
227
+ | `VIBEUSAGE_HTTP_TIMEOUT_MS` | CLI HTTP timeout | `20000` |
228
+ | `VIBEUSAGE_DEBUG` | Debug output (`1` / `true`) | off |
270
229
 
271
- ### CLI Tool Overrides
230
+ ### Local tool path overrides
272
231
 
273
232
  | 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` |
233
+ | --- | --- | --- |
234
+ | `CODEX_HOME` | Codex CLI home override | `~/.codex` |
235
+ | `CODE_HOME` | Every Code home override | `~/.code` |
236
+ | `GEMINI_HOME` | Gemini CLI home override | `~/.gemini` |
278
237
  | `OPENCODE_HOME` | OpenCode data directory override | `~/.local/share/opencode` |
279
238
 
280
- </details>
281
-
282
- See also: [`docs/openclaw-integration.md`](docs/openclaw-integration.md) for the OpenClaw single-path accounting contract.
239
+ ## FAQ
283
240
 
284
- ## ๐Ÿ”ง Troubleshooting
241
+ ### Does VibeUsage upload my code or conversations?
285
242
 
286
- <details>
287
- <summary><b>Data not appearing in Dashboard</b></summary>
243
+ No. VibeUsage is designed around local parsing and minimal upload. It tracks token accounting and related metadata needed for usage reporting.
288
244
 
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`
245
+ ### Which command should I run after upgrading?
295
246
 
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`.
247
+ Run:
298
248
 
299
- </details>
249
+ ```bash
250
+ npx --yes vibeusage init
251
+ ```
300
252
 
301
- <details>
302
- <summary><b>Streak shows 0 days while totals look correct</b></summary>
253
+ `init` is the only supported command that repairs or updates local integration config.
303
254
 
304
- Streak is defined as consecutive days ending today. If today's total is 0, streak will be 0.
255
+ ### My OpenCode totals look incomplete. What should I check?
305
256
 
306
- If you expect a non-zero streak, clear cached auth/heatmap data and sign in again:
257
+ Run:
307
258
 
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();
259
+ ```bash
260
+ npx vibeusage status
261
+ npx vibeusage doctor
314
262
  ```
315
263
 
316
- Complete the landing page sign-in flow again after reload.
264
+ If OpenCode support is incomplete, the most common issue is missing `sqlite3` on `PATH`, or a local SQLite query failure.
317
265
 
318
- Note: `insforge-auth-token` is not used by the dashboard; use `vibeusage.dashboard.auth.v1`.
266
+ ### My OpenClaw usage is not showing up. What should I check?
319
267
 
320
- </details>
268
+ 1. Run `npx vibeusage init`
269
+ 2. Restart the OpenClaw gateway
270
+ 3. Generate a real OpenClaw turn
271
+ 4. Run `npx vibeusage sync --from-openclaw`
272
+ 5. Inspect `npx vibeusage status` / `npx vibeusage doctor`
321
273
 
322
- <details>
323
- <summary><b>Timeout errors on slow connections</b></summary>
274
+ ### Is this Linux / Windows ready?
324
275
 
325
- Increase HTTP timeout for slow connections:
276
+ Not fully yet. VibeUsage is currently **macOS-first**. Cross-platform support is still on the roadmap.
326
277
 
327
- ```bash
328
- VIBEUSAGE_HTTP_TIMEOUT_MS=60000 npx vibeusage sync
329
- ```
278
+ ## For AI assistants
330
279
 
331
- </details>
280
+ If you want ChatGPT, Claude, or another assistant to install VibeUsage for you, use the guide here:
332
281
 
333
- ## ๐Ÿ’ป Development
282
+ - [`docs/AI_AGENT_INSTALL.md`](docs/AI_AGENT_INSTALL.md)
334
283
 
335
- ### Local Development
284
+ ## Documentation
336
285
 
337
- ```bash
338
- # Clone the repository
339
- git clone https://github.com/your-username/vibeusage.git
340
- cd vibeusage
286
+ - [OpenClaw integration contract](docs/openclaw-integration.md)
287
+ - [Backend API](BACKEND_API.md)
288
+ - [Dashboard API notes](docs/dashboard/api.md)
289
+ - [Repository sitemap](docs/repo-sitemap.md)
290
+ - [AI agent install guide](docs/AI_AGENT_INSTALL.md)
341
291
 
342
- # Install dependencies
343
- npm install
292
+ ## Development
344
293
 
345
- # Start dashboard dev server
346
- cd dashboard
294
+ ```bash
295
+ git clone https://github.com/victorGPT/vibeusage.git
296
+ cd vibeusage
347
297
  npm install
348
- npm run dev
298
+ npm --prefix dashboard install
299
+ npm --prefix dashboard run dev
349
300
  ```
350
301
 
351
- ### Development Commands
302
+ ### Useful commands
352
303
 
353
304
  ```bash
354
- # Run tests
305
+ # test suite
355
306
  npm test
356
307
 
357
- # Run local CI checks
308
+ # full local CI gate
358
309
  npm run ci:local
359
310
 
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
311
+ # build generated edge artifacts
370
312
  npm run build:insforge
371
313
 
372
- # Check backend build (no write)
314
+ # verify generated edge artifacts are current
373
315
  npm run build:insforge:check
374
316
 
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
317
+ # validate UI copy registry
318
+ npm run validate:copy
387
319
 
388
- See [CLAUDE.md](CLAUDE.md) for detailed guidelines.
320
+ # validate UI hardcoded strings
321
+ npm run validate:ui-hardcode
389
322
 
390
- ### Repository Navigation
323
+ # architecture guardrails
324
+ npm run validate:guardrails
391
325
 
392
- ```bash
393
- # Read the repository sitemap first
394
- cat docs/repo-sitemap.md
326
+ # smoke checks
327
+ npm run smoke
395
328
  ```
396
329
 
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.
330
+ ## Contributing
407
331
 
408
- ## ๐Ÿค Contributing
332
+ Contributions are welcome.
409
333
 
410
- We welcome all forms of contributions!
334
+ Before opening a larger change:
411
335
 
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
336
+ - read [`AGENTS.md`](AGENTS.md)
337
+ - read [`docs/repo-sitemap.md`](docs/repo-sitemap.md)
338
+ - use the OpenSpec workflow for significant product or architecture changes
339
+ - keep user-facing copy in `dashboard/src/content/copy.csv`
417
340
 
418
- ### Development Guidelines
341
+ ## Roadmap
419
342
 
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
343
+ - broader Linux support
344
+ - Windows support
345
+ - richer project-level analytics
346
+ - better team / collaboration views
347
+ - more supported AI coding clients
424
348
 
425
- ## ๐Ÿ“œ License
349
+ ## License
426
350
 
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
351
+ [MIT](LICENSE)
434
352
 
435
353
  ---
436
354
 
437
355
  <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)
356
+ <b>More tokens. More vibe.</b><br/>
357
+ <a href="https://www.vibeusage.cc">Website</a> ยท
358
+ <a href="https://github.com/victorGPT/vibeusage">GitHub</a> ยท
359
+ <a href="https://www.npmjs.com/package/vibeusage">npm</a>
447
360
  </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