Overview
A TypeScript implementation of the Cooklang spec. Cooklang is a plain-text format for recipes (ingredients, cookware, and timers are marked inline with a light syntax), and this parser turns a .cook file into a structured object you can render, scale, or feed into a shopping-list builder.
I now use it to power the recipe section of this site.
Features
- Full spec compliance (ingredients, cookware, timers, metadata)
- Typed output (full TypeScript definitions)
- Parses metadata blocks (servings, prep time, source, etc.)
- Step-by-step parsing with ingredients linked to the steps that use them
Use Cases
- Recipe sites and apps
- Meal planners
- Shopping-list generators
- Recipe scaling and unit conversion
Technology Stack
- TypeScript
- Vitest
- Published to npm