Skip to content
CookDex docs

Data maintenance tasks

The tasks that clean and audit recipes. data-maintenance runs most of them as stages in one run; the others run one job on their own. For a walk-through, see Data maintenance pipeline.

Option Type Default Description
dry_run boolean true Preview changes without writing anything.
backup_first boolean true Create a Mealie backup before a live run. Hidden while dry_run=true.
stages string list all stages Select stages: dedup, junk, names, parse, foods, units, categorize, yield, quality, audit. The retired labels, tools, taxonomy and cookbooks stages are skipped.
confidence_threshold integer 70 Ingredient parser NLP confidence percentage. Lower accepts more NLP results and reduces AI fallback.
max_recipes integer unset Limit ingredient parsing when the parse stage runs.
no_cache boolean false Ignore the ingredient parser scan cache.
reason string all categories Limit junk filtering to one category.
force_all boolean false Normalize all names, not only unformatted names.
provider string configured default Override AI provider for categorization: chatgpt, anthropic, or ollama.
nutrition_sample integer 200 Nutrition sample size for the quality stage. Not used when the database is connected (coverage is exact then).
continue_on_error boolean false Keep running later stages if one stage fails.
apply_cleanups boolean false Dangerous. Allows cleanup stages to write changes. Hidden while dry_run=true.

Default stage order:

dedup -> junk -> names -> parse -> foods -> units -> categorize -> yield -> quality -> audit

Option Type Default Description
dry_run boolean true Preview changes without writing anything.
backup_first boolean true Create a Mealie backup before a live run. Hidden while dry_run=true.
run_dedup boolean true Remove imported duplicates with the same source URL.
run_junk boolean true Remove records missing both meaningful ingredients and usable instructions; report ambiguous title matches for review.
run_names boolean true Normalize names derived from URL slugs.
reason string all categories Limit junk filtering to one category.
force_all boolean false Normalize all recipe names, not only unformatted names.
Option Type Default Description
dry_run boolean true Only list the recipes that would change.
backup_first boolean true Create a backup before repairing addresses.

Live runs fix each recipe through Mealie’s API (saving its name with a trailing space and back, which makes Mealie regenerate the slug), or in one database transaction when the database is connected. Recipes whose name would take a slug another recipe already has are skipped and listed.

Option Type Default Description
dry_run boolean true Preview changes without writing anything.
backup_first boolean true Create a Mealie backup before a live run. Hidden while dry_run=true.
max_recipes integer unset Limit parsing to at most N recipes.
no_cache boolean false Ignore the scan cache and reprocess all unparsed recipes.
confidence_threshold integer 70 Minimum NLP confidence percentage before accepting a parse. Low-confidence lines fall back to AI parsing.
Option Type Default Description
dry_run boolean true Preview changes without writing anything.
backup_first boolean true Create a backup before filling servings.
Option Type Default Description
dry_run boolean true Preview eligible recipes.
backup_first boolean true Create a Mealie backup before a live run. Hidden while dry_run=true.
max_recipes integer unset Limit reimport to at most N recipes.
workers integer 2 Concurrent scrape workers, capped at 4.
delay number 0.5 Seconds between requests per worker.
resume boolean false Skip recipes in the durable completion checkpoint; previews do not overwrite it.
slugs string unset Comma-separated recipe slugs to reimport. Leave blank for all eligible recipes.

When invoking python -m cookdex.recipe_reimporter directly, writes require --apply; DRY_RUN=true still overrides that flag.

Reimport uses the Mealie API. When the database is connected and an older Mealie rejects an update with a 403 because of a slug mismatch, it repairs the slug and retries.

Option Type Default Description
scope_quality boolean true Score recipe completeness for categories, tags, tools, ingredients, cook time, yield, and nutrition.
scope_taxonomy boolean true Scan taxonomy for unused entries, duplicate names, and recipes missing categories or tags.
nutrition_sample integer 200 Nutrition sample size. Not used when the database is connected (coverage is exact then).

health-check is read-only and does not expose a dry_run option.