The Cook Manual

The complete guide to the Cookfile language and the cook CLI. This is the friendly, read-top-to-bottom reference; the Cook Standard is the authoritative formal specification, and where the two disagree, the Standard wins. Every Cookfile snippet below is real v1.0 syntax.

The manual13 chapters · read in order

Start here

Read it top to bottom

Every Cookfile snippet is real v1.0 syntax. About an hour.

Chapter 1

Installation

cook is a single Rust binary with a bundled Lua runtime and a bundled LuaRocks. No package manager to fight, no system Lua to match, no separate…

Chapter 2

Your first recipe

cook init drops a minimal starter Cookfile and a .gitignore. The Cookfile is deliberately…

Chapter 3

Gather and the cook step

Real builds have a shape: take input files, transform each, produce outputs, don't redo the transform if nothing changed. gather and cook describe exactly…

Chapter 4

Connecting recipes

When one recipe's command reads another recipe's artifact, say so in the…

Chapter 5

Tests

A test step checks the things a cook step produced. It declares no outputs; its exit code is the verdict. A test inherits the preceding cook step's outputs as…

Chapter 6

Chores

Recipes build files. Chores are for everything else: clean the tree, run the formatter, deploy, open a picker. They have no gathered inputs, no outputs, and no…

Chapter 7

Configuration

A config block declares knobs. The base block is unnamed; named overlays are applied on top with @name at invocation. Values are declared on the var sink…

Chapter 8

Probes and data-driven fan-out

A probe is a named observation that the build graph can see: the output of a shell command, the contents of a JSON file, a recorded tool identity, a Lua…

Chapter 9

Caching and cache trust

The cache is cook's center of gravity. Every cacheable unit (a step with at least one declared output) has exactly one content-addressed key, computed from…

Chapter 10

Dropping into Lua

Most Cookfiles are pure surface syntax. Underneath, every Cookfile compiles to Lua, and you can reach for that API when the surface can't express what you…

Chapter 11

Modules and composition

Two complementary…

Chapter 12

The cook CLI

cook --help is the source of truth; this is the friendly…

Chapter 13

Where to go next

The Cook Standard is the authoritative language and execution specification (RFC-2119, with a formal grammar appendix). The runnable examples are arranged in…

Guidesshow, don't tell

Modulesone use line per ecosystem · the index

Elsewhere