Recipe
The recipe
command parses and displays Cooklang recipe files. It's your primary tool for viewing recipes, validating syntax, and converting between formats.
Basic Usage
File extension is optional, that works too:
This displays the recipe in a human-readable format with ingredients, steps, and metadata clearly organized.
Menu Files
CookCLI also supports .menu
files for meal planning. Menu files can reference multiple recipes and organize them by meals or days:
Menu files use the same scaling notation as regular recipes, and the scaling applies to all recipe references within the menu.
Reading Recipes
The simplest way to view a recipe:
Scaling Recipes
Scale recipes on the fly using the :
notation or the --scale
flag:
All ingredient quantities are automatically adjusted:
Output Formats
Export recipes in different formats for various uses:
Human-Readable (Default)
Output:
JSON Format
Perfect for processing with other tools:
Output:
YAML Format
Markdown Format
Great for documentation or sharing:
Cooklang Format
Regenerate clean Cooklang markup:
Saving Output
Write the output to a file:
Pretty Printing
For JSON and YAML outputs, use --pretty
for formatted output:
Recipe Discovery
CookCLI can find recipes by name without the full path:
Advanced Examples
Recipe Analysis Pipeline
Combine with UNIX tools for analysis:
Batch Processing
Process multiple recipes:
Recipe Comparison
Compare scaled versions:
Common Issues
Recipe Not Found
If a recipe isn't found by name, try:
- Escaping whitespaces
- Checking you're in the right directory
See Also
- Shopping List – Create shopping lists from recipes
- Doctor – Validate recipe syntax and references
- Search – Find recipes by content