vibechk 0.1.0

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 ADDED
@@ -0,0 +1,310 @@
1
+ # vibechk ๐Ÿ”ฅ
2
+
3
+ > Daily streak tracker for vibe coders. Tracks your AI-assisted coding sessions and lets you compare streaks with friends โ€” no server required.
4
+
5
+ Built for developers who use Claude Code, Cursor, Windsurf, and other AI coding tools. Like Duolingo's streak system โ€” but for vibe coding.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install -g vibechk
11
+ ```
12
+
13
+ ## Quickstart โ€” leaderboard with friends in 5 commands
14
+
15
+ ```bash
16
+ # 1. Set up and start tracking
17
+ vibechk init # username + timezone + install daily auto-check-in
18
+
19
+ # 2. Get a GitHub token, then publish your streak to a Gist
20
+ # โ†’ go to https://github.com/settings/tokens/new?scopes=gist
21
+ # โ†’ generate a token with only the "gist" scope
22
+ # โ†’ paste it when prompted
23
+ vibechk publish # prints your shareable URL โ€” send it to friends
24
+
25
+ # 3. Add friends (use the URL they got from their own `vibechk publish`)
26
+ vibechk friend add alice https://gist.githubusercontent.com/alice/abc/raw/vibechk.json
27
+ vibechk friend add bob https://gist.githubusercontent.com/bob/xyz/raw/vibechk.json
28
+
29
+ # 4. See the leaderboard
30
+ vibechk friends
31
+ ```
32
+
33
+ That's it โ€” no server, no account, no config file. After setup, `vibechk friends` auto-refreshes data and shows everyone's current streak ranked.
34
+
35
+ ---
36
+
37
+ ## Full Flow: Install โ†’ Track โ†’ Share โ†’ Leaderboard
38
+
39
+ ### 1. Set up (30 seconds)
40
+
41
+ ```bash
42
+ vibechk init
43
+ ```
44
+
45
+ Prompts for your username, auto-detects your timezone, and optionally installs a daily 9 PM auto-check-in job (recommended).
46
+
47
+ ---
48
+
49
+ ### 2. Check in
50
+
51
+ The scheduler installed during `init` handles check-ins automatically each evening โ€” it scans your Claude Code session logs and updates your streak without any action from you.
52
+
53
+ ```
54
+ # Runs automatically via launchd (macOS) or cron (Linux) at 9 PM
55
+ ๐Ÿ”ฅ Day 23! Streak protected.
56
+ ```
57
+
58
+ If you need to trigger a check-in manually:
59
+
60
+ ```bash
61
+ vibechk check-in # auto-detect Claude Code sessions
62
+ vibechk check-in --manual # skip auto-detection
63
+ ```
64
+
65
+ ---
66
+
67
+ ### 3. View your stats
68
+
69
+ ```bash
70
+ vibechk status # Terminal dashboard
71
+ vibechk status --web # Visual dashboard in browser
72
+ vibechk log # Last 30 days as a calendar
73
+ ```
74
+
75
+ ```
76
+ $ vibechk status
77
+ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ vibechk โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
78
+ โ”‚ ๐Ÿ”ฅ 23-day streak โœ“ Protected for today โ”‚
79
+ โ”‚ โ”‚
80
+ โ”‚ Progress โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘ โ†’ day 30 โ”‚
81
+ โ”‚ Longest 23d โ”‚ Freezes โ„๏ธ โ„๏ธ โ”‚
82
+ โ”‚ โ”‚
83
+ โ”‚ M:โœ“ T:โœ“ W:โœ“ T:โœ“ F:โœ“ S:ยท S:โœ“ โ”‚
84
+ โ”‚ โ”‚
85
+ โ”‚ March 7, 2026 โ”‚ alice_codes โ”‚
86
+ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
87
+
88
+ $ vibechk log
89
+
90
+ Last 30 days Feb 6 โ€“ Mar 7
91
+ โœ“ coded ยท missed
92
+
93
+ Mo Tu We Th Fr Sa Su
94
+ Feb 6 โœ“ โœ“ โœ“ โœ“ โœ“ ยท
95
+ Feb 13 โœ“ โœ“ โœ“ โœ“ โœ“ ยท โœ“
96
+ Feb 20 โœ“ โœ“ โœ“ ยท โœ“ โœ“ โœ“
97
+ Feb 27 โœ“ โœ“ โœ“ โœ“ โœ“ ยท โœ“
98
+ Mar 6 โœ“ โ—‹
99
+
100
+ Consistency: 87% โ€” 26 of 30 days
101
+ ```
102
+
103
+ ---
104
+
105
+ ### 4. Share your streak with friends (no server needed)
106
+
107
+ **Step 1 โ€” Publish your streak to a GitHub Gist:**
108
+
109
+ ```bash
110
+ vibechk publish
111
+ ```
112
+
113
+ You'll be prompted once for a GitHub personal access token (needs only the `gist` scope). vibechk creates a public Gist with your streak data and prints your shareable URL:
114
+
115
+ ```
116
+ Your friend URL: https://gist.githubusercontent.com/alice/abc123/raw/vibechk.json
117
+
118
+ Share this URL with friends so they can follow your streak:
119
+ vibechk friend add alice https://gist.githubusercontent.com/alice/abc123/raw/vibechk.json
120
+ ```
121
+
122
+ **Step 2 โ€” Tell your friend to add you:**
123
+
124
+ Your friend runs the command above on their machine. That's it.
125
+
126
+ **Step 3 โ€” Add your friends back:**
127
+
128
+ ```bash
129
+ vibechk friend add bob https://gist.githubusercontent.com/bob/xyz789/raw/vibechk.json
130
+ ```
131
+
132
+ ---
133
+
134
+ ### 5. View the leaderboard
135
+
136
+ ```bash
137
+ vibechk friends
138
+ ```
139
+
140
+ Shows all your friends' streaks in a ranked table. Data auto-refreshes whenever it's stale:
141
+
142
+ ```
143
+ $ vibechk friends
144
+ Refreshing 3 friend(s)... 3/3 updated.
145
+
146
+ name streak today 30d% best
147
+ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
148
+ bob ๐Ÿ† 41d 97% 41d
149
+ carol ๐Ÿ”ฅ 23d โœ“ 87% 30d
150
+ alice ๐Ÿ”ฅ 19d โœ“ 80% 25d
151
+ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
152
+ you ๐Ÿ”ฅ 23d โœ“ โ€” 23d
153
+
154
+ Last synced: 0m ago
155
+ Your URL: https://gist.githubusercontent.com/...
156
+ ```
157
+
158
+ Your streak is automatically re-published to your Gist after each auto-check-in, so your friends always see fresh data.
159
+
160
+ ---
161
+
162
+ ## Streak Mechanics
163
+
164
+ ### Forgiveness โ€” two tiers
165
+
166
+ **Grace period (automatic):** Miss 1 day? Your streak is preserved automatically. Resets every 14 days so it's always available for genuine one-off misses.
167
+
168
+ **Freeze tokens (explicit):** Start with 2 tokens. Earn more at the 30, 60, and 90-day milestones. Use them when you know you'll miss a day:
169
+
170
+ ```bash
171
+ vibechk freeze --tomorrow # Pre-apply for a planned absence
172
+ vibechk freeze # Use today to recover yesterday's miss
173
+ ```
174
+
175
+ ### Milestones
176
+
177
+ | Days | Badge | Rarity | Bonus |
178
+ |---|---|---|---|
179
+ | 3 | ๐ŸŒฑ Warming Up | Common | |
180
+ | 7 | โšก Week Warrior | Common | |
181
+ | 14 | ๐Ÿš€ Fortnight Coder | Common | |
182
+ | 30 | ๐Ÿ† Monthly Builder | Rare | +1 freeze token |
183
+ | 60 | ๐Ÿ’Ž Two Month Grind | Rare | +1 freeze token |
184
+ | 90 | ๐Ÿ”ฅ Quarter Strong | Epic | +1 freeze token |
185
+ | 100 | ๐Ÿ’ฏ Triple Digits | Epic | |
186
+ | 180 | ๐ŸŒŸ Half Year Vibe | Legendary | |
187
+ | 365 | ๐Ÿ‘‘ Year of the Vibe | Legendary | |
188
+
189
+ Hitting a milestone opens a visual celebration in your browser.
190
+
191
+ ---
192
+
193
+ ## All Commands
194
+
195
+ ### Daily use
196
+
197
+ | Command | What it does |
198
+ |---|---|
199
+ | `vibechk` | Terminal streak dashboard |
200
+ | `vibechk check-in` | Manually trigger a check-in (auto-detects Claude Code sessions) |
201
+ | `vibechk check-in --manual` | Check in without auto-detection |
202
+ | `vibechk status` | Terminal streak dashboard |
203
+ | `vibechk status --web` | Visual dashboard in browser |
204
+ | `vibechk log` | Last 30 days as a calendar grid |
205
+ | `vibechk share` | Generate a shareable streak summary (copies to clipboard) |
206
+
207
+ ### Scheduler
208
+
209
+ | Command | What it does |
210
+ |---|---|
211
+ | `vibechk schedule` | Install daily 9 PM auto-check-in (macOS/Linux) |
212
+ | `vibechk schedule --time 20:00` | Install at a custom time |
213
+ | `vibechk schedule --remove` | Remove the scheduled job |
214
+ | `vibechk schedule --status` | Check if a schedule is installed |
215
+
216
+ ### Friends & sharing
217
+
218
+ | Command | What it does |
219
+ |---|---|
220
+ | `vibechk publish` | Publish streak to GitHub Gist (first run prompts for token) |
221
+ | `vibechk friends` | Show friends' streaks (auto-refreshes stale data) |
222
+ | `vibechk friend add <alias> <url>` | Subscribe to a friend's streak |
223
+ | `vibechk friend remove <alias>` | Unsubscribe from a friend |
224
+ | `vibechk friend pull` | Force-refresh all friends now |
225
+
226
+ ### Freeze tokens
227
+
228
+ | Command | What it does |
229
+ |---|---|
230
+ | `vibechk freeze` | Use a token to recover from yesterday's miss |
231
+ | `vibechk freeze --tomorrow` | Pre-apply a token for tomorrow |
232
+
233
+ ### Data
234
+
235
+ | Command | What it does |
236
+ |---|---|
237
+ | `vibechk export` | Export all data as JSON |
238
+
239
+ ---
240
+
241
+ ## Session Detection
242
+
243
+ vibechk auto-detects coding sessions by scanning your local Claude Code session logs at `~/.config/claude/projects/**/*.jsonl`. Detection runs at check-in time โ€” nothing runs in the background between check-ins.
244
+
245
+ **Supported sources:**
246
+ - `claude-code` โ€” Claude Code session logs (default, no config needed)
247
+ - `git` โ€” Git commits in watched repos (opt-in via `init`)
248
+ - `manual` โ€” `vibechk check-in --manual`
249
+
250
+ ---
251
+
252
+ ## Automatic daily tracking
253
+
254
+ Install the scheduler once and vibechk runs itself every evening:
255
+
256
+ ```bash
257
+ vibechk schedule # installs at 9 PM (macOS: launchd, Linux: cron)
258
+ vibechk schedule --time 20:00 # different time
259
+ ```
260
+
261
+ The scheduler runs `vibechk check-in --no-interactive --quiet` โ€” it only records a streak day when a coding session is actually detected, then silently re-publishes your Gist so friends see fresh data.
262
+
263
+ ---
264
+
265
+ ## Scripting / CI
266
+
267
+ ```bash
268
+ vibechk check-in --quiet # minimal output
269
+ vibechk check-in --json # structured JSON output
270
+ vibechk check-in --no-interactive # no prompts (for scripts/CI)
271
+ vibechk status --json
272
+ ```
273
+
274
+ ## Programmatic API
275
+
276
+ ```typescript
277
+ import { checkIn, getStreak, getProfile, exportData } from 'vibechk'
278
+
279
+ const result = await checkIn({ source: 'api', notes: 'Built auth flow' })
280
+ // { action: 'continued', streak: 24, newMilestones: [], freezeTokensRemaining: 2 }
281
+
282
+ const streak = getStreak()
283
+ // { currentStreak: 24, longestStreak: 24, status: 'active', freezeTokens: 2, ... }
284
+ ```
285
+
286
+ ---
287
+
288
+ ## Data & Privacy
289
+
290
+ All data stored locally in `~/.vibechk/`:
291
+
292
+ ```
293
+ ~/.vibechk/
294
+ โ”œโ”€โ”€ profile.json # Username, timezone, preferences
295
+ โ”œโ”€โ”€ streak.json # Current streak state
296
+ โ”œโ”€โ”€ activity.jsonl # Full activity log (never published)
297
+ โ”œโ”€โ”€ badges.json # Earned milestones
298
+ โ”œโ”€โ”€ friends.json # Friend subscriptions + cached data
299
+ โ””โ”€โ”€ gist-token # GitHub token (gist scope only)
300
+ ```
301
+
302
+ - **No telemetry.** No analytics. No ping-home on install or run.
303
+ - **Activity log is private.** Only your public summary (streak counts, badges) is published to your Gist.
304
+ - **Export anytime:** `vibechk export > backup.json`
305
+
306
+ ---
307
+
308
+ ## License
309
+
310
+ MIT