kahunas-cli 1.0.4 → 1.0.6
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 +27 -4
- package/dist/cli.js +1364 -87
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -63,7 +63,9 @@ Tokens are saved to:
|
|
|
63
63
|
- `kahunas workout latest`
|
|
64
64
|
- Loads the most recently updated program.
|
|
65
65
|
- `kahunas workout events`
|
|
66
|
-
- Lists workout log events with dates (from the calendar endpoint).
|
|
66
|
+
- Lists workout log events with dates and a human-friendly workout summary (from the calendar endpoint).
|
|
67
|
+
- `kahunas workout serve`
|
|
68
|
+
- Starts a local dev server with a workout preview page and a JSON endpoint that matches the CLI output.
|
|
67
69
|
- `kahunas workout program <id>`
|
|
68
70
|
- Fetches a program by UUID.
|
|
69
71
|
|
|
@@ -84,7 +86,7 @@ Raw output (`--raw`) prints the API response only.
|
|
|
84
86
|
|
|
85
87
|
### Workout events (dates)
|
|
86
88
|
|
|
87
|
-
To see when workouts happened, the calendar endpoint returns log events with timestamps. By default each event is
|
|
89
|
+
To see when workouts happened, the calendar endpoint returns log events with timestamps. By default each event is summarized into a human-friendly structure (total volume sets, exercises, supersets). Use `--full` to return the full program payload (best effort; falls back to cached summary if needed).
|
|
88
90
|
|
|
89
91
|
```bash
|
|
90
92
|
pnpm kahunas -- workout events --user <user-uuid>
|
|
@@ -105,13 +107,34 @@ pnpm kahunas -- workout events --program <program-uuid>
|
|
|
105
107
|
pnpm kahunas -- workout events --workout <workout-uuid>
|
|
106
108
|
```
|
|
107
109
|
|
|
108
|
-
Use `--minimal` to return the raw event objects without program enrichment.
|
|
110
|
+
Use `--minimal` to return the raw event objects without program enrichment. Use `--full` to return the full enriched output. Use `--latest` for only the most recent event, or `--limit N` for the most recent N events. Use `--debug-preview` to log where preview HTML was discovered (stderr only).
|
|
109
111
|
|
|
110
|
-
|
|
112
|
+
If the user UUID is missing, `workout events` will attempt to discover it from check-ins and save it. You can also set it directly:
|
|
111
113
|
|
|
112
114
|
- `KAHUNAS_USER_UUID=...`
|
|
113
115
|
- `--user <uuid>`
|
|
114
116
|
|
|
117
|
+
### Workout preview server
|
|
118
|
+
|
|
119
|
+
Run a local dev server to preview workouts in a browser:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
pnpm kahunas -- workout serve
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
The HTML page is available at `http://127.0.0.1:3000` and the JSON endpoint is at `http://127.0.0.1:3000/api/workout`.
|
|
126
|
+
The JSON response matches the CLI output for `workout events --latest`, so there is only one data shape to maintain.
|
|
127
|
+
|
|
128
|
+
Options:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
pnpm kahunas -- workout serve --program <program-uuid>
|
|
132
|
+
pnpm kahunas -- workout serve --workout <workout-uuid>
|
|
133
|
+
pnpm kahunas -- workout serve --limit 3
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Use `?day=<index>` to switch the selected workout day tab in the browser.
|
|
137
|
+
|
|
115
138
|
## Auto-login
|
|
116
139
|
|
|
117
140
|
Most commands auto-login by default if a token is missing or expired. To disable:
|