wellness-nourish 0.6.7 → 0.6.8

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/CHANGELOG.md CHANGED
@@ -6,6 +6,21 @@ this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.6.8] - 2026-06-27
10
+
11
+ ### Changed
12
+
13
+ - Rework the README as a shorter agent-first front door with quickstart,
14
+ copy-paste prompts, privacy boundaries, Telegram/Hermes proof path and
15
+ Delx Living Body demo handoff above the fold.
16
+ - Move the full CLI reference, MCP client config examples and ChatGPT dashboard
17
+ notes into `docs/cli.md`.
18
+ - Move provider attribution, Open Food Facts ODbL notes, photo-estimation
19
+ boundaries and local-storage privacy details into `docs/providers.md`.
20
+ - Move the Hermes/Telegram personal setup flow into `docs/telegram.md` so
21
+ nutrition bot builders can follow one stable runbook without scanning the
22
+ whole README.
23
+
9
24
  ## [0.6.7] - 2026-06-27
10
25
 
11
26
  ### Security
package/README.md CHANGED
@@ -12,6 +12,7 @@
12
12
 
13
13
  <p align="center">
14
14
  <a href="https://www.npmjs.com/package/wellness-nourish"><img src="https://img.shields.io/npm/v/wellness-nourish?style=for-the-badge&labelColor=0F172A&color=10B981&logo=npm&logoColor=white" alt="npm version" /></a>
15
+ <a href="https://github.com/davidmosiah/wellness-nourish/releases/latest"><img src="https://img.shields.io/github/v/release/davidmosiah/wellness-nourish?style=for-the-badge&labelColor=0F172A&color=2563EB&logo=github" alt="GitHub release" /></a>
15
16
  <a href="https://www.npmjs.com/package/wellness-nourish"><img src="https://img.shields.io/npm/dm/wellness-nourish?style=for-the-badge&labelColor=0F172A&color=0EA5A3&logo=npm&logoColor=white" alt="npm downloads" /></a>
16
17
  <a href="LICENSE"><img src="https://img.shields.io/badge/LICENSE-MIT-22C55E?style=for-the-badge&labelColor=0F172A" alt="License MIT" /></a>
17
18
  <a href="https://wellness.delx.ai/nutrition"><img src="https://img.shields.io/badge/SITE-wellness.delx.ai-0EA5A3?style=for-the-badge&labelColor=0F172A" alt="Site" /></a>
@@ -20,6 +21,7 @@
20
21
  <p align="center">
21
22
  <a href="https://github.com/davidmosiah/wellness-nourish/stargazers"><img src="https://img.shields.io/github/stars/davidmosiah/wellness-nourish?style=for-the-badge&labelColor=0F172A&color=FBBF24&logo=github" alt="GitHub stars" /></a>
22
23
  <a href="https://modelcontextprotocol.io"><img src="https://img.shields.io/badge/BUILT_FOR-MCP-7C3AED?style=for-the-badge&labelColor=0F172A" alt="Built for MCP" /></a>
24
+ <a href="https://github.com/davidmosiah/delx-wellness/blob/main/docs/release-index.md"><img src="https://img.shields.io/badge/VERIFIED-release_index-0EA5A3?style=for-the-badge&labelColor=0F172A" alt="Verified release index" /></a>
23
25
  <a href="https://github.com/davidmosiah/delx-wellness-hermes"><img src="https://img.shields.io/badge/HERMES-one--command_setup-10B981?style=for-the-badge&labelColor=0F172A" alt="Hermes one-command setup" /></a>
24
26
  <a href="https://github.com/davidmosiah/delx-wellness-openclaw"><img src="https://img.shields.io/badge/OPENCLAW-one--command_setup-FB923C?style=for-the-badge&labelColor=0F172A" alt="OpenClaw one-command setup" /></a>
25
27
  <a href="https://github.com/davidmosiah/delx-wellness"><img src="https://img.shields.io/badge/Nourish-10B981?style=for-the-badge&labelColor=0F172A&logoColor=white" alt="Nourish" /></a>
@@ -38,23 +40,22 @@
38
40
  >
39
41
  > Want runnable agent examples? Use the [Delx Agent Workbench](https://github.com/davidmosiah/delx-agent-workbench) for prompt packs, MCP client configs and local-first workflow templates.
40
42
 
43
+ > **Public proof:** Nourish is tracked in the Delx [Open Source Growth Snapshot](https://github.com/davidmosiah/delx-wellness/blob/main/docs/open-source-growth-snapshot.md) alongside downloads, stars and next-action priorities. If this saves you setup time, star this repo so other agent builders can find the local-first nutrition path faster.
44
+
41
45
  ---
42
46
 
43
47
  <!-- /delx-wellness header v2 -->
44
48
 
45
- ## Overview
46
-
47
- Wellness Nourish is a local MCP server for nutrition search, barcode lookup, barcode photo lookup, photo-assisted meal estimation, intake logging, hydration, goals, exports, daily or weekly summaries, personal meal memory, and coach-style nutrition workflows. It runs over stdio by default for MCP clients and can also run a Streamable HTTP endpoint at `POST /mcp`.
49
+ Local-first nutrition MCP for AI agents — food search, barcode lookup, photo-assisted meal estimation, intake logging, hydration, goals and coach-style workflows. No OAuth, no hosted account.
48
50
 
49
- > If this nutrition layer helps your agent workflow, please star the repo. Stars make the project easier for other AI builders to discover and help Delx keep shipping local-first wellness infrastructure.
51
+ ## Front door
50
52
 
51
- <p align="center">
52
- <img src="assets/telegram-nourish-demo.svg" alt="Wellness Nourish Telegram and Hermes nutrition workflow demo" width="92%" />
53
- </p>
53
+ - **Install one connector** — `npx -y wellness-nourish setup --client claude`
54
+ - **Run it in** Claude · Cursor · ChatGPT · Hermes · OpenClaw see the [client examples](https://github.com/davidmosiah/delx-wellness#run-it-in-your-agent).
55
+ - **Local-first** — your tokens and food logs never leave your machine ([privacy](#privacy--what-runs-offline)).
56
+ - **Which connector should I use?** — see the [front-door guide](https://github.com/davidmosiah/delx-wellness#which-connector-should-i-use).
54
57
 
55
- Field guide: [Why local-first wellness agents need MCP](https://github.com/davidmosiah/davidmosiah/blob/main/docs/local-first-wellness-agents.md).
56
-
57
- ## Try It In 60 Seconds
58
+ ## Quickstart (60 seconds)
58
59
 
59
60
  ```bash
60
61
  npx -y wellness-nourish doctor
@@ -63,12 +64,11 @@ npx -y wellness-nourish barcode 0000000000000
63
64
  npx -y wellness-nourish log --preview "2 ovos, banana e café preto"
64
65
  ```
65
66
 
66
- ### Demo (offline, no API key)
67
+ `doctor` checks readiness, `search`/`barcode` hit the food providers, and `log --preview` estimates a meal locally without writing anything.
68
+
69
+ ### Zero-secret demo (offline, no API key)
67
70
 
68
- `NOURISH_FIXTURE_MODE=1` serves the bundled `fixtures/` instead of calling
69
- USDA or Open Food Facts, so you can see the exact shape of every response with
70
- zero network access or keys. The outputs below are captured verbatim from this
71
- mode:
71
+ `NOURISH_FIXTURE_MODE=1` serves the bundled `fixtures/` instead of calling USDA or Open Food Facts, so you can see the exact shape of every response with zero network access or keys:
72
72
 
73
73
  ```bash
74
74
  $ NOURISH_FIXTURE_MODE=1 wellness-nourish search banana
@@ -76,238 +76,43 @@ Bananas, raw usda 89 kcal/100g
76
76
  BANANA usda 312 kcal/100g
77
77
  ```
78
78
 
79
- ```bash
80
- $ NOURISH_FIXTURE_MODE=1 NOURISH_OFF_ENABLED=1 wellness-nourish barcode 737628064502
81
- ```
82
- ```jsonc
83
- {
84
- "name": "Peanut Butter",
85
- "barcode": "737628064502",
86
- "brand": "Fixture Foods",
87
- "serving": { "quantity": 1, "unit": "serving", "grams": 32 },
88
- "nutrients_per_serving": {
89
- "calories_kcal": 188.16,
90
- "protein_g": 8,
91
- "carbohydrates_g": 6.4,
92
- "fat_g": 16,
93
- "fiber_g": 1.92,
94
- "sugar_g": 2.88,
95
- "saturated_fat_g": 3.2,
96
- "sodium_mg": 128
97
- },
98
- "license": { "name": "Open Food Facts ODbL" },
99
- "data_quality": { "completeness": "high", "confidence": 0.75, "warnings": [] }
100
- // ...full record also includes nutrients_per_100g, available_portions, carbon
101
- }
102
- ```
103
-
104
- `log --preview` estimates a meal locally without writing anything:
105
-
106
- ```bash
107
- $ wellness-nourish log --preview "2 eggs and a banana"
108
- ```
109
- ```jsonc
110
- {
111
- "would_write": false,
112
- "total_nutrients": {
113
- "calories_kcal": 248.02,
114
- "protein_g": 13.89,
115
- "carbohydrates_g": 27.65,
116
- "fat_g": 9.89,
117
- "fiber_g": 3.07,
118
- "sugar_g": 14.43
119
- },
120
- "confidence": 0.7,
121
- "warnings": ["Nutrition values are estimates from simple food defaults."]
122
- // ...full record also includes per-item breakdown and entry_preview
123
- }
124
- ```
125
-
126
- For the full Telegram/Hermes flow:
127
-
128
- ```bash
129
- npx -y delx-wellness-hermes setup
130
- hermes -p delx-wellness
131
- ```
132
-
133
- The connector uses USDA FoodData Central as the primary food search provider. Open Food Facts is used for packaged-food barcode lookup and product-name search when enabled. Local barcode image decoding is supported with ZXing. Meal photos are estimated only from an agent-provided visual observation and always require confirmation before logging. The local estimator includes a pt-BR/Brazilian-food catalog for common meals, kitchen units, and shortcuts such as arroz, feijão, frango, ovos, banana, tapioca, picanha, feijoada and salada. It does not provide hosted sync, autonomous photo upload, recipe generation, or medical advice.
134
-
135
- ## Install
136
-
137
- ```bash
138
- npm install
139
- npm run build
140
- ```
141
-
142
- Run the MCP server over stdio:
143
-
144
- ```bash
145
- npm start
146
- ```
147
-
148
- Run Streamable HTTP locally:
149
-
150
- ```bash
151
- node dist/index.js --http
152
- ```
79
+ ## Try it with your agent
153
80
 
154
- ### ChatGPT App / MCP Apps UI
81
+ Three copy-paste prompts, all backed by existing tools:
155
82
 
156
- Nourish also exposes a compact MCP Apps-compatible dashboard for ChatGPT and other compatible hosts:
83
+ - "Estimate the calories and protein in 2 eggs, a banana and black coffee." → `nourish_estimate_meal`
84
+ - "Look up the barcode 737628064502 and tell me what it is." → `nourish_lookup_barcode`
85
+ - "What should I eat next today, given my goals?" → `nourish_daily_coach` / `nourish_suggest_next_meal`
157
86
 
158
- - Tool: `nourish_chatgpt_dashboard`
159
- - UI resource: `ui://widget/nourish-dashboard-v1.html`
160
- - MIME type: `text/html;profile=mcp-app`
87
+ Mutating tools (log intake, water, goals, clear-day) never run without explicit user save intent — they return `USER_ACTION_REQUIRED` until the agent passes `explicit_user_intent: true`.
161
88
 
162
- The dashboard shows the daily nutrition summary, hydration progress, profile gaps and next-meal coaching, and it can call `nourish_estimate_meal` from the embedded UI for preview-only estimates. It does not write intake, water or goals; mutating tools still require explicit user confirmation through the normal MCP tools.
163
-
164
- Optional environment:
165
-
166
- ```bash
167
- FDC_API_KEY=your_usda_key
168
- NOURISH_OFF_ENABLED=1
169
- NOURISH_LOCAL_DIR=~/.wellness-nourish
170
- NOURISH_MCP_PORT=3000
171
- ```
89
+ ## Tools
172
90
 
173
- Agents should never ask users to paste API keys, tokens, raw health exports, or private food logs into chat. Configure secrets through environment variables or local files.
91
+ Nourish exposes food search, barcode lookup (text + image), photo-assisted meal estimation, intake logging, hydration, goals, exports, daily/weekly summaries, personal meal memory, and coach-style workflows over stdio (default) or Streamable HTTP (`POST /mcp`).
174
92
 
175
- ## CLI Commands
93
+ - **Full CLI (20+ commands), install, client configs & ChatGPT dashboard** → [`docs/cli.md`](docs/cli.md)
94
+ - **Hermes / Telegram personal setup (10-step flow)** → [`docs/telegram.md`](docs/telegram.md)
95
+ - **Data providers & attribution (USDA, Open Food Facts, ZXing)** → [`docs/providers.md`](docs/providers.md)
176
96
 
177
- ```bash
178
- wellness-nourish status
179
- wellness-nourish doctor
180
- wellness-nourish setup --client claude
181
- wellness-nourish search banana
182
- wellness-nourish barcode 0000000000000
183
- wellness-nourish log --preview --meal breakfast "2 eggs and banana"
184
- wellness-nourish log "2 eggs and banana"
185
- wellness-nourish list 2026-05-05
186
- wellness-nourish edit --entry intake_id --meal snack --notes "corrected"
187
- wellness-nourish today --format markdown
188
- wellness-nourish weekly --format markdown
189
- wellness-nourish goals --set-calories 2200 --set-protein 120 --set-water 2500
190
- wellness-nourish water 500 --date 2026-05-05
191
- wellness-nourish water today --date 2026-05-05
192
- wellness-nourish export --format csv
193
- wellness-nourish clear-day 2026-05-05 --yes
194
- wellness-nourish delete --entry intake_id
195
- ```
196
-
197
- No arguments start the stdio MCP server. `--http` starts HTTP transport, `--version` prints the package version, and `--help` prints usage.
198
-
199
- `log --preview` estimates without writing. Mutating MCP tools require explicit user intent; CLI commands are treated as explicit user actions, while destructive clear-day requires `--yes`.
200
-
201
- The local estimator understands common lightweight portions such as `g`, `oz`, `cup`, `tbsp`, `tsp`, `slice`, `piece`, and `serving`. It still reports confidence and warnings because these are conservative tracking estimates, not lab-grade nutrition facts.
202
-
203
- ## MCP Client Config Examples
204
-
205
- Ready-to-use examples live in `examples/`:
206
-
207
- - `examples/claude-desktop.json`
208
- - `examples/codex.json`
209
- - `examples/cursor.json`
210
- - `examples/windsurf.json`
211
- - `examples/hermes.md`
212
- - `examples/hermes-skill.md`
213
- - `examples/openclaw.md`
214
-
215
- Claude Desktop style:
216
-
217
- ```json
218
- {
219
- "mcpServers": {
220
- "nourish": {
221
- "command": "npx",
222
- "args": ["-y", "wellness-nourish"],
223
- "env": {
224
- "FDC_API_KEY": "${FDC_API_KEY}",
225
- "NOURISH_OFF_ENABLED": "1"
226
- }
227
- }
228
- }
229
- }
230
- ```
231
-
232
- ## Hermes / Telegram Personal Setup
233
-
234
- For a personal Hermes server connected to your Telegram bot, let the package write the Hermes config and skill:
235
-
236
- ```bash
237
- npx -y wellness-nourish setup --client hermes --profile david --local-dir /root/.hermes/nourish/david
238
- npx -y wellness-nourish doctor --client hermes --json
239
- hermes mcp test nourish
240
- ```
241
-
242
- This adds a `nourish` MCP server block to `~/.hermes/config.yaml`, installs `~/.hermes/skills/nourish-mcp/SKILL.md`, and pins the npm package version. After config changes, use `/reload-mcp` or `hermes mcp test nourish`.
243
-
244
- Hermes setup also writes `~/.hermes/scripts/nourish-mcp-wrapper.sh`. The wrapper sources `~/.hermes/secrets/nourish.env` when present, so `FDC_API_KEY` can be managed as a server-side secret without pasting it into chat or relying on a stale shell session.
245
-
246
- Recommended Telegram flow:
247
-
248
- 1. User says what they ate.
249
- 2. Hermes calls `nourish_estimate_meal` and replies with calories, protein, confidence and warnings.
250
- 3. For barcode photos, Hermes calls `nourish_lookup_barcode_image` when it has an image path, base64 image, or data URI.
251
- 4. For mixed food photos, Hermes calls `nourish_analyze_food_image` with barcode observations, label OCR, detected items, or image description.
252
- 5. For meal photos, Hermes describes visible food and portions, calls `nourish_estimate_meal_photo`, and asks for portion confirmation.
253
- 6. For "what should I eat now?" questions, Hermes calls `nourish_daily_coach` or `nourish_suggest_next_meal`, optionally passing wearable context from WHOOP/Garmin/Oura.
254
- 7. For repeated meals, Hermes can call `nourish_remember_meal` after explicit user intent so future phrases like "meu café normal" expand locally.
255
- 8. User confirms saving.
256
- 9. Hermes calls `nourish_log_intake` with `explicit_user_intent: true`.
257
- 10. User can ask for `today`, weekly summaries, goals, hydration, edits, deletes or exports.
258
-
259
- Local build:
260
-
261
- ```json
262
- {
263
- "mcpServers": {
264
- "nourish": {
265
- "command": "node",
266
- "args": ["/absolute/path/to/wellness-nourish/dist/index.js"],
267
- "env": {
268
- "NOURISH_LOCAL_DIR": "/absolute/path/to/.wellness-nourish"
269
- }
270
- }
271
- }
272
- }
273
- ```
274
-
275
- ## Provider Attribution
276
-
277
- USDA FoodData Central is the primary provider for generic food search and nutrient data. USDA data is public domain or otherwise provided by USDA FoodData Central terms; keep provider attribution with derived results.
278
-
279
- Open Food Facts barcode data is licensed under the Open Database License (ODbL). Open Food Facts metadata has share-alike obligations, so agents and downstream tools should preserve attribution and license metadata when exporting or reusing packaged-food records.
280
-
281
- ## Privacy
97
+ <p align="center">
98
+ <img src="assets/telegram-nourish-demo.svg" alt="Wellness Nourish Telegram and Hermes nutrition workflow demo" width="92%" />
99
+ </p>
282
100
 
283
- Intake data is stored locally under `~/.wellness-nourish/intake.jsonl` unless `NOURISH_LOCAL_DIR` is set. Hydration is stored in `hydration.jsonl`, and goals are stored in `goals.json` in the same local directory. The connector does not require hosted accounts and does not send local intake logs to Delx Wellness. Provider lookups may contact USDA FoodData Central or Open Food Facts unless fixture mode is enabled.
101
+ ## Privacy & what runs offline
284
102
 
285
- Use `nourish-mcp export` to print the local JSONL export, `nourish-mcp export --format csv` for CSV, `nourish-mcp delete --entry <id>` to delete a specific intake entry, or `nourish-mcp clear-day <date> --yes` to delete all intake entries for a day.
103
+ Intake, hydration and goals are stored locally under `~/.wellness-nourish/` (override with `NOURISH_LOCAL_DIR`). The connector does not require hosted accounts and does not send local intake logs to Delx Wellness. Provider lookups may contact USDA FoodData Central or Open Food Facts — unless `NOURISH_FIXTURE_MODE=1` keeps everything offline against the bundled fixtures.
286
104
 
287
- ## Not Medical Advice
105
+ Agents should never ask users to paste API keys, tokens, raw health exports, or private food logs into chat — configure secrets through environment variables or local files. Full detail in [`docs/providers.md`](docs/providers.md).
288
106
 
289
- Nutrition estimates are approximate and intended for personal tracking and agent workflow context. They are not diagnosis, treatment, or medical advice. Confirm important nutrition decisions with a qualified professional.
107
+ ## See the full agent demo
290
108
 
291
- ## Development And Tests
109
+ Watch Nourish work alongside the other connectors in one reproducible run:
292
110
 
293
111
  ```bash
294
- npm run typecheck
295
- npm run build
296
- npm run smoke:http
297
- npm run test:cli-ux
298
- npm run test:agent-readiness
299
- npm test
112
+ npx -y delx-living-body demo
300
113
  ```
301
114
 
302
- Fixture mode:
303
-
304
- ```bash
305
- NOURISH_FIXTURE_MODE=1 NOURISH_FIXTURE_DIR=fixtures npm run test:cli-ux
306
- ```
307
-
308
- ## Delx Wellness
309
-
310
- Project page: <https://wellness.delx.ai/nutrition>
115
+ Anchor question: **"Should I train hard today?"** — the demo combines wearable recovery signals with nutrition context to answer it. This is the shared, reproducible proof for the whole Delx Wellness stack.
311
116
 
312
117
  <!-- delx-wellness see-also -->
313
118
 
@@ -319,7 +124,7 @@ The full [Delx Wellness](https://wellness.delx.ai) connector library:
319
124
  |---|---|---|
320
125
  | WHOOP | [`whoop-mcp-unofficial`](https://www.npmjs.com/package/whoop-mcp-unofficial) | [whoop-mcp](https://github.com/davidmosiah/whoop-mcp) |
321
126
  | Oura | [`oura-mcp-unofficial`](https://www.npmjs.com/package/oura-mcp-unofficial) | [ouramcp](https://github.com/davidmosiah/ouramcp) |
322
- | Garmin | [`garmin-mcp-unofficial`](https://www.npmjs.com/package/garmin-mcp-unofficial) | [garminmcp](https://github.com/davidmosiah/garminmcp) |
127
+ | Garmin | [`garmin-mcp-unofficial`](https://www.npmjs.com/package/garmin-mcp-unofficial) | [garmin-mcp](https://github.com/davidmosiah/garmin-mcp) |
323
128
  | Strava | [`strava-mcp-unofficial`](https://www.npmjs.com/package/strava-mcp-unofficial) | [strava-mcp](https://github.com/davidmosiah/strava-mcp) |
324
129
  | Fitbit | [`fitbit-mcp-unofficial`](https://www.npmjs.com/package/fitbit-mcp-unofficial) | [fitbitmcp](https://github.com/davidmosiah/fitbitmcp) |
325
130
  | Google Health | [`google-health-mcp-unofficial`](https://www.npmjs.com/package/google-health-mcp-unofficial) | [google-health-mcp](https://github.com/davidmosiah/google-health-mcp) |
@@ -335,6 +140,12 @@ The full [Delx Wellness](https://wellness.delx.ai) connector library:
335
140
 
336
141
  ---
337
142
 
143
+ ## Not medical advice
144
+
145
+ Nutrition estimates are approximate and intended for personal tracking and agent workflow context. They are not diagnosis, treatment, or medical advice. Confirm important nutrition decisions with a qualified professional.
146
+
147
+ **Unofficial.** Not affiliated with, endorsed by, or sponsored by USDA, Open Food Facts, or any third party. All trademarks belong to their respective owners.
148
+
338
149
  ## 📧 Contact & Support
339
150
 
340
151
  - 📨 **support@delx.ai** — general questions, integration help, partnerships
@@ -1,10 +1,10 @@
1
1
  export declare const SERVER_NAME = "nourish-mcp";
2
- export declare const SERVER_VERSION = "0.6.7";
2
+ export declare const SERVER_VERSION = "0.6.8";
3
3
  export declare const NPM_PACKAGE_NAME = "wellness-nourish";
4
- export declare const PINNED_NPM_PACKAGE = "wellness-nourish@0.6.7";
4
+ export declare const PINNED_NPM_PACKAGE = "wellness-nourish@0.6.8";
5
5
  export declare const DEFAULT_HOST = "127.0.0.1";
6
6
  export declare const DEFAULT_PORT = 3000;
7
7
  export declare const LOCAL_DIR_NAME = ".wellness-nourish";
8
- export declare const USER_AGENT = "wellness-nourish/0.6.7 (https://wellness.delx.ai; contact: david@delx.ai)";
8
+ export declare const USER_AGENT = "wellness-nourish/0.6.8 (https://wellness.delx.ai; contact: david@delx.ai)";
9
9
  export declare const USDA_BASE_URL = "https://api.nal.usda.gov/fdc/v1";
10
10
  export declare const OFF_BASE_URL = "https://world.openfoodfacts.org";
package/dist/constants.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export const SERVER_NAME = "nourish-mcp";
2
- export const SERVER_VERSION = "0.6.7";
2
+ export const SERVER_VERSION = "0.6.8";
3
3
  export const NPM_PACKAGE_NAME = "wellness-nourish";
4
4
  export const PINNED_NPM_PACKAGE = `${NPM_PACKAGE_NAME}@${SERVER_VERSION}`;
5
5
  export const DEFAULT_HOST = "127.0.0.1";
package/docs/cli.md ADDED
@@ -0,0 +1,125 @@
1
+ # Wellness Nourish — CLI reference
2
+
3
+ Full command-line interface for [`wellness-nourish`](https://www.npmjs.com/package/wellness-nourish). Both `wellness-nourish` and `nourish-mcp` are valid binary names.
4
+
5
+ With no arguments the binary starts the stdio MCP server. `--http` starts the Streamable HTTP transport (`POST /mcp`), `--version` prints the package version, and `--help` prints usage.
6
+
7
+ ## Commands
8
+
9
+ ```bash
10
+ wellness-nourish status
11
+ wellness-nourish doctor
12
+ wellness-nourish setup --client claude
13
+ wellness-nourish search banana
14
+ wellness-nourish barcode 0000000000000
15
+ wellness-nourish log --preview --meal breakfast "2 eggs and banana"
16
+ wellness-nourish log "2 eggs and banana"
17
+ wellness-nourish list 2026-05-05
18
+ wellness-nourish edit --entry intake_id --meal snack --notes "corrected"
19
+ wellness-nourish today --format markdown
20
+ wellness-nourish weekly --format markdown
21
+ wellness-nourish goals --set-calories 2200 --set-protein 120 --set-water 2500
22
+ wellness-nourish water 500 --date 2026-05-05
23
+ wellness-nourish water today --date 2026-05-05
24
+ wellness-nourish export --format csv
25
+ wellness-nourish clear-day 2026-05-05 --yes
26
+ wellness-nourish delete --entry intake_id
27
+ ```
28
+
29
+ ## Behavior notes
30
+
31
+ - `log --preview` estimates a meal locally **without writing anything**.
32
+ - Mutating MCP tools require explicit user intent; CLI commands are treated as explicit user actions, while destructive `clear-day` requires `--yes`.
33
+ - The local estimator understands common lightweight portions such as `g`, `oz`, `cup`, `tbsp`, `tsp`, `slice`, `piece`, and `serving`. It still reports confidence and warnings because these are conservative tracking estimates, not lab-grade nutrition facts.
34
+
35
+ ## Install / build / run
36
+
37
+ ```bash
38
+ npm install
39
+ npm run build
40
+ npm start # stdio MCP server
41
+ node dist/index.js --http # Streamable HTTP locally
42
+ ```
43
+
44
+ ## Optional environment
45
+
46
+ ```bash
47
+ FDC_API_KEY=your_usda_key
48
+ NOURISH_OFF_ENABLED=1
49
+ NOURISH_LOCAL_DIR=~/.wellness-nourish
50
+ NOURISH_MCP_PORT=3000
51
+ ```
52
+
53
+ Agents should never ask users to paste API keys, tokens, raw health exports, or private food logs into chat. Configure secrets through environment variables or local files.
54
+
55
+ ## ChatGPT App / MCP Apps UI
56
+
57
+ Nourish also exposes a compact MCP Apps-compatible dashboard for ChatGPT and other compatible hosts:
58
+
59
+ - Tool: `nourish_chatgpt_dashboard`
60
+ - UI resource: `ui://widget/nourish-dashboard-v1.html`
61
+ - MIME type: `text/html;profile=mcp-app`
62
+
63
+ The dashboard shows the daily nutrition summary, hydration progress, profile gaps and next-meal coaching, and it can call `nourish_estimate_meal` from the embedded UI for preview-only estimates. It does not write intake, water or goals; mutating tools still require explicit user confirmation through the normal MCP tools.
64
+
65
+ ## MCP client config examples
66
+
67
+ Ready-to-use examples live in [`examples/`](../examples):
68
+
69
+ - `examples/claude-desktop.json`
70
+ - `examples/codex.json`
71
+ - `examples/cursor.json`
72
+ - `examples/windsurf.json`
73
+ - `examples/hermes.md`
74
+ - `examples/hermes-skill.md`
75
+ - `examples/openclaw.md`
76
+
77
+ Claude Desktop style:
78
+
79
+ ```json
80
+ {
81
+ "mcpServers": {
82
+ "nourish": {
83
+ "command": "npx",
84
+ "args": ["-y", "wellness-nourish"],
85
+ "env": {
86
+ "FDC_API_KEY": "${FDC_API_KEY}",
87
+ "NOURISH_OFF_ENABLED": "1"
88
+ }
89
+ }
90
+ }
91
+ }
92
+ ```
93
+
94
+ Local build:
95
+
96
+ ```json
97
+ {
98
+ "mcpServers": {
99
+ "nourish": {
100
+ "command": "node",
101
+ "args": ["/absolute/path/to/wellness-nourish/dist/index.js"],
102
+ "env": {
103
+ "NOURISH_LOCAL_DIR": "/absolute/path/to/.wellness-nourish"
104
+ }
105
+ }
106
+ }
107
+ }
108
+ ```
109
+
110
+ ## Development and tests
111
+
112
+ ```bash
113
+ npm run typecheck
114
+ npm run build
115
+ npm run smoke:http
116
+ npm run test:cli-ux
117
+ npm run test:agent-readiness
118
+ npm test
119
+ ```
120
+
121
+ Fixture mode:
122
+
123
+ ```bash
124
+ NOURISH_FIXTURE_MODE=1 NOURISH_FIXTURE_DIR=fixtures npm run test:cli-ux
125
+ ```
@@ -0,0 +1,21 @@
1
+ # Wellness Nourish — providers & attribution
2
+
3
+ ## Data providers
4
+
5
+ The connector uses **USDA FoodData Central** as the primary food search provider. **Open Food Facts** is used for packaged-food barcode lookup and product-name search when enabled (`NOURISH_OFF_ENABLED=1`). Local barcode image decoding is supported with **ZXing**.
6
+
7
+ Meal photos are estimated only from an agent-provided visual observation and always require confirmation before logging. The local estimator includes a pt-BR/Brazilian-food catalog for common meals, kitchen units, and shortcuts such as arroz, feijão, frango, ovos, banana, tapioca, picanha, feijoada and salada.
8
+
9
+ The connector does **not** provide hosted sync, autonomous photo upload, recipe generation, or medical advice.
10
+
11
+ ## Attribution requirements
12
+
13
+ USDA FoodData Central is the primary provider for generic food search and nutrient data. USDA data is public domain or otherwise provided by USDA FoodData Central terms; keep provider attribution with derived results.
14
+
15
+ Open Food Facts barcode data is licensed under the Open Database License (ODbL). Open Food Facts metadata has share-alike obligations, so agents and downstream tools should preserve attribution and license metadata when exporting or reusing packaged-food records.
16
+
17
+ ## Privacy (full detail)
18
+
19
+ Intake data is stored locally under `~/.wellness-nourish/intake.jsonl` unless `NOURISH_LOCAL_DIR` is set. Hydration is stored in `hydration.jsonl`, and goals are stored in `goals.json` in the same local directory. The connector does not require hosted accounts and does not send local intake logs to Delx Wellness. Provider lookups may contact USDA FoodData Central or Open Food Facts unless fixture mode is enabled.
20
+
21
+ Use `nourish-mcp export` to print the local JSONL export, `nourish-mcp export --format csv` for CSV, `nourish-mcp delete --entry <id>` to delete a specific intake entry, or `nourish-mcp clear-day <date> --yes` to delete all intake entries for a day.
@@ -0,0 +1,37 @@
1
+ # Wellness Nourish — Hermes / Telegram personal setup
2
+
3
+ For a personal Hermes server connected to your Telegram bot, let the package write the Hermes config and skill:
4
+
5
+ ```bash
6
+ npx -y wellness-nourish setup --client hermes --profile david --local-dir /root/.hermes/nourish/david
7
+ npx -y wellness-nourish doctor --client hermes --json
8
+ hermes mcp test nourish
9
+ ```
10
+
11
+ This adds a `nourish` MCP server block to `~/.hermes/config.yaml`, installs `~/.hermes/skills/nourish-mcp/SKILL.md`, and pins the npm package version. After config changes, use `/reload-mcp` or `hermes mcp test nourish`.
12
+
13
+ Hermes setup also writes `~/.hermes/scripts/nourish-mcp-wrapper.sh`. The wrapper sources `~/.hermes/secrets/nourish.env` when present, so `FDC_API_KEY` can be managed as a server-side secret without pasting it into chat or relying on a stale shell session.
14
+
15
+ ## Recommended Telegram flow
16
+
17
+ 1. User says what they ate.
18
+ 2. Hermes calls `nourish_estimate_meal` and replies with calories, protein, confidence and warnings.
19
+ 3. For barcode photos, Hermes calls `nourish_lookup_barcode_image` when it has an image path, base64 image, or data URI.
20
+ 4. For mixed food photos, Hermes calls `nourish_analyze_food_image` with barcode observations, label OCR, detected items, or image description.
21
+ 5. For meal photos, Hermes describes visible food and portions, calls `nourish_estimate_meal_photo`, and asks for portion confirmation.
22
+ 6. For "what should I eat now?" questions, Hermes calls `nourish_daily_coach` or `nourish_suggest_next_meal`, optionally passing wearable context from WHOOP/Garmin/Oura.
23
+ 7. For repeated meals, Hermes can call `nourish_remember_meal` after explicit user intent so future phrases like "meu café normal" expand locally.
24
+ 8. User confirms saving.
25
+ 9. Hermes calls `nourish_log_intake` with `explicit_user_intent: true`.
26
+ 10. User can ask for `today`, weekly summaries, goals, hydration, edits, deletes or exports.
27
+
28
+ ## One-command alternative
29
+
30
+ Both runtime bundles preconfigure this connector plus the full Delx Wellness stack into a dedicated profile:
31
+
32
+ ```bash
33
+ npx -y delx-wellness-hermes setup
34
+ hermes -p delx-wellness
35
+ ```
36
+
37
+ See [`delx-wellness-hermes`](https://github.com/davidmosiah/delx-wellness-hermes) and [`delx-wellness-openclaw`](https://github.com/davidmosiah/delx-wellness-openclaw).
package/llms.txt CHANGED
@@ -12,6 +12,7 @@ Agent surfaces:
12
12
  - For Telegram/Hermes meal logging, estimate first, show calories/protein/confidence/warnings, then call mutating tools only after explicit user confirmation.
13
13
  - Use nourish_analyze_food_image for routed image observations; use nourish_lookup_barcode_image when the image is likely a barcode.
14
14
  - Prefer JSON responses for automation and markdown responses for human summaries.
15
+ - Detailed docs: docs/cli.md for CLI/client config, docs/providers.md for attribution/privacy, docs/telegram.md for Hermes/Telegram setup.
15
16
  - Link human users to https://github.com/davidmosiah/wellness-nourish when they want source, issues, examples, or to star the project.
16
17
  Safety:
17
18
  - Do not paste credentials, OAuth tokens, refresh tokens, API keys or raw private exports into chat.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wellness-nourish",
3
- "version": "0.6.7",
3
+ "version": "0.6.8",
4
4
  "description": "Local-first nutrition MCP server for AI agents: food search, barcode lookup, meal photos, hydration, goals and safe intake logging.",
5
5
  "license": "MIT",
6
6
  "funding": {
@@ -91,7 +91,8 @@
91
91
  "qs": "6.15.2",
92
92
  "hono": "4.12.27",
93
93
  "fast-uri": "3.1.2",
94
- "ip-address": "10.2.0"
94
+ "ip-address": "10.2.0",
95
+ "esbuild": "0.28.1"
95
96
  },
96
97
  "publishConfig": {
97
98
  "access": "public"
package/server.json CHANGED
@@ -6,12 +6,12 @@
6
6
  "url": "https://github.com/davidmosiah/wellness-nourish",
7
7
  "source": "github"
8
8
  },
9
- "version": "0.6.7",
9
+ "version": "0.6.8",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "identifier": "wellness-nourish",
14
- "version": "0.6.7",
14
+ "version": "0.6.8",
15
15
  "transport": {
16
16
  "type": "stdio"
17
17
  }