🍳 Foodlang

CLI: Getting Started

foodlang is the command-line tool for working with .food.yaml files. It parses and validates recipes, classifies them across the seven Foodlang levels, prints a summary, and compiles to any target — all from your terminal.

It follows the UNIX philosophy: each command does one thing well.

Commands

Command Description
validate Validate a recipe and classify its Foodlang levels
inspect Print a human-readable summary of a recipe
compile Compile a recipe to a target format
targets List available compiler targets and their fidelity

validate

foodlang validate examples/simple-latte.food.yaml
Validation: PASS

Levels:
  readable: pass
  parseable: pass
  structured_ingredients: pass
  process_aware: pass
  appliance_mappable: pass
  robot_plannable: pass
  industrial_mappable: partial

Warnings:
  - Home Connect program names are illustrative and may vary by appliance.
  - OPC UA node IDs are not specified; output is a mapping, not executable network code.

A recipe with blocking errors exits non-zero, so validate slots straight into CI and pre-commit hooks.

inspect

foodlang inspect examples/simple-latte.food.yaml
Recipe: Simple Latte
Ingredients: 4
Steps: 4
Transformations: 3
Equipment: 3
Targets: opcua, home_connect, mqtt
Robot actions: 4
Exports available: cooklang, schema-org, orf, pddl, foon, opcua, s88

compile

foodlang compile <file> --target <target>
foodlang compile examples/simple-latte.food.yaml --target schema-org
foodlang compile examples/simple-latte.food.yaml --target cooklang
foodlang compile examples/simple-latte.food.yaml --target opcua
foodlang compile examples/simple-latte.food.yaml --target pddl

Output goes to stdout, so it composes with everything else:

foodlang compile examples/simple-latte.food.yaml --target schema-org > latte.jsonld

targets

foodlang targets
cooklang             [illustrative] Human-friendly Cooklang recipe (lossy).
schema-org           [executable ] Schema.org Recipe JSON-LD for web publishing.
orf                  [executable ] Open Recipe Format-style YAML with X-foodlang stripped.
opcua                [mapping    ] OPC UA recipe-parameter mapping (mapping only, not networking).
mqtt                 [mapping    ] MQTT command topic + payload (mapping only).
home-connect         [illustrative] Home Connect-style appliance program mapping (illustrative).
matter               [illustrative] Matter device/command mapping (illustrative).
robot-action-graph   [mapping    ] Robot action graph JSON (DAG of actions).
pddl                 [illustrative] Illustrative PDDL domain + problem (planner-compatible shape).
foon                 [illustrative] FOON-style functional units (input/motion/output nodes).
s88                  [mapping    ] ISA-88/S88-style batch procedure (industrial inspiration).

What's next?