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 +239 -331
- package/README.zh-CN.md +230 -317
- package/package.json +1 -1
- package/src/commands/init.js +1 -1
- package/src/commands/status.js +17 -1
- package/src/commands/sync.js +81 -0
- package/src/commands/uninstall.js +24 -5
- package/src/lib/claude-plugin.js +381 -0
- package/src/lib/diagnostics.js +30 -2
- package/src/lib/doctor.js +1 -1
- package/src/lib/hermes-config.js +172 -0
- package/src/lib/hermes-usage-ledger.js +123 -0
- package/src/lib/integrations/claude.js +79 -31
- package/src/lib/integrations/context.js +6 -0
- package/src/lib/integrations/hermes.js +96 -0
- package/src/lib/integrations/index.js +2 -0
- package/src/lib/openclaw-session-plugin.js +67 -3
- package/src/templates/hermes-vibeusage-plugin/__init__.py +75 -0
- package/src/templates/hermes-vibeusage-plugin/plugin.yaml +9 -0
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
|
|
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, Hermes, 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
|
-
[](LICENSE)
|
|
12
|
+
[](https://nodejs.org/)
|
|
13
|
+
[](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
|
-
|
|
17
|
+
Give the install guide to ChatGPT, Claude, Codex, or your preferred agent â it can set up VibeUsage for you.
|
|
18
18
|
|
|
19
|
-
|
|
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
|
-
|
|
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
|
-
|
|
25
|
+
<br/>
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
<img src="docs/screenshots/dashboard.png" width="900" alt="VibeUsage dashboard screenshot" />
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
</div>
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
---
|
|
32
32
|
|
|
33
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
37
|
+
## Why VibeUsage
|
|
40
38
|
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
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
|
-
##
|
|
47
|
+
## Quickstart
|
|
52
48
|
|
|
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 |
|
|
49
|
+
### Requirements
|
|
61
50
|
|
|
62
|
-
|
|
51
|
+
- **Node.js 20.x**
|
|
52
|
+
- **macOS** is the primary supported environment today
|
|
53
|
+
- **`sqlite3` on PATH** for full OpenCode support
|
|
63
54
|
|
|
64
|
-
|
|
55
|
+
### Install and link your device
|
|
65
56
|
|
|
66
|
-
|
|
57
|
+
```bash
|
|
58
|
+
npx --yes vibeusage init
|
|
59
|
+
```
|
|
67
60
|
|
|
68
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
81
|
-
|
|
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
|
-
###
|
|
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
|
-
|
|
75
|
+
```bash
|
|
76
|
+
npx --yes vibeusage init --link-code <code>
|
|
77
|
+
```
|
|
92
78
|
|
|
93
|
-
|
|
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
|
-
|
|
81
|
+
## Supported clients
|
|
96
82
|
|
|
97
|
-
|
|
|
98
|
-
|
|
99
|
-
|
|
|
100
|
-
|
|
|
101
|
-
|
|
|
102
|
-
|
|
|
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
|
-
|
|
93
|
+
### Hermes note
|
|
105
94
|
|
|
106
|
-
|
|
95
|
+
Hermes uses a dedicated plugin-ledger path:
|
|
107
96
|
|
|
108
|
-
|
|
97
|
+
**`vibeusage init` installs Hermes plugin â Hermes lifecycle hooks append `~/.vibeusage/tracker/hermes.usage.jsonl` â `vibeusage sync` parses only that ledger**
|
|
109
98
|
|
|
110
|
-
|
|
111
|
-
|
|
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
|
-
|
|
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
|
-
|
|
105
|
+
OpenClaw uses a dedicated privacy-preserving path:
|
|
118
106
|
|
|
119
|
-
|
|
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
|
-
|
|
109
|
+
- no transcript parsing
|
|
110
|
+
- no prompt / response content upload
|
|
111
|
+
- requires an OpenClaw gateway restart after plugin linking
|
|
125
112
|
|
|
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
|
-
```
|
|
113
|
+
See [`docs/openclaw-integration.md`](docs/openclaw-integration.md) for the exact contract.
|
|
136
114
|
|
|
137
|
-
|
|
115
|
+
## What VibeUsage tracks
|
|
138
116
|
|
|
139
|
-
|
|
117
|
+
VibeUsage focuses on **usage accounting**, not content capture.
|
|
140
118
|
|
|
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) |
|
|
119
|
+
Tracked fields include:
|
|
149
120
|
|
|
150
|
-
|
|
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
|
-
|
|
131
|
+
## What VibeUsage does not upload
|
|
153
132
|
|
|
154
|
-
|
|
133
|
+
VibeUsage does **not** upload:
|
|
155
134
|
|
|
156
|
-
|
|
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
|
-
|
|
143
|
+
For OpenClaw specifically, the supported path is limited to sanitized local usage metadata plus token counts.
|
|
159
144
|
|
|
160
|
-
|
|
161
|
-
# Manually sync latest local session data
|
|
162
|
-
npx vibeusage sync
|
|
145
|
+
## How it works
|
|
163
146
|
|
|
164
|
-
|
|
165
|
-
|
|
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
|
-
|
|
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
|
-
|
|
177
|
-
|
|
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
|
-
|
|
180
|
-
npx vibeusage doctor --base-url https://your-instance.insforge.app
|
|
181
|
-
```
|
|
171
|
+
## Dashboard features
|
|
182
172
|
|
|
183
|
-
|
|
173
|
+
VibeUsage ships with a hosted dashboard at [www.vibeusage.cc](https://www.vibeusage.cc).
|
|
184
174
|
|
|
185
|
-
|
|
175
|
+
<img src="docs/screenshots/landing.png" width="900" alt="VibeUsage landing page screenshot" />
|
|
186
176
|
|
|
187
|
-
|
|
188
|
-
VIBEUSAGE_DEBUG=1 npx vibeusage sync
|
|
189
|
-
# or
|
|
190
|
-
npx vibeusage sync --debug
|
|
191
|
-
```
|
|
177
|
+
### Included views
|
|
192
178
|
|
|
193
|
-
|
|
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
|
-
|
|
196
|
-
# Standard uninstall (keeps data)
|
|
197
|
-
npx vibeusage uninstall
|
|
189
|
+
## CLI commands
|
|
198
190
|
|
|
199
|
-
|
|
200
|
-
|
|
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
|
-
|
|
200
|
+
### Command examples
|
|
204
201
|
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
|
|
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
|
-
|
|
223
|
-
|
|
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
|
-
|
|
209
|
+
# Manual sync
|
|
210
|
+
npx vibeusage sync
|
|
229
211
|
|
|
230
|
-
|
|
231
|
-
|
|
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
|
-
|
|
215
|
+
# Status overview
|
|
216
|
+
npx vibeusage status
|
|
236
217
|
|
|
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
|
|
218
|
+
# Full diagnostics JSON
|
|
219
|
+
npx vibeusage diagnostics --out diagnostics.json
|
|
243
220
|
|
|
244
|
-
|
|
221
|
+
# Health report
|
|
222
|
+
npx vibeusage doctor
|
|
245
223
|
|
|
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 | - |
|
|
224
|
+
# Remove integrations
|
|
225
|
+
npx vibeusage uninstall
|
|
226
|
+
```
|
|
254
227
|
|
|
255
|
-
|
|
228
|
+
Run `node bin/tracker.js --help` or `npx vibeusage --help` for the current CLI surface.
|
|
256
229
|
|
|
257
|
-
|
|
258
|
-
<summary><b>Environment Variables</b></summary>
|
|
230
|
+
## Configuration
|
|
259
231
|
|
|
260
|
-
###
|
|
232
|
+
### Runtime settings
|
|
261
233
|
|
|
262
234
|
| Variable | Description | Default |
|
|
263
|
-
|
|
264
|
-
| `
|
|
265
|
-
| `
|
|
266
|
-
| `
|
|
267
|
-
| `
|
|
268
|
-
| `
|
|
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
|
-
###
|
|
242
|
+
### Local tool path overrides
|
|
272
243
|
|
|
273
244
|
| Variable | Description | Default |
|
|
274
|
-
|
|
275
|
-
| `CODEX_HOME` | Codex CLI
|
|
276
|
-
| `CODE_HOME` | Every Code
|
|
277
|
-
| `GEMINI_HOME` | Gemini CLI
|
|
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
|
-
|
|
251
|
+
## FAQ
|
|
281
252
|
|
|
282
|
-
|
|
253
|
+
### Does VibeUsage upload my code or conversations?
|
|
283
254
|
|
|
284
|
-
|
|
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
|
-
|
|
287
|
-
<summary><b>Data not appearing in Dashboard</b></summary>
|
|
257
|
+
### Which command should I run after upgrading?
|
|
288
258
|
|
|
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`
|
|
259
|
+
Run:
|
|
295
260
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
</details>
|
|
261
|
+
```bash
|
|
262
|
+
npx --yes vibeusage init
|
|
263
|
+
```
|
|
300
264
|
|
|
301
|
-
|
|
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
|
-
|
|
267
|
+
### My OpenCode totals look incomplete. What should I check?
|
|
305
268
|
|
|
306
|
-
|
|
269
|
+
Run:
|
|
307
270
|
|
|
308
|
-
```
|
|
309
|
-
|
|
310
|
-
|
|
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
|
-
|
|
276
|
+
If OpenCode support is incomplete, the most common issue is missing `sqlite3` on `PATH`, or a local SQLite query failure.
|
|
317
277
|
|
|
318
|
-
|
|
278
|
+
### My OpenClaw usage is not showing up. What should I check?
|
|
319
279
|
|
|
320
|
-
|
|
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
|
-
|
|
323
|
-
<summary><b>Timeout errors on slow connections</b></summary>
|
|
286
|
+
### Is this Linux / Windows ready?
|
|
324
287
|
|
|
325
|
-
|
|
288
|
+
Not fully yet. VibeUsage is currently **macOS-first**. Cross-platform support is still on the roadmap.
|
|
326
289
|
|
|
327
|
-
|
|
328
|
-
VIBEUSAGE_HTTP_TIMEOUT_MS=60000 npx vibeusage sync
|
|
329
|
-
```
|
|
290
|
+
## For AI assistants
|
|
330
291
|
|
|
331
|
-
|
|
292
|
+
If you want ChatGPT, Claude, or another assistant to install VibeUsage for you, use the guide here:
|
|
332
293
|
|
|
333
|
-
|
|
294
|
+
- [`docs/AI_AGENT_INSTALL.md`](docs/AI_AGENT_INSTALL.md)
|
|
334
295
|
|
|
335
|
-
|
|
296
|
+
## Documentation
|
|
336
297
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
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
|
-
|
|
343
|
-
npm install
|
|
304
|
+
## Development
|
|
344
305
|
|
|
345
|
-
|
|
346
|
-
|
|
306
|
+
```bash
|
|
307
|
+
git clone https://github.com/victorGPT/vibeusage.git
|
|
308
|
+
cd vibeusage
|
|
347
309
|
npm install
|
|
348
|
-
npm
|
|
310
|
+
npm --prefix dashboard install
|
|
311
|
+
npm --prefix dashboard run dev
|
|
349
312
|
```
|
|
350
313
|
|
|
351
|
-
###
|
|
314
|
+
### Useful commands
|
|
352
315
|
|
|
353
316
|
```bash
|
|
354
|
-
#
|
|
317
|
+
# test suite
|
|
355
318
|
npm test
|
|
356
319
|
|
|
357
|
-
#
|
|
320
|
+
# full local CI gate
|
|
358
321
|
npm run ci:local
|
|
359
322
|
|
|
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
|
|
323
|
+
# build generated edge artifacts
|
|
370
324
|
npm run build:insforge
|
|
371
325
|
|
|
372
|
-
#
|
|
326
|
+
# verify generated edge artifacts are current
|
|
373
327
|
npm run build:insforge:check
|
|
374
328
|
|
|
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
|
|
329
|
+
# validate UI copy registry
|
|
330
|
+
npm run validate:copy
|
|
387
331
|
|
|
388
|
-
|
|
332
|
+
# validate UI hardcoded strings
|
|
333
|
+
npm run validate:ui-hardcode
|
|
389
334
|
|
|
390
|
-
|
|
335
|
+
# architecture guardrails
|
|
336
|
+
npm run validate:guardrails
|
|
391
337
|
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
cat docs/repo-sitemap.md
|
|
338
|
+
# smoke checks
|
|
339
|
+
npm run smoke
|
|
395
340
|
```
|
|
396
341
|
|
|
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.
|
|
342
|
+
## Contributing
|
|
407
343
|
|
|
408
|
-
|
|
344
|
+
Contributions are welcome.
|
|
409
345
|
|
|
410
|
-
|
|
346
|
+
Before opening a larger change:
|
|
411
347
|
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
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
|
-
|
|
353
|
+
## Roadmap
|
|
419
354
|
|
|
420
|
-
-
|
|
421
|
-
-
|
|
422
|
-
-
|
|
423
|
-
-
|
|
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
|
-
##
|
|
361
|
+
## License
|
|
426
362
|
|
|
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
|
|
363
|
+
[MIT](LICENSE)
|
|
434
364
|
|
|
435
365
|
---
|
|
436
366
|
|
|
437
367
|
<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)
|
|
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
|