@betterness/cli 1.1.2 → 1.2.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.
package/README.md CHANGED
@@ -12,6 +12,17 @@ Requires Node.js 20+.
12
12
 
13
13
  ## Authentication
14
14
 
15
+ ### OAuth (default)
16
+
17
+ ```bash
18
+ betterness auth login # Opens browser for OAuth login
19
+ betterness auth whoami # Verify
20
+ ```
21
+
22
+ The CLI opens a browser window for secure authentication via OAuth. Tokens are stored in `~/.betterness/tokens.json` and refreshed automatically.
23
+
24
+ ### API Key
25
+
15
26
  Get your API key from either:
16
27
 
17
28
  - [app.betti.bot/settings/betterness-mcp](https://app.betti.bot/settings/betterness-mcp)
@@ -26,7 +37,11 @@ betterness auth whoami # verify
26
37
 
27
38
  You can also set the `BETTERNESS_API_KEY` environment variable instead of storing credentials.
28
39
 
29
- Priority: `--api-key` flag > `BETTERNESS_API_KEY` env var > stored credentials.
40
+ ### Credential priority
41
+
42
+ `--api-key` flag > `BETTERNESS_API_KEY` env var > OAuth tokens > stored API key.
43
+
44
+ Only one auth method is active at a time — logging in with one clears the other.
30
45
 
31
46
  ## Quick Start
32
47
 
@@ -131,6 +146,18 @@ betterness lab-results update-biomarker --biomarker-id <id> --result 5.2 --unit
131
146
  betterness lab-results update-metadata --result-id <id> --patient-name "Jane Doe"
132
147
  ```
133
148
 
149
+ ### Health Profile
150
+
151
+ ```bash
152
+ betterness health-profile schema # List all sections
153
+ betterness health-profile schema --section HWP # Questions in a section
154
+ betterness health-profile get # Full profile (flat map)
155
+ betterness health-profile get-section --section DA # Single section answers
156
+ betterness health-profile summary # Human-readable summary
157
+ betterness health-profile update --data '{"HWP_HAB_do_you_smoke_cigarettes_or_use_tobacco_products": false}'
158
+ betterness health-profile reset-section --section DA
159
+ ```
160
+
134
161
  ### Smart Listings (Wellness Providers)
135
162
 
136
163
  ```bash