README file from
GithubNosh
An Obsidian nutrition tracker built around DASH (Dietary Approaches to Stop Hypertension).
Nosh reads the notes you already keep, adds up what you log, and charts it against DASH targets: nine nutrients plus food-group servings. Everything stays in your vault unless you turn on the optional AI features.

Website: nosh.health
Disclosures
Nosh works offline. The optional Nosh AI features stay off until you add an API key. With them on:
- Network use. What you type into a draft, the line you select for Add to
log, the note you ask about or edit, a restaurant you name, and any photo you
take are sent to the Anthropic API at
api.anthropic.com, and only when you press the button that sends them. There is no telemetry and no other network use. - Account and cost. Nosh AI needs an Anthropic developer platform account, and every request is billed to it at API rates. A claude.ai subscription can't be used; Credentials explains why.
- Links to claude.ai. Drafted meal notes with a method include a Cook this with Claude link. Clicking it opens claude.ai in your browser with the recipe in the page address. Nothing is sent until you click.
- Where the key lives. Your API key is kept in Obsidian's keychain, on the
device and outside the vault, so it doesn't sync: each device you use Nosh AI
on needs it added once. Obsidian older than 1.11.4 has no keychain, so
there it's stored in plain text in
data.jsonin the plugin folder, inside your vault. See Credentials. - Apple Health. With Write totals for Apple Health on, Nosh keeps the last week's nutrient totals in a note in the Nosh folder. A Shortcut you set up reads that note and writes to Health. Nosh itself never opens Health or any other app. See Apple Health.
- The notes Nosh looks at. To find your foods, log notes and targets note, Nosh goes through the vault's Markdown notes using the tags and frontmatter Obsidian already has for each. It only reads a note's text when it's one Nosh works with or one you point it at. The Only look in the Nosh folder setting limits the search for foods to that folder.
No accounts with the author, no payments, no ads. Nosh never reads or writes files outside the vault, and runs no other programs.
UI
Nosh lives in the sidebar on desktop and mobile.
Tagging notes
Tags decide whether a note is a meal or an ingredient:
tags:
- nutrition/meal # or nutrition/ingredient
The flat pair #nutrition + #meal works too, and the umbrella tag is
configurable. Every note Nosh writes, reports included, also carries the
umbrella tag on its own, so a property filter or a Bases view on nutrition
finds them all. Add the nutrition tag to existing notes in the command palette
adds it to notes written before that. Folders don't matter. The Nosh folder setting only controls where
new notes go (Meals, Ingredients, Reports, Log and
the targets note), though Only look in the Nosh folder limits
the search for foods to it.
Frontmatter
Every number is per serving. Missing fields count as zero.
| Field | Meaning |
|---|---|
calories protein_g carbs_g fat_g sat_fat_g |
the four a recipe card prints, plus saturated fat |
fiber_g sodium_mg potassium_mg calcium_mg |
the ones DASH judges you on |
serv_grains serv_vegetables serv_fruit serv_dairy |
DASH food-group servings |
serv_meat serv_fats serv_nuts serv_legumes serv_sweets |
and the rest of them |
amount |
the portion the numbers describe, such as "1 cup" or "1 medium" |
meal_type |
when it is usually eaten. A hint, since the occasion is chosen when you log |
group |
override the food group an ingredient files under |
The picker files each ingredient under the food group it contributes most to, worked out from its servings.
Logging
Pick an occasion (breakfast, lunch, dinner, snacks and drinks, dessert), then what you ate. The occasion belongs to the log entry, not the note, so a banana can be breakfast one day and dessert the next.
Each occasion starts with a Recent section: up to eight foods logged there in the past month. While an occasion is empty, a button copies the last one (Copy yesterday's breakfast).
Anything ticked also shows in a Currently selected section at the top of the list, so you can see what a meal holds without scrolling. Ticking a box, switching between Meals and Ingredients, or changing occasion keeps the list where it was instead of jumping back to the top.
Tick meals, tick ingredients, or build a meal from ingredients. A build can be logged as a one-off or saved as a meal note:
components:
- note: "[[Oatmeal]]"
servings: 1
- note: "[[Almond Milk]]"
servings: 0.5
Meal totals are recomputed from their components on every read, so fixing an ingredient fixes every meal and day that used it. The totals are also written to frontmatter for Dataview and anyone reading the note.
The ticked-list button next to the filter shows only what's ticked. Rows you untick there stay visible until you leave, so you can undo a slip.
Log notes
Each day is also written to a note in the Log folder:
---
day: 2026-09-17
log:
- note: "[[Oatmeal]]"
occasion: Breakfast
servings: 1
- note: "[[Banana]]"
occasion: Snack
servings: 1.5
tags:
- nutrition/log
---
The note is the record and the plugin's store is a cache. Edit the frontmatter
and the day updates; delete the note and the day clears. Notes synced from
another device are read the same way. Anything you write outside the list
markers is kept, and emptying a day only deletes its note if you haven't added
your own text. Log notes can live in any folder as long as they keep the
nutrition/log tag and their name. You can turn them off in settings.
With Dataview, every day you ate a banana:
TABLE log
FROM #nutrition/log
WHERE contains(string(log), "Banana")
SORT file.name DESC
The targets
Your targets live in a note called Nosh targets in the Nosh folder:
---
nosh: targets
diet_calories: 1750
diet_sodium: 1500
targets:
calories: 1750
protein_g: 130
fiber_g: 35
sodium_mg: 1500
servings:
serv_vegetables:
min: 5
max: 6
shapes:
calories: floor
weights:
protein_g: 2
hidden:
- carbs_g
tags:
- nutrition/targets
---
The tables underneath are a readable copy. The note holds every figure from settings: nutrient targets, food-group ranges, bar shapes, weights, hidden bars, and the calorie and sodium pattern the Fill button uses.
It exists because data.json is read once at startup and rewritten whole on
every log, so a second device left open could write stale targets back over
ones you'd just changed. The note wins over data.json. Edit it and the
targets follow on every device. Delete it and it's written again from the
current figures.
No note is written until you change a target. Like log notes, it answers to its tag, so you can move it anywhere. Turn it off with Keep the targets in a note.
The score
A ring shows a score out of 100 for the day, week or month on screen. It's the weighted average of how close each visible bar is to its target. Weights default to 1 and can be changed per bar in settings. The line beside the ring names the three bars costing the most; tap it for the breakdown.
Each bar is a floor, ceiling, range or reference (reference bars are grey and unscored). Defaults follow DASH: protein, fibre, potassium and calcium are floors; calories, fat, saturated fat and sodium are ceilings; carbs is a reference. Among food groups, fats & oils, lean meat and sweets are ceilings. Change any of them in settings.
floor (minimum m) credit = min(1, v / m)
ceiling (maximum M) credit = 1 while v ≤ M
= max(0, 1 − (v − M) / M) past it
range (m … M) the floor rule below m, the ceiling rule
above M, 1 in between
today (pace p = min(1, kcal so far / kcal target))
m becomes m × p for every floor and range
- Calories only count when over target, unless you make them a floor.
- Hidden bars and bars with a target of 0 are skipped.
- Weekly food groups count in the week's score, not the day's.
- Today is paced: floors scale with the share of calories eaten so far, so the day starts at 100 and moves with each meal. Ceilings aren't paced.
Weeks and months average each bar over the days with something logged, so an unlogged day is skipped rather than scored as zero. Green is 90 and up, amber from 70.
The month
The Month tab is a calendar with tiny nutrient bars in each day, so you can see which days went green, which went red, and which are empty. Tap a day to open it.
Reports
Export a day, week or month as a markdown note: totals, bars, a By food table (one row per food, the largest value in each column in bold, so you can see what brought the sodium), and day-by-day detail.
Month reports average over logged days against daily targets and add two tables: Against last month and By week. A month in progress stops at today. Reports also give reach (how close the floors got) and excess (the worst overshoot of any ceiling).
Each span has one report (Nosh 2026-09). Exporting again overwrites it,
including anything you typed into it. Saved chats (below) are the one thing it
keeps.
Apple Health
Nosh can send each day's nutrient totals to Apple Health through a Shortcut on your iPhone. Obsidian plugins can't reach Apple Health, so the Shortcut reads the totals from a note Nosh writes.
Turn on Write totals for Apple Health in settings. Nosh then keeps a note
called Nosh health in the Nosh folder, with the last seven days of totals as
one line of JSON. It rewrites the note whenever you log something or edit a
food. Days with nothing logged are left out. Food-group servings stay in Nosh,
since Health has no type for them.
The quickest way is to add the ready-made Nosh to Health shortcut on your iPhone, then open it and point its first action, Get File from Folder, at your own vault's Nosh folder. Run it once by hand: it asks to read the folder and to write each nutrient to Health, and needs a yes to all of them. That run sends today's totals, so add the nightly automation below tomorrow, or today will be counted twice.
- Tap the folder in Get file from and pick the Nosh folder in your own
vault. Leave the path as
Nosh health.md. - Tap ▶ to run it once and allow each permission it asks for.
[!WARNING] Run the Shortcut only once a day, by hand or by the automation. Health adds up every sample it's given, so a second run adds that day's food again.
To build it yourself instead, make a shortcut in the Shortcuts app called Nosh to Health with these actions.
- Get File from Folder. Pick your vault's Nosh folder, and type the path
Nosh health.md. - Match Text with the pattern
\{.*\}, in the file. - Get Dictionary from Input, on the matches.
- Format Date on Current Date. Expand the action, set Date Format to
Custom, and type
yyyy-MM-ddas the Format String. The date box itself holds only Current Date. - Get Dictionary Value for the formatted date, in the dictionary from step 3.
- Set Variable, named
Today. Drag it in directly under step 5 and leave its input alone, so it fills in as Dictionary Value. - If
Todayhas any value. Everything below goes inside the If, so a day with nothing logged sends nothing. - For each row of the table below, Get Dictionary Value for the key, in
Today. Directly under it, drag in a fresh Log Health Sample, and its value fills in from the lookup above. Set the type and unit from the table.
Shortcuts names the output of every lookup Value, so picking one from a list often gets the wrong one. Dragging each new action in directly under the one it reads from avoids the list. If a box shows Name or Keys instead, delete that action and drag it in again.
| Key | Health type | Unit |
|---|---|---|
calories |
Dietary Energy | kcal |
protein_g |
Protein | g |
carbs_g |
Carbohydrates | g |
fat_g |
Total Fat | g |
sat_fat_g |
Saturated Fat | g |
fiber_g |
Fiber | g |
sodium_mg |
Sodium | mg |
potassium_mg |
Potassium | mg |
calcium_mg |
Calcium | mg |
To run it every night, add an automation in the Automation tab. Choose Time of Day, set a time late in the evening once you're done eating for the day (11:45 PM, say), pick Run Immediately, and choose Nosh to Health. The first run asks permission to write each type to Health.
Keep the time before midnight. The Shortcut sends the current date's totals, so an automation at 3:00 AM looks for a day that has only just started, finds nothing logged, and sends nothing. Anything logged after the automation runs never reaches Health.
Obsidian Sync updates the vault on your iPhone only while Obsidian is open
there. Food logged on another device reaches the phone's copy of Nosh health
the next time you open Obsidian on the phone. If you log mostly on a computer,
open Obsidian on the phone sometime before the automation runs. You can also start the
Shortcut with Open App (Obsidian) and Wait 30 seconds. Test that with the
phone locked, since iOS can stop an automation from opening an app.
Nosh AI (optional)
Off until you add an API key. It adds:
-
Drafting, several ways in. Each ends at the same draft card, and Claude decides whether it's an ingredient (one food, one product, a nutrition panel) or a meal (a dish, or a plate of several things):
- Draft, above the Ingredients and Meals tabs: describe what you ate.
- The camera beside it: photograph a label or a plate. You can add a note like half of it before sending.
- Add to log, from any note: select a line you wrote (below).
- Edit this meal, from a note's menu: say what changed (below).
- Eating out, then Ate out at the restaurant (below).
The draft lists each ingredient with a portion you can correct, and the nutrients recompute from those. The list switches to the tab the note will land in.
-
What's for… Suggests a meal that fits what's left of your day, with a method. It asks how many you're cooking for, how much effort you want, and what needs using up.
-
Eating out? Give it a restaurant's name or a Google or Apple Maps link. Claude looks up the menu, using the chain's published nutrition where there is any, and offers three orders that fit what's left of your day, the best fit first. Each comes with any changes to ask for and its figures, plus links to the menu it used. Nothing is logged yet: the orders are kept in a note under
Eating out, so you can decide at the table. Web searches are billed on top of the tokens, a few cents a time. -
Ate out. While orders are kept, the Eating out button becomes Ate out at the restaurant. After the meal, pick the order you had, adjust any portion (half of it boxed, say), and it's logged to the meal you asked about. The meal note lists the other options too. Had something else? Say what you had, and Claude estimates it at restaurant portions. The × beside it clears the orders if you never went. Never asked at all? Press Eating out, then Already eaten.
-
Drafts are kept. Close a card without Cancel (a tap outside it, Escape) and it waits in the Drafts section under the Draft button until you reopen it. Words you typed and didn't send show there as not sent. A draft card that came back from Claude keeps your portion and name changes, and can also be reopened from the notice or with Reopen unsaved draft. So an answer you paid for isn't lost to a stray tap. Up to ten are kept, newest first, on that device only. The × beside one discards it.
-
Add to log. Select a line in any note, such as 2 eggs scrambled in butter, and choose Add to log from the right-click menu or the command palette. With nothing selected it uses the line the cursor is on. Claude decides whether it's a meal or an ingredient and opens the usual draft. Once the note is written, the words move into it under As written, and a link replaces them.
-
Edit this meal. From a meal or ingredient note's menu, say what changed (it was brown rice, not white, half the cheese) and Claude redrafts it. Check the portions on the draft, then Save changes rewrites the note in place. Properties and tags you added, and any Asked about this recipe or As written sections, are kept.
-
Ask about this recipe. Question any recipe note (where the sodium comes from, how to stretch it, what to serve with it) from the command palette or the right-click menu. Save to note appends the conversation.
-
Readings. An optional section on exported reports. A day or week gets patterns, what to watch, and suggestions for tomorrow or next week. A month gets progress and suggestions for next month, ranked by what costs the score most. Each suggestion names a food from your log. Only the report's tables are sent.
-
Let's chat. Talk over a day, week or month with Claude, using the button under the score or the command. Ask what to add, what to cut back on or what to swap, then keep going from there. Claude gets the same tables a report holds, plus the names of your meal and ingredient notes, so a swap can be something you already have. Save to note adds the conversation to that span's report, and exporting the report again keeps it.
Estimating, inventing meals and Eating out each have their own model setting, so the frequent job can use a cheaper model and the one you wait on a faster one. Each can be Sonnet 5, Sonnet 5.5, Opus 5, Opus 5.5 or Haiku 5.5. Sonnet 5.5 is the default for estimating and for Eating out, and Opus 5.5 for suggestions. Sonnet 5.5 costs the same as Sonnet 5. Opus 5.5 costs less than Opus 5, at about twice Sonnet's price. Haiku 5.5 costs about a twentieth of Sonnet's price, and suits plain foods that need little judgement.
On a phone, switching to another app while Claude is answering cuts the call off, because plugins can't run in the background. When you come back to Obsidian, Nosh asks again by itself. Whatever you typed into What's for…, Eating out, Ate out or the Draft card is kept until it gets an answer, even if Obsidian was closed.
Each answer shows roughly what it cost, with the model and token counts, under the draft card or the recipe answer. For a reading, it shows as a notice, so it stays out of the report. The figure uses list prices, including any web searches, so a negotiated rate will make your bill differ.
Credentials
Nosh AI uses an API key from platform.claude.com, and every request is billed to that account at API rates. It works on desktop and mobile.
The key is kept in Obsidian's keychain (Obsidian 1.11.4 and later), not in the vault. That keeps it out of whatever the vault syncs to, but it also means the key doesn't travel with the vault. Obsidian Sync doesn't carry it, and neither does anything else. Each device keeps its own copy, and Obsidian keeps the keychain per vault too.
To set it up:
- Open Settings → Nosh → AI → API key to bring up the keychain picker.
- Add a secret named
nosh-anthropic-api-keyand paste in your key, or pick one already there. - Press Test.
Do this once on every device, and in every vault, that you use Nosh AI in.
More than one device
- One key is enough for all of them. A key isn't tied to a device, and using it on several at once is fine.
- The picker shows the same name,
nosh-anthropic-api-key, on every device, but each device has its own value behind it. Seeing the name on one device says nothing about what another holds, and changing the key on one device leaves the others as they were. - Deleting or rotating a key on platform.claude.com breaks every device still holding it. Put the new key on each of them.
If Test fails
- No API key set. This device's keychain has nothing for Nosh. Add the key as above.
- API key is invalid, or another message from Anthropic. Nosh found a key on this device and Anthropic refused it: the copy here is revoked, out of date, or was pasted incompletely. Press the eye icon in the picker to compare it with the keys listed on platform.claude.com, then delete the entry and add it again with a working key.
- Could not reach api.anthropic.com. The connection is the problem, not the key.
A key an earlier version of Nosh kept in data.json moves to the keychain the
first time Nosh loads. Before 1.2.2, which keychain entry to use was stored in
data.json and synced, so picking a different entry on one device could leave
another looking for an entry it didn't have. From 1.2.2 each device remembers
its own choice.
On Obsidian older than 1.11.4 there is no keychain, and the key stays in plain
text in data.json in the plugin folder, where it does sync. Mixing old and
new Obsidian doesn't work well: a device with a keychain moves the key out of
data.json, and the older device loses it. Update Obsidian on every device.
On older Obsidian, other plugins, sync services and any repository you commit the vault to can read
data.json. Don't commit it. This repository ignores it.
Why there's no "sign in with Claude": Anthropic's consumer terms only allow a Pro or Max login in Claude Code and claude.ai, and Anthropic blocks it elsewhere. Sign in with ChatGPT doesn't carry model access into other apps either. Until a sanctioned option exists, an API key is the honest route.
Install
Search for Nosh under Settings → Community plugins → Browse, or open its community plugin page and choose Add to Obsidian.
To install by hand, download main.js, manifest.json and styles.css from
the latest release into
<vault>/.obsidian/plugins/nosh/, then enable Nosh under
Settings → Community plugins.
Try it
The Add button under Sample notes in settings (or the Add sample notes command) writes an ingredient for every food group and three meals, with figures rounded from USDA FoodData Central. They're ordinary notes. Running it again won't touch ones you've edited.
Companion skills
skills/ holds two Agent Skills
for Claude that write ingredient and meal notes in Nosh's format, so a meal you
describe in chat lands in your vault ready to log. Each SKILL.md explains
setup.
Credit
Targets follow the DASH 2,000 kcal pattern and are editable in settings. They're a starting point, not medical advice.
MIT licensed.