MCPcopy Index your code
hub / github.com/Zheoni/cooklang-chef

github.com/Zheoni/cooklang-chef @v0.10.3

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.10.3 ↗ · + Follow
365 symbols 816 edges 43 files 31 documented · 8%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

cooklang-chef

A CLI to manage cooklang recipes with extensions.

The parser has been moved to cooklang/cooklang-rs

0.10.x will be the last version of chef published on crates.io.

0.15.x will be the last versions of cooklang-fs, cooklang-to-cooklang cooklang-to-human and cooklang-to-md published on crates.io.

What is cooklang

Cooklang is a markup language for cooking recipes. An in depth explanation can be found in cooklang.org.

An example cooklang recipe:

In a large #bowl mix @flour{450%g}, @yeast{2%tsp}, @salt{2%tsp} and
@warm water{375%ml}.

Cover the dough and leave on counter for ~{2-3%hour}.

Sprinkle work surface with @&flour{10%g} and shape the dough. Sprinkle the top
with some more @&flour{5%g}.

Bake with a preheated #oven at 230ºC for ~{30%min}.

What is cooklang-chef

chef is a CLI to manage, read and convert cooklang recipes.

I wanted a couple more features that cooklang did not have, so I extended the cooklang syntax and semantics a bit.

All regular cooklang files parse as the same recipe, the extensions are a superset of the original cooklang format. Also, the extensions can be turned off, so the parser can be used for regular cooklang if you don't like the extensions. All extensions except the multiline steps are enabled by default[^1].

[^1]: This is done to maximize compatibility with other cooklang parsers.

You can see a detailed list of all extensions explained in the parser repo.

Full user documentation here.

You can install chef with:

cargo install --git https://github.com/Zheoni/cooklang-chef/ --tag "v0.10.1" --locked

You can also get a prebuilt binary from the github releases.

After installing it, run:

chef config --setup

Key features:

  • Web UI. The CLI comes with an embedded web UI.
  • Scale and convert the quantities.
  • Hot reload of recipes. Just edit the .cook file and save.
  • Open the .cook file in a code editor.

  • Ingredient references. You can now refer to ingredients you already used before. I think the most important extension to the original cooklang. You can read about using references in this document.

  • Good error reporting. Error reports are a top priority.

This little recipe contain errors: ```cooklang

servings: 3|6|8

Add @water{1%kg}, mix, and ~{5 min} later add more @&water{1|2%L}. ```

  • Units. An ingredient quantity means nothing without a unit. This is why the units are parsed and checked. With units come:
  • Unit conversion. You can read your recipe in your prefered unit system.
  • Configurable units. You can add, remove and rename units.

Crates

Core symbols most depended-on inside this repo

is_empty
called by 34
src/config.rs
path
called by 20
src/util.rs
contains
called by 20
cooklang-fs/src/lib.rs
get
called by 18
src/cmd/serve/locale.rs
remove
called by 18
cooklang-fs/src/lib.rs
parser
called by 12
src/main.rs
run
called by 11
src/cmd/new.rs
parse
called by 9
src/util.rs

Shape

Function 181
Method 103
Class 63
Enum 18

Languages

Rust85%
TypeScript13%
Python1%

Modules by API surface

cooklang-fs/src/lib.rs55 symbols
src/config.rs27 symbols
ui/assets/js/main.js24 symbols
src/util.rs21 symbols
cooklang-to-md/src/lib.rs19 symbols
src/cmd/serve/async_index.rs16 symbols
src/cmd/units.rs15 symbols
cooklang-to-human/src/lib.rs15 symbols
cooklang-fs/src/walker.rs15 symbols
ui/assets/js/timer.js13 symbols
src/cmd/serve/locale.rs13 symbols
src/cmd/serve/mod.rs12 symbols

For agents

$ claude mcp add cooklang-chef \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page