@betterness/cli 1.0.0 → 1.0.1

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 (3) hide show
  1. package/CLI_REFERENCE.md +493 -0
  2. package/README.md +198 -0
  3. package/package.json +4 -2
@@ -0,0 +1,493 @@
1
+ # Betterness CLI Reference
2
+
3
+ > Auto-generated from command definitions — do not edit manually.
4
+ > Run `npm run docs` in `modules/betterness-cli` to regenerate.
5
+
6
+ Version: 0.1.0
7
+
8
+ ## Global Options
9
+
10
+ These options apply to all commands:
11
+
12
+ | Option | Description |
13
+ |--------|-------------|
14
+ | `-V, --version` | output the version number |
15
+ | `--api-key <key>` | API key (overrides env and stored credentials) |
16
+ | `--json` | Output as JSON |
17
+ | `--markdown` | Output as Markdown |
18
+ | `--quiet` | Suppress output (exit code only) |
19
+
20
+ ## Commands
21
+
22
+ - **[auth](#auth)** — Manage authentication
23
+ - `auth login` — Save API key for authentication
24
+ - `auth logout` — Remove stored credentials
25
+ - `auth whoami` — Show the currently authenticated user
26
+ - **[profile](#profile)** — User profile information
27
+ - `profile get` — Retrieve current user profile (name, email, phone, gender, DOB, address)
28
+ - `profile update` — Update profile information (only provided fields are changed)
29
+ - **[biomarkers](#biomarkers)** — Biomarker lab results and LOINC codes
30
+ - `biomarkers search` — Search and filter biomarker lab results
31
+ - `biomarkers loinc-codes` — List all available LOINC codes for biomarker identification
32
+ - **[biological-age](#biological-age)** — Biological age calculations and history
33
+ - `biological-age get` — Get biological age history with biomarker values
34
+ - **[activity](#activity)** — Activity and workout data from connected wearables
35
+ - `activity get` — Retrieve activity and workout data (steps, distance, calories, VO2 max, workouts)
36
+ - **[sleep](#sleep)** — Sleep data from connected wearables
37
+ - `sleep get` — Retrieve nightly sleep data (time in bed, total sleep, sleep stage breakdown)
38
+ - `sleep stages` — Retrieve minute-by-minute sleep stage transitions (Deep, Core, REM, Awake)
39
+ - **[vitals](#vitals)** — Vital signs from connected wearables
40
+ - `vitals get` — Retrieve vital signs (heart rate, HRV, blood pressure, SpO2, glucose, respiratory rate)
41
+ - **[body-composition](#body-composition)** — Body composition data from connected wearables
42
+ - `body-composition get` — Retrieve body composition (weight, body fat %, muscle mass, BMI, waist circumference)
43
+ - **[connected-devices](#connected-devices)** — Health device integrations and wearable connections
44
+ - `connected-devices list` — List all connected health devices and wearables
45
+ - `connected-devices available` — List health device integrations the user can connect (not currently active)
46
+ - `connected-devices link` — Generate connection link for a web-based health device integration
47
+ - `connected-devices apple-health-code` — Generate connection code for Apple HealthKit via Junction app
48
+ - `connected-devices disconnect` — Disconnect a health device integration
49
+ - **[lab-tests](#lab-tests)** — Available lab tests for ordering
50
+ - `lab-tests list` — List available lab tests with prices and included markers
51
+ - **[lab-records](#lab-records)** — Lab records — uploaded results and purchased test orders
52
+ - `lab-records list` — List lab records (both uploaded results and lab orders)
53
+ - `lab-records detail` — Get full detail of a lab record by external ID
54
+ - **[lab-orders](#lab-orders)** — Lab order management — scheduling, appointments, and service centers
55
+ - `lab-orders initialize` — Initialize a lab order for processing (order must be in Paid status)
56
+ - `lab-orders service-centers` — Search lab service centers near a ZIP code
57
+ - `lab-orders slots` — Get available appointment time slots at a service center
58
+ - `lab-orders book` — Book a blood draw appointment at a service center
59
+ - `lab-orders reschedule` — Reschedule an existing blood draw appointment
60
+ - `lab-orders cancel` — Cancel a blood draw appointment (run without --reason-id to see available reasons)
61
+ - **[lab-results](#lab-results)** — Lab result management — approve, update biomarkers, update metadata
62
+ - `lab-results update-status` — Update lab result status (APPROVE, ROLLBACK, or REPROCESS)
63
+ - `lab-results update-biomarker` — Update or delete a biomarker value within an uploaded lab result
64
+ - `lab-results update-metadata` — Update metadata of an uploaded lab result (patient info and test details)
65
+ - `lab-results upload` — Upload a lab result PDF for processing
66
+ - **[purchases](#purchases)** — Lab test purchases and payment methods
67
+ - `purchases payment-methods` — List saved payment methods (credit/debit cards)
68
+ - `purchases buy` — Purchase a lab test using a saved payment method
69
+ - `purchases checkout` — Generate a Stripe Checkout payment link for a lab test (for users without saved cards)
70
+ - **[smart-listings](#smart-listings)** — Search and browse wellness providers (SmartListings)
71
+ - `smart-listings search` — Search SmartListings by name, description, tags, or location
72
+ - `smart-listings detail` — Get full details of a SmartListing by ID
73
+ - **[workflow](#workflow)** — Composite commands that aggregate data from multiple endpoints
74
+ - `workflow daily-brief` — Daily health summary — profile, biological age, biomarkers, devices
75
+ - `workflow next-actions` — Recommended next actions based on biomarkers and health data
76
+ - **[schema](#schema)** — Discover available commands, options, and response formats
77
+
78
+ ---
79
+
80
+ ## auth
81
+
82
+ Manage authentication
83
+
84
+ ### `betterness auth login`
85
+
86
+ Save API key for authentication
87
+
88
+ | Option | Description |
89
+ |--------|-------------|
90
+ | `--key <apiKey>` | API key to save (if not provided, will prompt) |
91
+
92
+ ### `betterness auth logout`
93
+
94
+ Remove stored credentials
95
+
96
+ ### `betterness auth whoami`
97
+
98
+ Show the currently authenticated user
99
+
100
+ ## profile
101
+
102
+ User profile information
103
+
104
+ ### `betterness profile get`
105
+
106
+ Retrieve current user profile (name, email, phone, gender, DOB, address)
107
+
108
+ ### `betterness profile update`
109
+
110
+ Update profile information (only provided fields are changed)
111
+
112
+ | Option | Description |
113
+ |--------|-------------|
114
+ | `--first-name <name>` | First name |
115
+ | `--last-name <name>` | Last name |
116
+ | `--phone <number>` | Phone number without dial code |
117
+ | `--phone-dial-code <code>` | Phone dial code (e.g. +1, +44) |
118
+ | `--gender <value>` | Gender: MALE, FEMALE, OTHER, or PREF_NOT |
119
+ | `--birth-date <YYYY-MM-DD>` | Date of birth |
120
+ | `--address <street>` | Home street address |
121
+ | `--city <city>` | City |
122
+ | `--state <state>` | State or province |
123
+ | `--zip-code <zip>` | ZIP or postal code |
124
+ | `--country <code>` | Country (e.g. US, GB) |
125
+ | `--dry-run` | Preview changes without applying |
126
+
127
+ ## biomarkers
128
+
129
+ Biomarker lab results and LOINC codes
130
+
131
+ ### `betterness biomarkers search`
132
+
133
+ Search and filter biomarker lab results
134
+
135
+ | Option | Description |
136
+ |--------|-------------|
137
+ | `--name <text>` | Filter by biomarker name |
138
+ | `--loinc-code <code>` | Filter by LOINC code |
139
+ | `--start-date <YYYY-MM-DD>` | Start date (ISO-8601) |
140
+ | `--end-date <YYYY-MM-DD>` | End date (ISO-8601) |
141
+ | `--categories <list>` | Comma-separated category filter |
142
+ | `--range <type>` | Range filter: OPTIMAL, AVERAGE, OUT_OF_RANGE, UNKNOWN |
143
+ | `--limit <n>` | Maximum number of results (default: `20`) |
144
+
145
+ ### `betterness biomarkers loinc-codes`
146
+
147
+ List all available LOINC codes for biomarker identification
148
+
149
+ ## biological-age
150
+
151
+ Biological age calculations and history
152
+
153
+ ### `betterness biological-age get`
154
+
155
+ Get biological age history with biomarker values
156
+
157
+ | Option | Description |
158
+ |--------|-------------|
159
+ | `--limit <n>` | Maximum number of results (default: `10`) |
160
+
161
+ ## activity
162
+
163
+ Activity and workout data from connected wearables
164
+
165
+ ### `betterness activity get`
166
+
167
+ Retrieve activity and workout data (steps, distance, calories, VO2 max, workouts)
168
+
169
+ | Option | Description |
170
+ |--------|-------------|
171
+ | `--from <YYYY-MM-DD>` | Start date (default: `2026-03-13`) |
172
+ | `--to <YYYY-MM-DD>` | End date |
173
+ | `--timezone <tz>` | IANA timezone (default: `America/Mendoza`) |
174
+
175
+ ## sleep
176
+
177
+ Sleep data from connected wearables
178
+
179
+ ### `betterness sleep get`
180
+
181
+ Retrieve nightly sleep data (time in bed, total sleep, sleep stage breakdown)
182
+
183
+ | Option | Description |
184
+ |--------|-------------|
185
+ | `--from <YYYY-MM-DD>` | Start date (default: `2026-03-13`) |
186
+ | `--to <YYYY-MM-DD>` | End date |
187
+ | `--timezone <tz>` | IANA timezone (default: `America/Mendoza`) |
188
+
189
+ ### `betterness sleep stages`
190
+
191
+ Retrieve minute-by-minute sleep stage transitions (Deep, Core, REM, Awake)
192
+
193
+ | Option | Description |
194
+ |--------|-------------|
195
+ | `--from <YYYY-MM-DD>` | Start date (default: `2026-03-13`) |
196
+ | `--to <YYYY-MM-DD>` | End date |
197
+ | `--timezone <tz>` | IANA timezone (default: `America/Mendoza`) |
198
+
199
+ ## vitals
200
+
201
+ Vital signs from connected wearables
202
+
203
+ ### `betterness vitals get`
204
+
205
+ Retrieve vital signs (heart rate, HRV, blood pressure, SpO2, glucose, respiratory rate)
206
+
207
+ | Option | Description |
208
+ |--------|-------------|
209
+ | `--from <YYYY-MM-DD>` | Start date (default: `2026-03-13`) |
210
+ | `--to <YYYY-MM-DD>` | End date |
211
+ | `--timezone <tz>` | IANA timezone (default: `America/Mendoza`) |
212
+
213
+ ## body-composition
214
+
215
+ Body composition data from connected wearables
216
+
217
+ ### `betterness body-composition get`
218
+
219
+ Retrieve body composition (weight, body fat %, muscle mass, BMI, waist circumference)
220
+
221
+ | Option | Description |
222
+ |--------|-------------|
223
+ | `--from <YYYY-MM-DD>` | Start date (default: `2026-03-13`) |
224
+ | `--to <YYYY-MM-DD>` | End date |
225
+ | `--timezone <tz>` | IANA timezone (default: `America/Mendoza`) |
226
+
227
+ ## connected-devices
228
+
229
+ Health device integrations and wearable connections
230
+
231
+ ### `betterness connected-devices list`
232
+
233
+ List all connected health devices and wearables
234
+
235
+ ### `betterness connected-devices available`
236
+
237
+ List health device integrations the user can connect (not currently active)
238
+
239
+ ### `betterness connected-devices link`
240
+
241
+ Generate connection link for a web-based health device integration
242
+
243
+ | Option | Description |
244
+ |--------|-------------|
245
+ | `--integration-key <key>` | Integration provider (GARMIN, OURA, WITHINGS, PELOTON, WAHOO, EIGHT_SLEEP) **(required)** |
246
+
247
+ ### `betterness connected-devices apple-health-code`
248
+
249
+ Generate connection code for Apple HealthKit via Junction app
250
+
251
+ ### `betterness connected-devices disconnect`
252
+
253
+ Disconnect a health device integration
254
+
255
+ | Option | Description |
256
+ |--------|-------------|
257
+ | `--integration-key <key>` | Integration provider to disconnect **(required)** |
258
+ | `--dry-run` | Preview the disconnection without executing |
259
+
260
+ ## lab-tests
261
+
262
+ Available lab tests for ordering
263
+
264
+ ### `betterness lab-tests list`
265
+
266
+ List available lab tests with prices and included markers
267
+
268
+ | Option | Description |
269
+ |--------|-------------|
270
+ | `--query <text>` | Search by name or description |
271
+ | `--popular` | Only show popular tests |
272
+ | `--loinc-slug <slug>` | Filter by LOINC slug |
273
+
274
+ ## lab-records
275
+
276
+ Lab records — uploaded results and purchased test orders
277
+
278
+ ### `betterness lab-records list`
279
+
280
+ List lab records (both uploaded results and lab orders)
281
+
282
+ | Option | Description |
283
+ |--------|-------------|
284
+ | `--limit <n>` | Results per page (default: `20`) |
285
+ | `--page <n>` | Page number (zero-based) (default: `0`) |
286
+
287
+ ### `betterness lab-records detail`
288
+
289
+ Get full detail of a lab record by external ID
290
+
291
+ | Option | Description |
292
+ |--------|-------------|
293
+ | `--record-id <id>` | Lab record external ID **(required)** |
294
+
295
+ ## lab-orders
296
+
297
+ Lab order management — scheduling, appointments, and service centers
298
+
299
+ ### `betterness lab-orders initialize`
300
+
301
+ Initialize a lab order for processing (order must be in Paid status)
302
+
303
+ | Option | Description |
304
+ |--------|-------------|
305
+ | `--order-id <id>` | Lab order external ID **(required)** |
306
+ | `--dry-run` | Preview the action without executing |
307
+
308
+ ### `betterness lab-orders service-centers`
309
+
310
+ Search lab service centers near a ZIP code
311
+
312
+ | Option | Description |
313
+ |--------|-------------|
314
+ | `--zip-code <zip>` | ZIP code to search near **(required)** |
315
+ | `--order-id <id>` | Lab order external ID **(required)** |
316
+ | `--limit <n>` | Maximum results (default: `6`) |
317
+ | `--offset <n>` | Pagination offset (default: `0`) |
318
+
319
+ ### `betterness lab-orders slots`
320
+
321
+ Get available appointment time slots at a service center
322
+
323
+ | Option | Description |
324
+ |--------|-------------|
325
+ | `--site-code <code>` | Service center site code **(required)** |
326
+ | `--order-id <id>` | Lab order external ID **(required)** |
327
+ | `--timezone <tz>` | IANA timezone **(required)** |
328
+ | `--start-date <YYYY-MM-DD>` | Start date for slot search |
329
+ | `--range-days <n>` | Number of days to search (default: `7`) |
330
+
331
+ ### `betterness lab-orders book`
332
+
333
+ Book a blood draw appointment at a service center
334
+
335
+ | Option | Description |
336
+ |--------|-------------|
337
+ | `--order-id <id>` | Lab order external ID **(required)** |
338
+ | `--booking-key <key>` | Booking key from slots command **(required)** |
339
+ | `--timezone <tz>` | IANA timezone **(required)** |
340
+ | `--dry-run` | Preview the booking without executing |
341
+
342
+ ### `betterness lab-orders reschedule`
343
+
344
+ Reschedule an existing blood draw appointment
345
+
346
+ | Option | Description |
347
+ |--------|-------------|
348
+ | `--order-id <id>` | Lab order external ID **(required)** |
349
+ | `--booking-key <key>` | New booking key from slots command **(required)** |
350
+ | `--timezone <tz>` | IANA timezone **(required)** |
351
+ | `--dry-run` | Preview the reschedule without executing |
352
+
353
+ ### `betterness lab-orders cancel`
354
+
355
+ Cancel a blood draw appointment (run without --reason-id to see available reasons)
356
+
357
+ | Option | Description |
358
+ |--------|-------------|
359
+ | `--order-id <id>` | Lab order external ID **(required)** |
360
+ | `--reason-id <id>` | Cancellation reason ID |
361
+ | `--dry-run` | Preview the cancellation without executing |
362
+
363
+ ## lab-results
364
+
365
+ Lab result management — approve, update biomarkers, update metadata
366
+
367
+ ### `betterness lab-results update-status`
368
+
369
+ Update lab result status (APPROVE, ROLLBACK, or REPROCESS)
370
+
371
+ | Option | Description |
372
+ |--------|-------------|
373
+ | `--result-id <id>` | Lab result external ID **(required)** |
374
+ | `--action <action>` | Action: APPROVE, ROLLBACK, or REPROCESS **(required)** |
375
+
376
+ ### `betterness lab-results update-biomarker`
377
+
378
+ Update or delete a biomarker value within an uploaded lab result
379
+
380
+ | Option | Description |
381
+ |--------|-------------|
382
+ | `--biomarker-id <id>` | Biomarker external ID **(required)** |
383
+ | `--action <action>` | Set to DELETE to remove the biomarker |
384
+ | `--name <name>` | Biomarker name |
385
+ | `--result <value>` | Biomarker value (e.g. '5.2', '120') |
386
+ | `--unit <unit>` | Unit (e.g. 'mg/dL', 'ng/mL') |
387
+ | `--min-range <n>` | Minimum range value |
388
+ | `--max-range <n>` | Maximum range value |
389
+
390
+ ### `betterness lab-results update-metadata`
391
+
392
+ Update metadata of an uploaded lab result (patient info and test details)
393
+
394
+ | Option | Description |
395
+ |--------|-------------|
396
+ | `--result-id <id>` | Lab result external ID **(required)** |
397
+ | `--patient-name <name>` | Patient name |
398
+ | `--patient-sex <sex>` | Patient sex: MALE or FEMALE |
399
+ | `--dob <date>` | Date of birth |
400
+ | `--lab-name <name>` | Lab name |
401
+ | `--ordering-physician <name>` | Ordering physician |
402
+ | `--date-collected <date>` | Date collected (ISO-8601) |
403
+ | `--fasting` | Mark as fasting test |
404
+
405
+ ### `betterness lab-results upload`
406
+
407
+ Upload a lab result PDF for processing
408
+
409
+ | Option | Description |
410
+ |--------|-------------|
411
+ | `--file <path>` | Path to the PDF file **(required)** |
412
+
413
+ ## purchases
414
+
415
+ Lab test purchases and payment methods
416
+
417
+ ### `betterness purchases payment-methods`
418
+
419
+ List saved payment methods (credit/debit cards)
420
+
421
+ ### `betterness purchases buy`
422
+
423
+ Purchase a lab test using a saved payment method
424
+
425
+ | Option | Description |
426
+ |--------|-------------|
427
+ | `--test-key <key>` | Lab test object key **(required)** |
428
+ | `--payment-method-id <id>` | Payment method external ID **(required)** |
429
+ | `--promo-code <code>` | Promotion code |
430
+ | `--dry-run` | Preview what would be purchased without executing |
431
+
432
+ ### `betterness purchases checkout`
433
+
434
+ Generate a Stripe Checkout payment link for a lab test (for users without saved cards)
435
+
436
+ | Option | Description |
437
+ |--------|-------------|
438
+ | `--test-key <key>` | Lab test object key **(required)** |
439
+ | `--success-url <url>` | URL to redirect after successful payment **(required)** |
440
+ | `--cancel-url <url>` | URL to redirect if checkout is cancelled **(required)** |
441
+ | `--promo-code <code>` | Promotion code |
442
+ | `--dry-run` | Preview the checkout request without executing |
443
+
444
+ ## smart-listings
445
+
446
+ Search and browse wellness providers (SmartListings)
447
+
448
+ ### `betterness smart-listings search`
449
+
450
+ Search SmartListings by name, description, tags, or location
451
+
452
+ | Option | Description |
453
+ |--------|-------------|
454
+ | `--query <text>` | Text search query |
455
+ | `--lat <n>` | Latitude for proximity search |
456
+ | `--lng <n>` | Longitude for proximity search |
457
+ | `--radius <km>` | Radius in km (1, 2, 5, 10, 20) |
458
+ | `--following` | Only show followed providers |
459
+ | `--limit <n>` | Results per page (default: `10`) |
460
+ | `--page <n>` | Page number (zero-based) (default: `0`) |
461
+
462
+ ### `betterness smart-listings detail`
463
+
464
+ Get full details of a SmartListing by ID
465
+
466
+ | Option | Description |
467
+ |--------|-------------|
468
+ | `--id <externalId>` | SmartListing external ID **(required)** |
469
+
470
+ ## workflow
471
+
472
+ Composite commands that aggregate data from multiple endpoints
473
+
474
+ ### `betterness workflow daily-brief`
475
+
476
+ Daily health summary — profile, biological age, biomarkers, devices
477
+
478
+ | Option | Description |
479
+ |--------|-------------|
480
+ | `--biomarker-limit <n>` | Maximum biomarkers to fetch (default: `20`) |
481
+
482
+ ### `betterness workflow next-actions`
483
+
484
+ Recommended next actions based on biomarkers and health data
485
+
486
+ | Option | Description |
487
+ |--------|-------------|
488
+ | `--biomarker-limit <n>` | Maximum biomarkers to analyze (default: `50`) |
489
+
490
+ ### `betterness schema`
491
+
492
+ Discover available commands, options, and response formats
493
+
package/README.md ADDED
@@ -0,0 +1,198 @@
1
+ # @betterness/cli
2
+
3
+ Terminal interface for the [Betterness](https://betterness.com) health & wellness platform. Access your biomarkers, lab results, wearable data, and more from the command line — or let AI agents work with your health data programmatically.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install -g @betterness/cli
9
+ ```
10
+
11
+ Requires Node.js 20+.
12
+
13
+ ## Authentication
14
+
15
+ Get your API key from either:
16
+
17
+ - [app.betti.bot/settings/betterness-mcp](https://app.betti.bot/settings/betterness-mcp)
18
+ - [betterness.ai/mcp/keys](https://www.betterness.ai/mcp/keys)
19
+
20
+ The same key works for both the CLI and the [Betterness MCP server](https://www.betterness.ai/mcp).
21
+
22
+ ```bash
23
+ betterness auth login --key bk_your_api_key
24
+ betterness auth whoami # verify
25
+ ```
26
+
27
+ You can also set the `BETTERNESS_API_KEY` environment variable instead of storing credentials.
28
+
29
+ Priority: `--api-key` flag > `BETTERNESS_API_KEY` env var > stored credentials.
30
+
31
+ ## Quick Start
32
+
33
+ ```bash
34
+ # Your profile
35
+ betterness profile get
36
+
37
+ # Daily health summary
38
+ betterness workflow daily-brief
39
+
40
+ # Recent biomarker results
41
+ betterness biomarkers search --limit 10
42
+
43
+ # Activity from your wearable
44
+ betterness activity get --from 2025-01-01
45
+
46
+ # Recommended next actions
47
+ betterness workflow next-actions
48
+ ```
49
+
50
+ ## Output Formats
51
+
52
+ Every command supports three output modes via global flags:
53
+
54
+ | Flag | Format | Use case |
55
+ |------|--------|----------|
56
+ | *(default)* | Formatted table | Human reading |
57
+ | `--json` | JSON | Scripting, piping to `jq` |
58
+ | `--markdown` | Markdown | AI agents, documentation |
59
+
60
+ ```bash
61
+ betterness biomarkers search --json | jq '.[] | .name'
62
+ betterness profile get --markdown
63
+ ```
64
+
65
+ ## Commands
66
+
67
+ ### Profile
68
+
69
+ ```bash
70
+ betterness profile get # View profile
71
+ betterness profile update --city "New York" --state NY # Update fields
72
+ ```
73
+
74
+ ### Biomarkers & Biological Age
75
+
76
+ ```bash
77
+ betterness biomarkers search # All recent results
78
+ betterness biomarkers search --name cholesterol # Filter by name
79
+ betterness biomarkers search --range OUT_OF_RANGE # Out-of-range only
80
+ betterness biomarkers loinc-codes # Available LOINC codes
81
+ betterness biological-age get # Age calculation history
82
+ ```
83
+
84
+ ### Wearable Data
85
+
86
+ Requires a connected device (Apple Health, Garmin, Oura, Withings, etc.).
87
+
88
+ ```bash
89
+ betterness activity get --from 2025-01-01 --to 2025-01-31
90
+ betterness sleep get --from 2025-01-01
91
+ betterness sleep stages --from 2025-01-01
92
+ betterness vitals get --from 2025-01-01
93
+ betterness body-composition get --from 2025-01-01
94
+ ```
95
+
96
+ ### Connected Devices
97
+
98
+ ```bash
99
+ betterness connected-devices list # Active connections
100
+ betterness connected-devices available # Available integrations
101
+ betterness connected-devices link --integration-key GARMIN
102
+ betterness connected-devices apple-health-code # Apple HealthKit code
103
+ betterness connected-devices disconnect --integration-key OURA
104
+ ```
105
+
106
+ ### Lab Tests & Orders
107
+
108
+ ```bash
109
+ # Browse and purchase
110
+ betterness lab-tests list --popular
111
+ betterness purchases buy --test-key <key> --payment-method-id <id>
112
+ betterness purchases checkout --test-key <key> --success-url <url> --cancel-url <url>
113
+
114
+ # Manage orders
115
+ betterness lab-orders initialize --order-id <id>
116
+ betterness lab-orders service-centers --zip-code 10001 --order-id <id>
117
+ betterness lab-orders slots --site-code <code> --order-id <id> --timezone America/New_York
118
+ betterness lab-orders book --order-id <id> --booking-key <key> --timezone America/New_York
119
+
120
+ # Upload results
121
+ betterness lab-results upload --file ./bloodwork.pdf
122
+ ```
123
+
124
+ ### Lab Records & Results
125
+
126
+ ```bash
127
+ betterness lab-records list
128
+ betterness lab-records detail --record-id <id>
129
+ betterness lab-results update-status --result-id <id> --action APPROVE
130
+ betterness lab-results update-biomarker --biomarker-id <id> --result 5.2 --unit "mg/dL"
131
+ betterness lab-results update-metadata --result-id <id> --patient-name "Jane Doe"
132
+ ```
133
+
134
+ ### Smart Listings (Wellness Providers)
135
+
136
+ ```bash
137
+ betterness smart-listings search --query "yoga" --lat 40.7 --lng -74.0 --radius 10
138
+ betterness smart-listings detail --id <externalId>
139
+ ```
140
+
141
+ ### Workflow (Composite Commands)
142
+
143
+ ```bash
144
+ betterness workflow daily-brief # Full health snapshot
145
+ betterness workflow next-actions # AI-driven recommendations
146
+ ```
147
+
148
+ ### Schema Discovery
149
+
150
+ ```bash
151
+ betterness schema # All commands, options, and response formats as JSON
152
+ ```
153
+
154
+ Useful for AI agents to discover capabilities at runtime.
155
+
156
+ ## Agent & MCP Integration
157
+
158
+ The CLI is designed to be consumed by AI agents. Key features:
159
+
160
+ - `--json` output for structured data parsing
161
+ - `--markdown` output optimized for LLM context windows
162
+ - `betterness schema` for runtime capability discovery
163
+ - `--quiet` mode for exit-code-only checks
164
+ - `--dry-run` on destructive commands for safe planning
165
+
166
+ ### Skills
167
+
168
+ Agent skills teach your AI coding agent the Betterness API surface — endpoints, schemas, and workflows — so it can build integrations without guessing. Available in the [betterness-cli](https://github.com/Betterness/betterness-cli) repo under `.agents/skills/`:
169
+
170
+ | Skill | Description |
171
+ |-------|-------------|
172
+ | [biomarkers-api](https://github.com/Betterness/betterness-cli/tree/main/.agents/skills/biomarkers-api) | Biomarkers, lab tests, lab orders, health records, biological age, purchases, Stripe flows |
173
+ | [perks-api](https://github.com/Betterness/betterness-cli/tree/main/.agents/skills/perks-api) | Perks management, browsing, partner profiles, collaboration workflow |
174
+
175
+ #### Installing skills
176
+
177
+ Install all skills into your agent with a single command (auto-detects Claude Code, Codex, Cursor, Windsurf, Cline, OpenClaw, and [40+ more](https://github.com/vercel-labs/skills)):
178
+
179
+ ```bash
180
+ npx skills add https://github.com/Betterness/betterness-cli
181
+ ```
182
+
183
+ Or install a specific skill:
184
+
185
+ ```bash
186
+ npx skills add https://github.com/Betterness/betterness-cli --skill biomarkers-api
187
+ npx skills add https://github.com/Betterness/betterness-cli --skill perks-api
188
+ ```
189
+
190
+ Each skill folder contains a `SKILL.md` (activation rules and patterns) and a `references/` directory with full API specs.
191
+
192
+ ## Full CLI Reference
193
+
194
+ See [CLI_REFERENCE.md](./CLI_REFERENCE.md) for the complete list of commands, options, and descriptions.
195
+
196
+ ## License
197
+
198
+ Proprietary.
package/package.json CHANGED
@@ -1,13 +1,15 @@
1
1
  {
2
2
  "name": "@betterness/cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Betterness CLI - Agent-first terminal interface for the Betterness platform",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "betterness": "./dist/index.js"
8
8
  },
9
9
  "files": [
10
- "dist/"
10
+ "dist/",
11
+ "README.md",
12
+ "CLI_REFERENCE.md"
11
13
  ],
12
14
  "publishConfig": {
13
15
  "access": "public"