@cacinie/cace-timer 1.1.1 → 1.3.2

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.
Files changed (52) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +491 -192
  3. package/dist/commands/delete.d.ts +4 -0
  4. package/dist/commands/delete.js +48 -0
  5. package/dist/commands/export.d.ts +4 -0
  6. package/dist/commands/export.js +104 -0
  7. package/dist/commands/help.d.ts +1 -0
  8. package/dist/commands/help.js +73 -0
  9. package/dist/commands/list.d.ts +5 -0
  10. package/dist/commands/list.js +42 -0
  11. package/dist/commands/mark.d.ts +1 -0
  12. package/dist/commands/mark.js +27 -0
  13. package/dist/commands/pomodoro.d.ts +6 -0
  14. package/dist/commands/pomodoro.js +135 -0
  15. package/dist/commands/resume.d.ts +4 -0
  16. package/dist/commands/resume.js +54 -0
  17. package/dist/commands/search.d.ts +1 -0
  18. package/dist/commands/search.js +36 -0
  19. package/dist/commands/start.d.ts +4 -0
  20. package/dist/commands/start.js +47 -0
  21. package/dist/commands/status.d.ts +1 -0
  22. package/dist/commands/status.js +48 -0
  23. package/dist/commands/stop.d.ts +3 -0
  24. package/dist/commands/stop.js +104 -0
  25. package/dist/commands/summary.d.ts +6 -0
  26. package/dist/commands/summary.js +128 -0
  27. package/dist/commands/sync.d.ts +1 -0
  28. package/dist/commands/sync.js +62 -0
  29. package/dist/data.d.ts +18 -0
  30. package/dist/data.js +161 -0
  31. package/dist/i18n.d.ts +7 -0
  32. package/dist/i18n.js +418 -0
  33. package/dist/index.js +142 -498
  34. package/dist/mascot.d.ts +9 -0
  35. package/dist/mascot.js +257 -0
  36. package/dist/parser.d.ts +6 -0
  37. package/dist/parser.js +45 -0
  38. package/dist/tui/countdown.d.ts +8 -0
  39. package/dist/tui/countdown.js +135 -0
  40. package/dist/tui/dashboard.d.ts +2 -0
  41. package/dist/tui/dashboard.js +135 -0
  42. package/dist/tui/index.d.ts +2 -0
  43. package/dist/tui/index.js +8 -0
  44. package/dist/tui/lifecycle.d.ts +28 -0
  45. package/dist/tui/lifecycle.js +82 -0
  46. package/dist/tui/reflection.d.ts +5 -0
  47. package/dist/tui/reflection.js +71 -0
  48. package/dist/types.d.ts +24 -0
  49. package/dist/types.js +2 -0
  50. package/dist/utils.d.ts +5 -0
  51. package/dist/utils.js +44 -0
  52. package/package.json +20 -4
package/README.md CHANGED
@@ -1,192 +1,491 @@
1
- # cace-timer
2
-
3
- [![npm version](https://img.shields.io/npm/v/@cacinie/cace-timer.svg)](https://www.npmjs.com/package/@cacinie/cace-timer)
4
- [![license](https://img.shields.io/npm/l/@cacinie/cace-timer.svg)](https://github.com/CacinieP/cace-timer/blob/main/LICENSE)
5
-
6
- A minimal time tracking CLI with cute anime girl mascot.
7
-
8
- ```
9
- npm install -g @cacinie/cace-timer
10
- ```
11
-
12
- ```
13
- ▄▄▄▄▄▄▄▄▄▄▄▄
14
- █░░░░░░░░░░░░█
15
- █░▄▄▄▄▄▄▄▄▄░█
16
- █░│ ● ● │░█
17
- █░│ ▽ │░█
18
- █░│ ─── │░█
19
- ╰────────────╯
20
- CACE TIMER
21
- ```
22
-
23
- ## Quick Start
24
-
25
- ```bash
26
- # Start a task
27
- tk start "写周报" --tag work --estimate 30
28
-
29
- # Mark progress
30
- tk mark "完成数据分析"
31
-
32
- # Check status
33
- tk status
34
-
35
- # Stop and get efficiency score
36
- tk stop
37
- ```
38
-
39
- ## Commands
40
-
41
- ### `tk start <task> [options]`
42
-
43
- Start a new task.
44
-
45
- | Option | Description |
46
- |--------|-------------|
47
- | `--tag <tag>` | Add a tag |
48
- | `--estimate <minutes>` | Estimated duration (for efficiency score) |
49
-
50
- ```bash
51
- tk start "开发登录功能" --tag coding --estimate 60
52
- ```
53
-
54
- ### `tk mark <note>`
55
-
56
- Record a time checkpoint.
57
-
58
- ```bash
59
- tk mark "完成API接口"
60
- tk mark "开始写测试"
61
- ```
62
-
63
- ### `tk stop`
64
-
65
- Stop current task, show summary and efficiency score.
66
-
67
- | Score | Emoji | Meaning |
68
- |-------|-------|---------|
69
- | 100% | 🏆 | Actual ≤ Estimate |
70
- | 80-99% | ⭐ | Slightly over or on target |
71
- | 50-79% | 💪 | Moderately over estimate |
72
- | <50% | 💀 | Far over estimate |
73
-
74
- Efficiency score is only shown when `--estimate` was set at task start.
75
-
76
- ### `tk status`
77
-
78
- Show current running task.
79
-
80
- ### `tk list [options]`
81
-
82
- View history.
83
-
84
- | Option | Description |
85
- |--------|-------------|
86
- | `--today` | Today only |
87
- | `--tag <tag>` | Filter by tag |
88
- | `--limit <n>` | Limit count (default 10) |
89
-
90
- ```bash
91
- tk list --today
92
- tk list --tag coding --limit 20
93
- ```
94
-
95
- ### `tk search <keyword>`
96
-
97
- Search across task names, tags, and mark notes.
98
-
99
- ```bash
100
- tk search "登录"
101
- ```
102
-
103
- ### `tk sync <path>`
104
-
105
- Set sync file path for cross-device sync (Dropbox / iCloud / OneDrive).
106
-
107
- ```bash
108
- # macOS / Linux
109
- tk sync ~/Dropbox/cace-timer.json
110
- tk sync ~/OneDrive/cace-timer.json
111
-
112
- # Windows
113
- tk sync "%USERPROFILE%\Dropbox\cace-timer.json"
114
- tk sync "%USERPROFILE%\OneDrive\cace-timer.json"
115
- ```
116
-
117
- ### `tk help`
118
-
119
- Show help.
120
-
121
- ## CACE Mascot
122
-
123
- CACE reacts to what you do:
124
-
125
- | State | Eyes | Mouth | When |
126
- |-------|------|-------|------|
127
- | Normal | | ─── | Default |
128
- | Happy | ★ ★ | ◡◡◡ | Task completed |
129
- | Super Happy | | ▽△▽ | Animation frame |
130
- | Sleepy | ─ ─ | ─── | No active task |
131
- | Blink | ─ ─ | ─── | Animation frame |
132
-
133
- ## Data
134
-
135
- All data is stored in `~/.cace-timer.json`. Single JSON file, easy to backup and sync.
136
-
137
- ```json
138
- {
139
- "syncPath": "~/Dropbox/cace-timer.json",
140
- "current": null,
141
- "history": [
142
- {
143
- "id": "lq3x9k2",
144
- "task": "写周报",
145
- "start": "2024-03-02T10:00:00.000Z",
146
- "end": "2024-03-02T10:30:00.000Z",
147
- "tags": ["work"],
148
- "marks": [{ "time": "...", "note": "完成数据分析" }],
149
- "estimatedMinutes": 30
150
- }
151
- ]
152
- }
153
- ```
154
-
155
- ## Uninstall
156
-
157
- ```bash
158
- npm uninstall -g @cacinie/cace-timer
159
- ```
160
-
161
- ## Changelog
162
-
163
- ### v1.1.1
164
-
165
- - Added `prepare` script (fixes git-based installs)
166
- - Added `types` field for TypeScript consumers
167
- - Fixed efficiency score display when no estimate was set
168
- - Fixed efficiency score table mismatch in README
169
- - Fixed `--limit 0` falsy-zero bug
170
- - Fixed `--estimate` NaN handling
171
- - Added Super Happy mascot state and Windows sync paths to README
172
- - Added uninstall instructions and data format to README
173
-
174
- ### v1.1.0
175
-
176
- - Restructured repo layout (flat structure, no nested `timekeeper/`)
177
- - Fixed `.gitignore` (dist/ was not properly ignored)
178
- - Fixed CI workflow (was running in wrong directory)
179
- - Added Node 18/20/22 matrix in CI
180
- - Added `engines` field in package.json
181
-
182
- ### v1.0.0
183
-
184
- - Initial release
185
- - start / mark / stop / status / list / search / sync commands
186
- - CACE mascot animation
187
- - Efficiency scoring
188
- - Cloud sync support
189
-
190
- ## License
191
-
192
- MIT
1
+ # cace-timer
2
+
3
+ [![npm version](https://img.shields.io/npm/v/@cacinie/cace-timer.svg)](https://www.npmjs.com/package/@cacinie/cace-timer)
4
+ [![npm downloads](https://img.shields.io/npm/dm/@cacinie/cace-timer.svg)](https://www.npmjs.com/package/@cacinie/cace-timer)
5
+ [![Node.js](https://img.shields.io/badge/node-%3E%3D20-339933.svg)](package.json)
6
+ [![license](https://img.shields.io/npm/l/@cacinie/cace-timer.svg)](https://github.com/CacinieP/cace-timer/blob/main/LICENSE)
7
+
8
+ A gamified time-tracking CLI with an interactive TUI dashboard, points & levels, and a cute mascot.
9
+
10
+ ```
11
+ npm install -g @cacinie/cace-timer
12
+ ```
13
+
14
+ ```
15
+ ╭─╮ ╭─╮
16
+ ╰─╯ ╰─╯
17
+ ╭────────────╮
18
+ ╭┴────────────┴╮
19
+ │ ╭╮╭╮╭╮╭╮ │
20
+ │ ● ● │
21
+ │ ▽ │
22
+ │ ─── │
23
+ ╰──────┬┬──────╯
24
+ ││
25
+ ╭─────┴┴─────╮
26
+ ╭╯ ╔══════╗ ╰╮
27
+ o│ ║ CACE ║ │o
28
+ │ ╚══════╝ │
29
+ ╰────┬────┬────╯
30
+ │ │
31
+ │ │
32
+ │ │
33
+ ╭┴╮ ╭┴╮
34
+ ╰─╯ ╰─╯
35
+ CACE TIMER
36
+ ```
37
+
38
+ ## Features
39
+
40
+ - **Smart Dashboard** — run `tk` and get a context-aware interactive menu
41
+ - **Points & Levels** — earn points for focus, level up from Lv.1 to Lv.99
42
+ - **Daily Streaks** — consecutive days of productivity tracked with 🔥
43
+ - **Pomodoro Timer** — full-screen TUI countdown with mascot and progress bar
44
+ - **Quick Focus** — `tk focus 5/15/30/60` for instant timer
45
+ - **Reflection** record thoughts when completing tasks
46
+ - **Statistics** — daily/weekly/monthly reports with ASCII charts
47
+ - **Bilingual** — `--lang zh|en`, auto-detects system locale
48
+ - **Export** CSV or Markdown output
49
+ - **Cloud Sync** — point data file at Dropbox/iCloud/OneDrive
50
+
51
+ ## Quick Start
52
+
53
+ ```bash
54
+ # Open the interactive dashboard
55
+ tk
56
+
57
+ # Or use commands directly
58
+ tk start "写周报" --tag work --tag daily --estimate 30
59
+ tk mark "完成数据分析"
60
+ tk status
61
+ tk stop
62
+ ```
63
+
64
+ ## Smart Dashboard
65
+
66
+ Running `tk` with no arguments opens an interactive TUI dashboard:
67
+
68
+ **No active task:**
69
+ ```
70
+ [CACE mascot sleepy]
71
+ 📊 Lv.2 | 20 pts | 🔥 3 day streak
72
+
73
+ [s] 🚀 Start task
74
+ [f] 🍅 Quick focus
75
+ [b] 📊 Statistics
76
+ [l] 📋 History
77
+ [?] ❓ Help
78
+ ```
79
+
80
+ **Active task in progress:**
81
+ ```
82
+ [CACE mascot — focused]
83
+ 📊 Lv.2 | 20 pts
84
+
85
+ 🔥 In progress: 写周报 | Elapsed: 15m 30s
86
+
87
+ [m] 📍 Mark checkpoint
88
+ [s] ⏹ Stop task
89
+ [b] 📊 Statistics
90
+ [l] 📋 History
91
+ [?] Help
92
+ ```
93
+
94
+ ## Commands
95
+
96
+ ### `tk start <task> [options]`
97
+
98
+ Start a new task. Supports multiple tags.
99
+
100
+ | Option | Description |
101
+ |--------|-------------|
102
+ | `--tag <tag>` | Add tag(s). Repeatable: `--tag dev --tag api` or `--tag dev,api` |
103
+ | `--estimate <minutes>` | Estimated duration for efficiency scoring |
104
+
105
+ ### `tk stop [options]`
106
+
107
+ Stop current task. Shows summary, efficiency score, and points earned.
108
+
109
+ | Option | Description |
110
+ |--------|-------------|
111
+ | `--reflection <text>` | Attach a completion note |
112
+
113
+ In interactive terminals, a TUI input box appears for reflection.
114
+
115
+ ### `tk mark <note>`
116
+
117
+ Record a time checkpoint within the active task.
118
+
119
+ ### `tk status`
120
+
121
+ Show current task, level, and streak.
122
+
123
+ ### `tk list [options]`
124
+
125
+ | Option | Description |
126
+ |--------|-------------|
127
+ | `--today` | Today only |
128
+ | `--tag <tag>` | Filter by tag |
129
+ | `--limit <n>` | Limit count (default 10) |
130
+
131
+ ### `tk search <keyword>`
132
+
133
+ Search across task names, tags, and mark notes.
134
+
135
+ ### `tk summary [options]`
136
+
137
+ Statistics report with ASCII charts.
138
+
139
+ | Option | Description |
140
+ |--------|-------------|
141
+ | `--today` | Today only |
142
+ | `--week` | This week (Monday start) |
143
+ | `--month` | This month |
144
+ | `--tag <tag>` | Filter by tag |
145
+
146
+ Shows: total sessions, total/average duration, tag distribution bars, daily hours chart (last 7 days), top 5 longest tasks.
147
+
148
+ ### `tk delete <id | --last>`
149
+
150
+ Delete a session from history.
151
+
152
+ ### `tk resume <id | --last>`
153
+
154
+ Resume a completed task as a new session.
155
+
156
+ ### `tk export [options]`
157
+
158
+ | Option | Description |
159
+ |--------|-------------|
160
+ | `--format csv\|markdown` | Output format (default: csv) |
161
+ | `--output <file>` | Write to file (default: stdout) |
162
+
163
+ ### `tk pomodoro <task> [options]`
164
+
165
+ Full-screen TUI pomodoro timer with mascot, countdown, and encouragement.
166
+
167
+ | Option | Description |
168
+ |--------|-------------|
169
+ | `--work <minutes>` | Work duration (default: 25) |
170
+ | `--break <minutes>` | Break duration (default: 5) |
171
+ | `--rounds <n>` | Number of rounds (default: 4) |
172
+ | `--tag <tag>` | Add tag(s) |
173
+
174
+ ### `tk focus <5\|15\|30\|60> [task]`
175
+
176
+ Quick one-shot focus timer. Shortcut for `tk pomodoro` with 1 round.
177
+
178
+ ### `tk sync <path>`
179
+
180
+ Set sync file path for cross-device sync.
181
+
182
+ ### `--lang <zh|en>`
183
+
184
+ Set language. Auto-detects system locale. Persists to config.
185
+
186
+ ### `tk help`
187
+
188
+ Show full command reference.
189
+
190
+ ## Gamification
191
+
192
+ ### Points System
193
+
194
+ | Condition | Points |
195
+ |-----------|--------|
196
+ | Complete a task | +10 |
197
+ | Efficiency ≥ 80% | +5 bonus |
198
+ | Efficiency = 100% | +5 bonus |
199
+ | Deep work (≥ 25 min) | +5 bonus |
200
+
201
+ ### Levels
202
+
203
+ Progressive XP curve: each level requires `level × 20` more points.
204
+
205
+ | Level | Total Points |
206
+ |-------|-------------|
207
+ | 1 | 0 |
208
+ | 2 | 20 |
209
+ | 3 | 60 |
210
+ | 5 | 200 |
211
+ | 10 | 900 |
212
+
213
+ ### Daily Streak
214
+
215
+ Consecutive days with at least one completed task. Break a day and the streak resets.
216
+
217
+ ## CACE Mascot
218
+
219
+ CACE has 5 moods that change based on context:
220
+
221
+ | Mood | Eyes | Mouth | When |
222
+ |------|------|-------|------|
223
+ | Normal | ● ● | ─── | Default display |
224
+ | Happy | ★ ★ | ◡◡◡ | Task completed |
225
+ | Focused | ◆ ◆ | ▬▬▬ | Pomodoro / active task |
226
+ | Celebrating | ◉ ◉ | ▽△▽ | Points earned + arms up |
227
+ | Sleepy | ─ ─ | ~~ | No active task |
228
+
229
+ ## Data
230
+
231
+ All data stored in `~/.cace-timer.json`.
232
+
233
+ ```json
234
+ {
235
+ "syncPath": "~/Dropbox/cace-timer.json",
236
+ "lang": "zh",
237
+ "score": 45,
238
+ "streak": 3,
239
+ "lastActiveDate": "2026-05-31",
240
+ "current": null,
241
+ "history": [
242
+ {
243
+ "id": "lq3x9k2",
244
+ "task": "写周报",
245
+ "start": "2026-05-31T10:00:00.000Z",
246
+ "end": "2026-05-31T10:30:00.000Z",
247
+ "tags": ["work", "daily"],
248
+ "marks": [{ "time": "...", "note": "完成数据分析" }],
249
+ "estimatedMinutes": 30,
250
+ "reflection": "今天效率不错",
251
+ "pointsEarned": 20
252
+ }
253
+ ]
254
+ }
255
+ ```
256
+
257
+ ## Uninstall
258
+
259
+ ```bash
260
+ npm uninstall -g @cacinie/cace-timer
261
+ ```
262
+
263
+ ## Changelog
264
+
265
+ See [CHANGELOG.md](CHANGELOG.md) for release history.
266
+
267
+ ## License
268
+
269
+ MIT
270
+
271
+ ---
272
+
273
+ # cace-timer 中文说明
274
+
275
+ [![npm version](https://img.shields.io/npm/v/@cacinie/cace-timer.svg)](https://www.npmjs.com/package/@cacinie/cace-timer)
276
+ [![npm downloads](https://img.shields.io/npm/dm/@cacinie/cace-timer.svg)](https://www.npmjs.com/package/@cacinie/cace-timer)
277
+ [![Node.js](https://img.shields.io/badge/node-%3E%3D20-339933.svg)](package.json)
278
+ [![license](https://img.shields.io/npm/l/@cacinie/cace-timer.svg)](https://github.com/CacinieP/cace-timer/blob/main/LICENSE)
279
+
280
+ 游戏化时间追踪 CLI,带交互式 TUI 仪表盘、积分等级系统和可爱吉祥物。
281
+
282
+ ```
283
+ npm install -g @cacinie/cace-timer
284
+ ```
285
+
286
+ ## 特性
287
+
288
+ - **智能仪表盘** — 输入 `tk` 即可打开上下文感知的交互菜单
289
+ - **积分与等级** — 完成任务赚积分,从 Lv.1 升到 Lv.99
290
+ - **每日打卡** — 连续天数追踪,显示火焰 🔥
291
+ - **番茄钟** — 全屏 TUI 倒计时 + 吉祥物 + 进度条
292
+ - **快捷专注** — `tk focus 5/15/30/60` 一键开始
293
+ - **完成心得** — 任务完成时记录感想
294
+ - **统计报表** — 日/周/月统计,ASCII 柱状图
295
+ - **双语支持** — `--lang zh|en`,自动检测系统语言
296
+ - **数据导出** — CSV 或 Markdown 格式
297
+ - **云同步** — 数据文件指向 Dropbox/iCloud/OneDrive
298
+
299
+ ## 快速开始
300
+
301
+ ```bash
302
+ # 打开交互仪表盘
303
+ tk
304
+
305
+ # 或直接用命令
306
+ tk start "写周报" --tag work --tag daily --estimate 30
307
+ tk mark "完成数据分析"
308
+ tk status
309
+ tk stop
310
+ ```
311
+
312
+ ## 智能仪表盘
313
+
314
+ 输入 `tk`(无参数)打开 TUI 仪表盘:
315
+
316
+ **无活跃任务:**
317
+ ```
318
+ [CACE 吉祥物 — 困了]
319
+ 📊 Lv.2 | 20 积分 | 🔥 连续 3 天
320
+
321
+ [s] 🚀 开始任务
322
+ [f] 🍅 快捷专注
323
+ [b] 📊 统计报表
324
+ [l] 📋 历史记录
325
+ [?] ❓ 帮助
326
+ ```
327
+
328
+ **有活跃任务:**
329
+ ```
330
+ [CACE 吉祥物 — 专注中]
331
+ 📊 Lv.2 | 20 积分
332
+
333
+ 🔥 进行中: 写周报 | 已用时: 15m 30s
334
+
335
+ [m] 📍 标记进度
336
+ [s] ⏹ 停止任务
337
+ [b] 📊 统计报表
338
+ [l] 📋 历史记录
339
+ [?] ❓ 帮助
340
+ ```
341
+
342
+ ## 命令
343
+
344
+ ### `tk start <任务名> [选项]`
345
+
346
+ 开始新任务,支持多标签。
347
+
348
+ | 选项 | 说明 |
349
+ |------|------|
350
+ | `--tag <标签>` | 多标签:`--tag dev --tag api` 或 `--tag dev,api` |
351
+ | `--estimate <分钟>` | 预估时长(效率评分) |
352
+
353
+ ### `tk stop [选项]`
354
+
355
+ 停止当前任务,显示摘要、效率评分、获得积分。
356
+
357
+ | 选项 | 说明 |
358
+ |------|------|
359
+ | `--reflection <文本>` | 附加完成心得 |
360
+
361
+ 交互终端中会自动弹出输入框。
362
+
363
+ ### `tk mark <备注>`
364
+
365
+ 在活跃任务中记录时间节点。
366
+
367
+ ### `tk status`
368
+
369
+ 显示当前任务、等级和打卡天数。
370
+
371
+ ### `tk list [选项]`
372
+
373
+ | 选项 | 说明 |
374
+ |------|------|
375
+ | `--today` | 仅今天 |
376
+ | `--tag <标签>` | 按标签筛选 |
377
+ | `--limit <数量>` | 限制数量(默认 10) |
378
+
379
+ ### `tk search <关键词>`
380
+
381
+ 搜索任务名称、标签和标记备注。
382
+
383
+ ### `tk summary [选项]`
384
+
385
+ 统计报表,带 ASCII 柱状图。
386
+
387
+ | 选项 | 说明 |
388
+ |------|------|
389
+ | `--today` | 仅今天 |
390
+ | `--week` | 本周(周一开始) |
391
+ | `--month` | 本月 |
392
+ | `--tag <标签>` | 按标签筛选 |
393
+
394
+ ### `tk delete <id | --last>`
395
+
396
+ 删除历史记录。
397
+
398
+ ### `tk resume <id | --last>`
399
+
400
+ 恢复已完成任务为新会话。
401
+
402
+ ### `tk export [选项]`
403
+
404
+ | 选项 | 说明 |
405
+ |------|------|
406
+ | `--format csv\|markdown` | 输出格式(默认 csv) |
407
+ | `--output <文件>` | 输出到文件(默认 stdout) |
408
+
409
+ ### `tk pomodoro <任务名> [选项]`
410
+
411
+ 全屏 TUI 番茄钟,带吉祥物、倒计时和鼓励语。
412
+
413
+ | 选项 | 说明 |
414
+ |------|------|
415
+ | `--work <分钟>` | 工作时长(默认 25) |
416
+ | `--break <分钟>` | 休息时长(默认 5) |
417
+ | `--rounds <数量>` | 轮数(默认 4) |
418
+ | `--tag <标签>` | 添加标签 |
419
+
420
+ ### `tk focus <5\|15\|30\|60> [任务名]`
421
+
422
+ 快捷专注,一键启动单轮番茄钟。
423
+
424
+ ### `tk sync <路径>`
425
+
426
+ 设置同步文件路径。
427
+
428
+ ### `--lang <zh|en>`
429
+
430
+ 设置语言,自动检测系统语言,持久化到配置。
431
+
432
+ ### `tk help`
433
+
434
+ 显示完整命令参考。
435
+
436
+ ## 游戏化
437
+
438
+ ### 积分系统
439
+
440
+ | 条件 | 积分 |
441
+ |------|------|
442
+ | 完成任务 | +10 |
443
+ | 效率 ≥ 80% | +5 奖励 |
444
+ | 效率 = 100% | +5 奖励 |
445
+ | 深度工作(≥ 25 分钟) | +5 奖励 |
446
+
447
+ ### 等级系统
448
+
449
+ 递增经验曲线:每级需要 `等级 × 20` 积分。
450
+
451
+ | 等级 | 总积分 |
452
+ |------|--------|
453
+ | 1 | 0 |
454
+ | 2 | 20 |
455
+ | 3 | 60 |
456
+ | 5 | 200 |
457
+ | 10 | 900 |
458
+
459
+ ### 每日打卡
460
+
461
+ 连续每天完成至少一个任务。中断一天则重新计数。
462
+
463
+ ## CACE 吉祥物
464
+
465
+ CACE 有 5 种心情,根据场景变化:
466
+
467
+ | 心情 | 眼睛 | 嘴巴 | 时机 |
468
+ |------|------|------|------|
469
+ | 正常 | ● ● | ─── | 默认显示 |
470
+ | 开心 | ★ ★ | ◡◡◡ | 任务完成 |
471
+ | 专注 | ◆ ◆ | ▬▬▬ | 番茄钟 / 活跃任务 |
472
+ | 庆祝 | ◉ ◉ | ▽△▽ | 获得积分 + 举手 |
473
+ | 困了 | ─ ─ | ~~ | 无活跃任务 |
474
+
475
+ ## 数据
476
+
477
+ 所有数据存储在 `~/.cace-timer.json`。
478
+
479
+ ## 卸载
480
+
481
+ ```bash
482
+ npm uninstall -g @cacinie/cace-timer
483
+ ```
484
+
485
+ ## 更新日志
486
+
487
+ 详见 [CHANGELOG.md](CHANGELOG.md)。
488
+
489
+ ## 许可
490
+
491
+ MIT
@@ -0,0 +1,4 @@
1
+ export declare function cmdDelete(options: {
2
+ id?: string;
3
+ last?: boolean;
4
+ }): void;