Homelab Haven

Using AI to Clean Up a Messy Mealie or Tandoor Recipe Collection

August 12, 20267 min read

Running Mealie or Tandoor already? This assumes you do — it's about the mess that builds up inside one, not which one to pick.

Every self-hosted recipe collection goes through the same decay. You import fast when you set the app up, tagging is an afterthought, and six months later you've got "Pasta 2," a recipe called "mom's thing," three different units for the same ingredient across three recipes, and a tag list that's really just a list of every word you typed once. None of that happens because the tools are bad — it happens because nobody tags consistently at 9pm while actually trying to cook.

An AI assistant is good at exactly the part of this that's tedious rather than hard: reading a pile of messy text and turning it into something structured and consistent. You don't need Claude Code or any kind of API access to get real value here — a plain ChatGPT or Claude chat window, some copy-pasting, and twenty minutes will fix most of it.

Summary

  • Messy titles, missing tags, and inconsistent units aren't a data problem, they're a time problem — AI is good at exactly that kind of tedious cleanup.
  • You can go from a copy-pasted wall of text to properly separated ingredients and steps with one prompt, ready to paste into Mealie's or Tandoor's manual recipe editor.
  • A general chat AI can't touch your recipe database directly — it can only produce text you paste in yourself. A coding assistant with API access (like Claude Code) can go further and edit the collection directly, for anyone who wants that.
  • Always spot-check quantities and units before trusting anything AI extracted from a handwritten or scanned recipe.

Why the mess happens in the first place

Both Mealie and Tandoor are good at importing a recipe from a URL — their built-in scrapers strip a cooking blog down to the actual recipe reliably. The mess comes from everything that doesn't arrive that way: a photo of a handwritten card, a recipe a friend texted you as a paragraph, something copy-pasted from a PDF that lost all its line breaks. None of that goes through the parser, so it lands in your collection as one blob of text in the instructions field, or doesn't get added at all because typing it out properly felt like too much effort in the moment.

Tags rot for a different reason: there's no feedback loop. Nothing stops you from tagging one recipe "quick" and another, equally quick recipe "weeknight" — both are reasonable, neither is wrong, and now you have two tags that mean the same thing to a human and nothing in common to a search filter.

Turning a wall of text into a real recipe

This is the single most useful thing to hand an AI assistant. Paste the messy text — copied from a website, a text message, or typed out from a photo — and ask for structure back.

Here is a recipe as raw text. Convert it into a clean, structured recipe with:

1. A short, specific title (not generic — include the main ingredient or method)
2. A one-sentence description
3. Ingredients as a list, one per line, each as: quantity | unit | ingredient | note
   (leave quantity/unit blank if the original doesn't give one — don't invent numbers)
4. Numbered steps, one action per step, rewritten for clarity but not changed in
   meaning
5. Suggested prep time, cook time, and servings, only if the original text states them
   — otherwise write "not specified"

Do not guess at quantities that aren't in the source text. Flag anything ambiguous
instead of resolving it silently.

Recipe text:
<paste here>

The "don't invent numbers" and "flag anything ambiguous" lines matter more than anything else in that prompt. Left alone, a chat model will happily fill in "1 tsp salt" for a recipe that just said "salt to taste," and that's exactly the kind of quietly wrong data you don't want sitting in a recipe you'll actually cook from later.

What comes back pastes cleanly into either app's manual recipe editor — Mealie's ingredient rows and Tandoor's ingredient/step forms both expect roughly this shape already, so there's no reformatting step in between.

Building a tag and category taxonomy that actually holds

The second most useful thing: getting your existing tags and categories to converge instead of drift. Export or just list what you currently have — both apps show a full tag list in their admin/organizer views — and ask for a cleanup pass rather than a rewrite from scratch.

Here is the full list of tags currently used across my recipe collection:
<paste tag list>

And the categories:
<paste category list>

Propose a consolidated taxonomy:
- Merge tags that mean the same thing and tell me which ones you merged and why
- Keep the total tag count reasonable — aim for a list I could realistically remember,
  not one tag per recipe
- Suggest a small, fixed set of categories (meal type, cuisine, or however my current
  data already leans) rather than inventing an unrelated structure
- Output an old-tag -> new-tag mapping table I can use to go through and re-tag things

The output is a mapping table, not magic — you still do the re-tagging yourself, recipe by recipe, in the UI. What the AI actually saved you is the decision-making: staring at forty tags and figuring out which four are secretly duplicates is the slow part, not clicking "rename."

Getting recipes into the app via the API instead of the UI

Both Mealie and Tandoor have a real REST API, and both publish interactive API docs from your own running instance — Mealie at /docs on your instance URL, Tandoor similarly through its DRF-based API browser. If you're comfortable with curl or a short script, you can skip the manual-entry step entirely: paste your instance's API docs (or just the relevant endpoint's schema) into the chat alongside the structured recipe text from the first prompt, and ask for the exact JSON payload and curl command to create that recipe via the API.

Here is the OpenAPI schema for my recipe manager's "create recipe" endpoint:
<paste from /docs on your instance>

And here is a structured recipe (title, description, ingredients, steps):
<paste your cleaned-up recipe>

Write the exact JSON payload and a curl command to POST this recipe to that endpoint.
Use a placeholder for the API key/token and my instance URL — don't assume a specific
hostname.

This is worth doing when you're bulk-importing more than a handful of recipes at once — pasting the same recipe into a web form ten times is exactly the kind of tedium a five-line script fixes. Test the first one, check that ingredients and steps landed correctly, then run the rest.

Going further: a coding assistant with real API access

Everything above works from a plain chat window because the AI never touches your recipe manager directly — it only ever produces text or a command that you run. If you're already using a coding assistant like Claude Code, you can wire it up with your instance's API key so it calls the API itself: bulk-renaming recipes to a consistent naming convention, re-tagging an entire collection in one pass against the taxonomy you agreed on, building a shopping list from a week of planned meals, or even migrating recipes between Mealie and Tandoor programmatically rather than by hand. I run a setup like this at home — a dedicated recipe-management agent with the API key scoped to just that instance — and it turns "re-tag 200 recipes consistently" from a weekend chore into something that runs in the background while I do something else.

That's a genuinely different tier of setup than pasting into a chat window, and it's not necessary to get most of the benefit here. Start with the prompts above. Reach for direct API access once you're doing the same cleanup step across dozens of recipes and the copy-paste itself becomes the bottleneck.

What to actually watch out for

  • Never trust AI-generated quantities on a recipe you didn't write. If the source text was vague, the AI should say so, not quietly supply a number. Spot-check anything that came from a scanned or handwritten source before you cook from it.
  • Keep the taxonomy small on purpose. A tag list an AI can help you generate in five minutes is also one it can help you over-generate in five minutes — resist accepting a 40-tag taxonomy just because it was offered.
  • API keys for either app are full read/write, the same as most self-hosted app APIs — treat one the same as any other credential if you wire up a script or agent against it, and don't expose it outside your own network.

Related

If this saved you some time, a coffee keeps the lights on and the posts coming.

☕ Buy me a coffee