Recipe

Parse and display Cooklang recipe files.

Usage

cook recipe [OPTIONS] [RECIPE]

Arguments

ArgumentDescription
[RECIPE]Recipe file to read (stdin if not specified). Supports full path, relative path, recipe name, or scaling syntax (recipe.cook:2). The .cook extension is optional.

Options

OptionDescription
-f, --format <FORMAT>Output format: human (default), json, yaml, cooklang, markdown, latex, typst, schema
-s, --scale <SCALE>Scaling factor for ingredient quantities (default: 1)
-o, --output <FILE>Output file (format inferred from extension)
--prettyPretty-print JSON and YAML output

Examples

# View a recipe
cook recipe &#34;Neapolitan Pizza&#34;

# Scale a recipe 2x
cook recipe &#34;Pasta.cook:2&#34;

# Export as JSON
cook recipe &#34;Neapolitan Pizza&#34; -f json --pretty

# Save as Markdown
cook recipe &#34;Neapolitan Pizza&#34; -f markdown -o pizza.md

# Read from stdin
cat recipe.cook | cook recipe

# View a menu file
cook recipe &#34;2 Day Plan.menu&#34;

Notes

  • The .cook extension is optional and added automatically
  • Scaling can use inline :N syntax or --scale N flag; inline takes precedence
  • Menu files (.menu) are supported and scaling applies to all referenced recipes
  • Output format is inferred from -o file extension when -f is not specified