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 +230 -334
- package/README.zh-CN.md +230 -317
- package/package.json +1 -1
- package/src/commands/status.js +1 -1
- package/src/commands/uninstall.js +14 -5
- package/src/lib/claude-plugin.js +381 -0
- package/src/lib/diagnostics.js +2 -2
- package/src/lib/doctor.js +1 -1
- package/src/lib/integrations/claude.js +79 -31
- package/src/lib/openclaw-session-plugin.js +68 -4
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
|
|
3
|
+
<img src="dashboard/public/icon-192.png" width="96" alt="VibeUsage icon" />
|
|
4
4
|
|
|
5
|
-
#
|
|
5
|
+
# VibeUsage
|
|
6
6
|
|
|
7
|
-
**
|
|
8
|
-
|
|
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
|
-
[](https://opensource.org/licenses/MIT)
|
|
13
10
|
[](https://www.npmjs.com/package/vibeusage)
|
|
14
|
-
[ โข [**ไธญๆ่ฏดๆ**](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)
|
|
12
|
+
[](https://nodejs.org/)
|
|
13
|
+
[](https://www.vibeusage.cc)
|
|
24
14
|
|
|
25
|
-
|
|
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
|
-
|
|
17
|
+
Give the install guide to ChatGPT, Claude, Codex, or your preferred agent โ it can set up VibeUsage for you.
|
|
30
18
|
|
|
31
|
-
|
|
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
|
-
|
|
21
|
+
<br/>
|
|
38
22
|
|
|
39
|
-
|
|
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
|
-
|
|
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
|
-
|
|
27
|
+
<img src="docs/screenshots/dashboard.png" width="900" alt="VibeUsage dashboard screenshot" />
|
|
52
28
|
|
|
53
|
-
|
|
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
|
-
|
|
31
|
+
---
|
|
63
32
|
|
|
64
|
-
|
|
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
|
-
|
|
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
|
-
|
|
69
|
-
> **Core Index**: Our signature metric that reflects your flow state by analyzing token consumption rates and patterns.
|
|
37
|
+
## Why VibeUsage
|
|
70
38
|
|
|
71
|
-
|
|
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
|
-
|
|
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
|
-
###
|
|
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
|
-
|
|
87
|
-
- **
|
|
88
|
-
-
|
|
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
|
-
|
|
55
|
+
### Install and link your device
|
|
92
56
|
|
|
93
|
-
|
|
57
|
+
```bash
|
|
58
|
+
npx --yes vibeusage init
|
|
59
|
+
```
|
|
94
60
|
|
|
95
|
-
|
|
61
|
+
What happens next:
|
|
96
62
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
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
|
-
|
|
68
|
+
Then keep using your normal AI tools โ sync runs automatically in the background.
|
|
105
69
|
|
|
106
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
81
|
+
## Supported clients
|
|
118
82
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
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
|
-
###
|
|
92
|
+
### OpenClaw note
|
|
125
93
|
|
|
126
|
-
|
|
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
|
-
|
|
96
|
+
**OpenClaw session plugin โ local sanitized usage ledger โ `vibeusage sync --from-openclaw`**
|
|
138
97
|
|
|
139
|
-
|
|
98
|
+
- no transcript parsing
|
|
99
|
+
- no prompt / response content upload
|
|
100
|
+
- requires an OpenClaw gateway restart after plugin linking
|
|
140
101
|
|
|
141
|
-
|
|
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
|
-
|
|
104
|
+
## What VibeUsage tracks
|
|
151
105
|
|
|
152
|
-
|
|
106
|
+
VibeUsage focuses on **usage accounting**, not content capture.
|
|
153
107
|
|
|
154
|
-
|
|
108
|
+
Tracked fields include:
|
|
155
109
|
|
|
156
|
-
|
|
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
|
-
|
|
120
|
+
## What VibeUsage does not upload
|
|
159
121
|
|
|
160
|
-
|
|
161
|
-
# Manually sync latest local session data
|
|
162
|
-
npx vibeusage sync
|
|
122
|
+
VibeUsage does **not** upload:
|
|
163
123
|
|
|
164
|
-
|
|
165
|
-
|
|
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
|
-
|
|
132
|
+
For OpenClaw specifically, the supported path is limited to sanitized local usage metadata plus token counts.
|
|
169
133
|
|
|
170
|
-
|
|
134
|
+
## How it works
|
|
171
135
|
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
|
|
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
|
-
|
|
177
|
-
npx vibeusage doctor --json --out doctor.json
|
|
151
|
+
At a high level:
|
|
178
152
|
|
|
179
|
-
|
|
180
|
-
|
|
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
|
-
|
|
159
|
+
## Dashboard features
|
|
184
160
|
|
|
185
|
-
|
|
161
|
+
VibeUsage ships with a hosted dashboard at [www.vibeusage.cc](https://www.vibeusage.cc).
|
|
186
162
|
|
|
187
|
-
|
|
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
|
-
###
|
|
165
|
+
### Included views
|
|
194
166
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
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
|
-
|
|
200
|
-
npx vibeusage uninstall --purge
|
|
201
|
-
```
|
|
177
|
+
## CLI commands
|
|
202
178
|
|
|
203
|
-
|
|
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
|
-
|
|
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
|
-
|
|
190
|
+
```bash
|
|
191
|
+
# Install / repair local integration setup
|
|
192
|
+
npx --yes vibeusage init
|
|
221
193
|
|
|
222
|
-
|
|
223
|
-
|
|
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
|
-
|
|
197
|
+
# Manual sync
|
|
198
|
+
npx vibeusage sync
|
|
229
199
|
|
|
230
|
-
|
|
231
|
-
|
|
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
|
-
|
|
203
|
+
# Status overview
|
|
204
|
+
npx vibeusage status
|
|
236
205
|
|
|
237
|
-
|
|
238
|
-
|
|
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
|
-
|
|
209
|
+
# Health report
|
|
210
|
+
npx vibeusage doctor
|
|
245
211
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
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
|
-
|
|
216
|
+
Run `node bin/tracker.js --help` or `npx vibeusage --help` for the current CLI surface.
|
|
256
217
|
|
|
257
|
-
|
|
258
|
-
<summary><b>Environment Variables</b></summary>
|
|
218
|
+
## Configuration
|
|
259
219
|
|
|
260
|
-
###
|
|
220
|
+
### Runtime settings
|
|
261
221
|
|
|
262
222
|
| Variable | Description | Default |
|
|
263
|
-
|
|
264
|
-
| `
|
|
265
|
-
| `
|
|
266
|
-
| `
|
|
267
|
-
| `
|
|
268
|
-
| `
|
|
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
|
-
###
|
|
230
|
+
### Local tool path overrides
|
|
272
231
|
|
|
273
232
|
| Variable | Description | Default |
|
|
274
|
-
|
|
275
|
-
| `CODEX_HOME` | Codex CLI
|
|
276
|
-
| `CODE_HOME` | Every Code
|
|
277
|
-
| `GEMINI_HOME` | Gemini CLI
|
|
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
|
-
|
|
281
|
-
|
|
282
|
-
See also: [`docs/openclaw-integration.md`](docs/openclaw-integration.md) for the OpenClaw single-path accounting contract.
|
|
239
|
+
## FAQ
|
|
283
240
|
|
|
284
|
-
|
|
241
|
+
### Does VibeUsage upload my code or conversations?
|
|
285
242
|
|
|
286
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
249
|
+
```bash
|
|
250
|
+
npx --yes vibeusage init
|
|
251
|
+
```
|
|
300
252
|
|
|
301
|
-
|
|
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
|
-
|
|
255
|
+
### My OpenCode totals look incomplete. What should I check?
|
|
305
256
|
|
|
306
|
-
|
|
257
|
+
Run:
|
|
307
258
|
|
|
308
|
-
```
|
|
309
|
-
|
|
310
|
-
|
|
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
|
-
|
|
264
|
+
If OpenCode support is incomplete, the most common issue is missing `sqlite3` on `PATH`, or a local SQLite query failure.
|
|
317
265
|
|
|
318
|
-
|
|
266
|
+
### My OpenClaw usage is not showing up. What should I check?
|
|
319
267
|
|
|
320
|
-
|
|
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
|
-
|
|
323
|
-
<summary><b>Timeout errors on slow connections</b></summary>
|
|
274
|
+
### Is this Linux / Windows ready?
|
|
324
275
|
|
|
325
|
-
|
|
276
|
+
Not fully yet. VibeUsage is currently **macOS-first**. Cross-platform support is still on the roadmap.
|
|
326
277
|
|
|
327
|
-
|
|
328
|
-
VIBEUSAGE_HTTP_TIMEOUT_MS=60000 npx vibeusage sync
|
|
329
|
-
```
|
|
278
|
+
## For AI assistants
|
|
330
279
|
|
|
331
|
-
|
|
280
|
+
If you want ChatGPT, Claude, or another assistant to install VibeUsage for you, use the guide here:
|
|
332
281
|
|
|
333
|
-
|
|
282
|
+
- [`docs/AI_AGENT_INSTALL.md`](docs/AI_AGENT_INSTALL.md)
|
|
334
283
|
|
|
335
|
-
|
|
284
|
+
## Documentation
|
|
336
285
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
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
|
-
|
|
343
|
-
npm install
|
|
292
|
+
## Development
|
|
344
293
|
|
|
345
|
-
|
|
346
|
-
|
|
294
|
+
```bash
|
|
295
|
+
git clone https://github.com/victorGPT/vibeusage.git
|
|
296
|
+
cd vibeusage
|
|
347
297
|
npm install
|
|
348
|
-
npm
|
|
298
|
+
npm --prefix dashboard install
|
|
299
|
+
npm --prefix dashboard run dev
|
|
349
300
|
```
|
|
350
301
|
|
|
351
|
-
###
|
|
302
|
+
### Useful commands
|
|
352
303
|
|
|
353
304
|
```bash
|
|
354
|
-
#
|
|
305
|
+
# test suite
|
|
355
306
|
npm test
|
|
356
307
|
|
|
357
|
-
#
|
|
308
|
+
# full local CI gate
|
|
358
309
|
npm run ci:local
|
|
359
310
|
|
|
360
|
-
#
|
|
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
|
-
#
|
|
314
|
+
# verify generated edge artifacts are current
|
|
373
315
|
npm run build:insforge:check
|
|
374
316
|
|
|
375
|
-
#
|
|
376
|
-
npm run
|
|
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
|
-
|
|
320
|
+
# validate UI hardcoded strings
|
|
321
|
+
npm run validate:ui-hardcode
|
|
389
322
|
|
|
390
|
-
|
|
323
|
+
# architecture guardrails
|
|
324
|
+
npm run validate:guardrails
|
|
391
325
|
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
cat docs/repo-sitemap.md
|
|
326
|
+
# smoke checks
|
|
327
|
+
npm run smoke
|
|
395
328
|
```
|
|
396
329
|
|
|
397
|
-
##
|
|
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
|
-
|
|
332
|
+
Contributions are welcome.
|
|
409
333
|
|
|
410
|
-
|
|
334
|
+
Before opening a larger change:
|
|
411
335
|
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
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
|
-
|
|
341
|
+
## Roadmap
|
|
419
342
|
|
|
420
|
-
-
|
|
421
|
-
-
|
|
422
|
-
-
|
|
423
|
-
-
|
|
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
|
-
##
|
|
349
|
+
## License
|
|
426
350
|
|
|
427
|
-
|
|
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>
|
|
439
|
-
<
|
|
440
|
-
|
|
441
|
-
|
|
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
|