Recipe Search
Find and filter recipes in ./recipes/ based on user criteria.
Search Strategy
Recipes are markdown files with YAML frontmatter. Use grep to search frontmatter fields and ingredient lists.
By Ingredient
grep -rl "ingredient_name" ./recipes/
For multiple ingredients (ALL must match), chain greps or read each candidate and verify.
By Cuisine
grep -rl "^cuisine: Indian" ./recipes/
By Tag
grep -rl "tags:.*tagname" ./recipes/
By Dietary Restriction
grep -rl "dietary:.*vegetarian" ./recipes/
By Difficulty
grep -rl "^difficulty: easy" ./recipes/
Combining Filters
When user specifies multiple criteria (e.g., "easy vegetarian Indian recipes"):
- Start with the most restrictive filter.
- Read frontmatter of matching files.
- Apply remaining filters programmatically.
- Present results as a summary table.
"What Can I Make With..." Queries
When the user lists ingredients they have on hand:
- Search for recipes containing those ingredients.
- Rank by how many of the user's ingredients each recipe uses.
- Note which additional ingredients are needed.
- Present top matches with a "missing ingredients" list.
Output Format
Present results as a table:
| Recipe | Cuisine | Difficulty | Key Match |
|---|
If only one result, display the full recipe.