@nickchristensen/cliftin 1.0.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 (49) hide show
  1. package/README.md +206 -0
  2. package/bin/dev.cmd +3 -0
  3. package/bin/dev.js +5 -0
  4. package/bin/run.cmd +3 -0
  5. package/bin/run.js +5 -0
  6. package/dist/commands/exercises/list.d.ts +13 -0
  7. package/dist/commands/exercises/list.js +54 -0
  8. package/dist/commands/exercises/show.d.ts +21 -0
  9. package/dist/commands/exercises/show.js +140 -0
  10. package/dist/commands/programs/list.d.ts +6 -0
  11. package/dist/commands/programs/list.js +27 -0
  12. package/dist/commands/programs/show.d.ts +13 -0
  13. package/dist/commands/programs/show.js +71 -0
  14. package/dist/commands/workouts/list.d.ts +15 -0
  15. package/dist/commands/workouts/list.js +72 -0
  16. package/dist/commands/workouts/show.d.ts +9 -0
  17. package/dist/commands/workouts/show.js +72 -0
  18. package/dist/index.d.ts +1 -0
  19. package/dist/index.js +1 -0
  20. package/dist/lib/config.d.ts +1 -0
  21. package/dist/lib/config.js +24 -0
  22. package/dist/lib/db.d.ts +104 -0
  23. package/dist/lib/db.js +15 -0
  24. package/dist/lib/json-error.d.ts +5 -0
  25. package/dist/lib/json-error.js +6 -0
  26. package/dist/lib/json-weight.d.ts +7 -0
  27. package/dist/lib/json-weight.js +42 -0
  28. package/dist/lib/names.d.ts +5 -0
  29. package/dist/lib/names.js +70 -0
  30. package/dist/lib/output.d.ts +7 -0
  31. package/dist/lib/output.js +73 -0
  32. package/dist/lib/repositories/exercises.d.ts +30 -0
  33. package/dist/lib/repositories/exercises.js +280 -0
  34. package/dist/lib/repositories/programs.d.ts +6 -0
  35. package/dist/lib/repositories/programs.js +217 -0
  36. package/dist/lib/repositories/selectors.d.ts +3 -0
  37. package/dist/lib/repositories/selectors.js +35 -0
  38. package/dist/lib/repositories/workouts.d.ts +13 -0
  39. package/dist/lib/repositories/workouts.js +128 -0
  40. package/dist/lib/rpe.d.ts +2 -0
  41. package/dist/lib/rpe.js +4 -0
  42. package/dist/lib/time.d.ts +10 -0
  43. package/dist/lib/time.js +49 -0
  44. package/dist/lib/types.d.ts +123 -0
  45. package/dist/lib/types.js +1 -0
  46. package/dist/lib/units.d.ts +16 -0
  47. package/dist/lib/units.js +81 -0
  48. package/oclif.manifest.json +386 -0
  49. package/package.json +93 -0
@@ -0,0 +1,386 @@
1
+ {
2
+ "commands": {
3
+ "exercises:list": {
4
+ "aliases": [],
5
+ "args": {},
6
+ "description": "List exercises",
7
+ "flags": {
8
+ "json": {
9
+ "description": "Format output as json.",
10
+ "helpGroup": "GLOBAL",
11
+ "name": "json",
12
+ "allowNo": false,
13
+ "type": "boolean"
14
+ },
15
+ "equipment": {
16
+ "description": "Filter by equipment name",
17
+ "name": "equipment",
18
+ "hasDynamicHelp": false,
19
+ "multiple": false,
20
+ "type": "option"
21
+ },
22
+ "muscle": {
23
+ "description": "Filter by muscle group",
24
+ "name": "muscle",
25
+ "hasDynamicHelp": false,
26
+ "multiple": false,
27
+ "type": "option"
28
+ },
29
+ "name": {
30
+ "description": "Filter by name contains",
31
+ "name": "name",
32
+ "hasDynamicHelp": false,
33
+ "multiple": false,
34
+ "type": "option"
35
+ },
36
+ "sort": {
37
+ "name": "sort",
38
+ "default": "name",
39
+ "hasDynamicHelp": false,
40
+ "multiple": false,
41
+ "options": [
42
+ "name",
43
+ "lastPerformed",
44
+ "timesPerformed"
45
+ ],
46
+ "type": "option"
47
+ }
48
+ },
49
+ "hasDynamicHelp": false,
50
+ "hiddenAliases": [],
51
+ "id": "exercises:list",
52
+ "pluginAlias": "@nickchristensen/cliftin",
53
+ "pluginName": "@nickchristensen/cliftin",
54
+ "pluginType": "core",
55
+ "strict": true,
56
+ "enableJsonFlag": true,
57
+ "sortOptions": [
58
+ "name",
59
+ "lastPerformed",
60
+ "timesPerformed"
61
+ ],
62
+ "isESM": true,
63
+ "relativePath": [
64
+ "dist",
65
+ "commands",
66
+ "exercises",
67
+ "list.js"
68
+ ]
69
+ },
70
+ "exercises:show": {
71
+ "aliases": [],
72
+ "args": {
73
+ "selector": {
74
+ "description": "exercise id or name",
75
+ "name": "selector",
76
+ "required": true
77
+ }
78
+ },
79
+ "description": "Show one exercise detail and history",
80
+ "flags": {
81
+ "json": {
82
+ "description": "Format output as json.",
83
+ "helpGroup": "GLOBAL",
84
+ "name": "json",
85
+ "allowNo": false,
86
+ "type": "boolean"
87
+ },
88
+ "all": {
89
+ "description": "Return all matching history rows (no limit)",
90
+ "exclusive": [
91
+ "limit"
92
+ ],
93
+ "name": "all",
94
+ "allowNo": false,
95
+ "type": "boolean"
96
+ },
97
+ "from": {
98
+ "description": "History start date YYYY-MM-DD",
99
+ "name": "from",
100
+ "hasDynamicHelp": false,
101
+ "multiple": false,
102
+ "type": "option"
103
+ },
104
+ "limit": {
105
+ "description": "History row limit (default: 100)",
106
+ "exclusive": [
107
+ "all"
108
+ ],
109
+ "name": "limit",
110
+ "hasDynamicHelp": false,
111
+ "multiple": false,
112
+ "type": "option"
113
+ },
114
+ "max-reps": {
115
+ "description": "History max top reps",
116
+ "name": "max-reps",
117
+ "hasDynamicHelp": false,
118
+ "multiple": false,
119
+ "type": "option"
120
+ },
121
+ "max-weight": {
122
+ "description": "History max top weight",
123
+ "name": "max-weight",
124
+ "hasDynamicHelp": false,
125
+ "multiple": false,
126
+ "type": "option"
127
+ },
128
+ "min-reps": {
129
+ "description": "History min top reps",
130
+ "name": "min-reps",
131
+ "hasDynamicHelp": false,
132
+ "multiple": false,
133
+ "type": "option"
134
+ },
135
+ "min-weight": {
136
+ "description": "History min top weight",
137
+ "name": "min-weight",
138
+ "hasDynamicHelp": false,
139
+ "multiple": false,
140
+ "type": "option"
141
+ },
142
+ "program": {
143
+ "description": "History filter by program id or name",
144
+ "name": "program",
145
+ "hasDynamicHelp": false,
146
+ "multiple": false,
147
+ "type": "option"
148
+ },
149
+ "routine": {
150
+ "description": "History filter by routine id or name",
151
+ "name": "routine",
152
+ "hasDynamicHelp": false,
153
+ "multiple": false,
154
+ "type": "option"
155
+ },
156
+ "to": {
157
+ "description": "History end date YYYY-MM-DD",
158
+ "name": "to",
159
+ "hasDynamicHelp": false,
160
+ "multiple": false,
161
+ "type": "option"
162
+ }
163
+ },
164
+ "hasDynamicHelp": false,
165
+ "hiddenAliases": [],
166
+ "id": "exercises:show",
167
+ "pluginAlias": "@nickchristensen/cliftin",
168
+ "pluginName": "@nickchristensen/cliftin",
169
+ "pluginType": "core",
170
+ "strict": true,
171
+ "enableJsonFlag": true,
172
+ "isESM": true,
173
+ "relativePath": [
174
+ "dist",
175
+ "commands",
176
+ "exercises",
177
+ "show.js"
178
+ ]
179
+ },
180
+ "programs:list": {
181
+ "aliases": [],
182
+ "args": {},
183
+ "description": "List programs",
184
+ "flags": {
185
+ "json": {
186
+ "description": "Format output as json.",
187
+ "helpGroup": "GLOBAL",
188
+ "name": "json",
189
+ "allowNo": false,
190
+ "type": "boolean"
191
+ }
192
+ },
193
+ "hasDynamicHelp": false,
194
+ "hiddenAliases": [],
195
+ "id": "programs:list",
196
+ "pluginAlias": "@nickchristensen/cliftin",
197
+ "pluginName": "@nickchristensen/cliftin",
198
+ "pluginType": "core",
199
+ "strict": true,
200
+ "enableJsonFlag": true,
201
+ "isESM": true,
202
+ "relativePath": [
203
+ "dist",
204
+ "commands",
205
+ "programs",
206
+ "list.js"
207
+ ]
208
+ },
209
+ "programs:show": {
210
+ "aliases": [],
211
+ "args": {
212
+ "selector": {
213
+ "description": "program id or name",
214
+ "name": "selector",
215
+ "required": false
216
+ }
217
+ },
218
+ "description": "Show one program hierarchy",
219
+ "flags": {
220
+ "json": {
221
+ "description": "Format output as json.",
222
+ "helpGroup": "GLOBAL",
223
+ "name": "json",
224
+ "allowNo": false,
225
+ "type": "boolean"
226
+ },
227
+ "active": {
228
+ "description": "Show active program detail",
229
+ "name": "active",
230
+ "allowNo": false,
231
+ "type": "boolean"
232
+ },
233
+ "current": {
234
+ "description": "Alias for --active",
235
+ "name": "current",
236
+ "allowNo": false,
237
+ "type": "boolean"
238
+ }
239
+ },
240
+ "hasDynamicHelp": false,
241
+ "hiddenAliases": [],
242
+ "id": "programs:show",
243
+ "pluginAlias": "@nickchristensen/cliftin",
244
+ "pluginName": "@nickchristensen/cliftin",
245
+ "pluginType": "core",
246
+ "strict": true,
247
+ "enableJsonFlag": true,
248
+ "isESM": true,
249
+ "relativePath": [
250
+ "dist",
251
+ "commands",
252
+ "programs",
253
+ "show.js"
254
+ ]
255
+ },
256
+ "workouts:list": {
257
+ "aliases": [],
258
+ "args": {},
259
+ "description": "List workouts",
260
+ "flags": {
261
+ "json": {
262
+ "description": "Format output as json.",
263
+ "helpGroup": "GLOBAL",
264
+ "name": "json",
265
+ "allowNo": false,
266
+ "type": "boolean"
267
+ },
268
+ "limit": {
269
+ "description": "Limit workouts (default: 25)",
270
+ "exclusive": [
271
+ "all"
272
+ ],
273
+ "name": "limit",
274
+ "hasDynamicHelp": false,
275
+ "multiple": false,
276
+ "type": "option"
277
+ },
278
+ "all": {
279
+ "description": "Return all matching workouts (no limit)",
280
+ "exclusive": [
281
+ "limit"
282
+ ],
283
+ "name": "all",
284
+ "allowNo": false,
285
+ "type": "boolean"
286
+ },
287
+ "on": {
288
+ "description": "Single date YYYY-MM-DD",
289
+ "exclusive": [
290
+ "from",
291
+ "to"
292
+ ],
293
+ "name": "on",
294
+ "hasDynamicHelp": false,
295
+ "multiple": false,
296
+ "type": "option"
297
+ },
298
+ "from": {
299
+ "description": "Start date YYYY-MM-DD",
300
+ "exclusive": [
301
+ "on"
302
+ ],
303
+ "name": "from",
304
+ "hasDynamicHelp": false,
305
+ "multiple": false,
306
+ "type": "option"
307
+ },
308
+ "to": {
309
+ "description": "End date YYYY-MM-DD",
310
+ "exclusive": [
311
+ "on"
312
+ ],
313
+ "name": "to",
314
+ "hasDynamicHelp": false,
315
+ "multiple": false,
316
+ "type": "option"
317
+ },
318
+ "program": {
319
+ "description": "Filter by program id or name",
320
+ "name": "program",
321
+ "hasDynamicHelp": false,
322
+ "multiple": false,
323
+ "type": "option"
324
+ },
325
+ "routine": {
326
+ "description": "Filter by routine id or name",
327
+ "name": "routine",
328
+ "hasDynamicHelp": false,
329
+ "multiple": false,
330
+ "type": "option"
331
+ }
332
+ },
333
+ "hasDynamicHelp": false,
334
+ "hiddenAliases": [],
335
+ "id": "workouts:list",
336
+ "pluginAlias": "@nickchristensen/cliftin",
337
+ "pluginName": "@nickchristensen/cliftin",
338
+ "pluginType": "core",
339
+ "strict": true,
340
+ "enableJsonFlag": true,
341
+ "isESM": true,
342
+ "relativePath": [
343
+ "dist",
344
+ "commands",
345
+ "workouts",
346
+ "list.js"
347
+ ]
348
+ },
349
+ "workouts:show": {
350
+ "aliases": [],
351
+ "args": {
352
+ "workoutId": {
353
+ "description": "workout id",
354
+ "name": "workoutId",
355
+ "required": true
356
+ }
357
+ },
358
+ "description": "Show one workout with exercises and sets",
359
+ "flags": {
360
+ "json": {
361
+ "description": "Format output as json.",
362
+ "helpGroup": "GLOBAL",
363
+ "name": "json",
364
+ "allowNo": false,
365
+ "type": "boolean"
366
+ }
367
+ },
368
+ "hasDynamicHelp": false,
369
+ "hiddenAliases": [],
370
+ "id": "workouts:show",
371
+ "pluginAlias": "@nickchristensen/cliftin",
372
+ "pluginName": "@nickchristensen/cliftin",
373
+ "pluginType": "core",
374
+ "strict": true,
375
+ "enableJsonFlag": true,
376
+ "isESM": true,
377
+ "relativePath": [
378
+ "dist",
379
+ "commands",
380
+ "workouts",
381
+ "show.js"
382
+ ]
383
+ }
384
+ },
385
+ "version": "1.0.2"
386
+ }
package/package.json ADDED
@@ -0,0 +1,93 @@
1
+ {
2
+ "name": "@nickchristensen/cliftin",
3
+ "description": "CLIftin: A read-only CLI for Liftin'",
4
+ "version": "1.0.2",
5
+ "author": "Nick Christensen",
6
+ "bin": {
7
+ "cliftin": "./bin/run.js"
8
+ },
9
+ "bugs": "https://github.com/nickchristensen/cliftin/issues",
10
+ "dependencies": {
11
+ "@oclif/core": "^4",
12
+ "@oclif/plugin-help": "^6",
13
+ "better-sqlite3": "^12.6.2",
14
+ "date-fns": "^4.1.0",
15
+ "dotenv": "^17.2.4",
16
+ "kysely": "^0.28.11",
17
+ "tty-table": "^5.0.0"
18
+ },
19
+ "devDependencies": {
20
+ "@eslint/compat": "^1",
21
+ "@oclif/prettier-config": "^0.2.1",
22
+ "@oclif/test": "^4",
23
+ "@types/better-sqlite3": "^7.6.13",
24
+ "@types/chai": "^4",
25
+ "@types/mocha": "^10",
26
+ "@types/node": "^24.10.13",
27
+ "chai": "^4",
28
+ "eslint": "^9",
29
+ "eslint-config-oclif": "^6",
30
+ "eslint-config-prettier": "^10",
31
+ "mocha": "^10",
32
+ "oclif": "^4",
33
+ "shx": "^0.3.3",
34
+ "simple-git-hooks": "^2.13.1",
35
+ "ts-node": "^10",
36
+ "typescript": "^5"
37
+ },
38
+ "engines": {
39
+ "node": ">=24.0.0"
40
+ },
41
+ "files": [
42
+ "./bin",
43
+ "./dist",
44
+ "./oclif.manifest.json"
45
+ ],
46
+ "homepage": "https://github.com/nickchristensen/cliftin",
47
+ "keywords": [
48
+ "oclif"
49
+ ],
50
+ "license": "MIT",
51
+ "main": "dist/index.js",
52
+ "type": "module",
53
+ "oclif": {
54
+ "bin": "cliftin",
55
+ "dirname": "cliftin",
56
+ "helpOptions": {
57
+ "flagSortOrder": "none"
58
+ },
59
+ "commands": "./dist/commands",
60
+ "plugins": [
61
+ "@oclif/plugin-help"
62
+ ],
63
+ "topicSeparator": " ",
64
+ "topics": {
65
+ "exercises": {
66
+ "description": "Exercise catalog and performance"
67
+ },
68
+ "programs": {
69
+ "description": "Program hierarchy and planning"
70
+ },
71
+ "workouts": {
72
+ "description": "Workout history and detail"
73
+ }
74
+ }
75
+ },
76
+ "repository": "nickchristensen/cliftin",
77
+ "scripts": {
78
+ "build": "shx rm -rf dist && tsc -b",
79
+ "db:sync": "cp /Users/nick/Library/Containers/com.nstrm.Bello/Data/Library/Application\\ Support/Liftin/BelloDataModel.* ./data",
80
+ "lint": "eslint",
81
+ "postpack": "shx rm -f oclif.manifest.json",
82
+ "posttest": "npm run lint",
83
+ "prepack": "npm run build && oclif manifest && oclif readme",
84
+ "prepare": "simple-git-hooks",
85
+ "test": "mocha --forbid-only \"test/**/*.test.ts\"",
86
+ "version": "oclif readme && git add README.md"
87
+ },
88
+ "simple-git-hooks": {
89
+ "pre-commit": "npm run build && npx oclif readme && git add README.md",
90
+ "pre-push": "npm run build && npm test"
91
+ },
92
+ "types": "dist/index.d.ts"
93
+ }