← docs1 min read

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…

manual

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 cache: a chore runs every time you invoke it, by design. Shell commands in a chore body are interactive by default (they get a real TTY), so fzf and friends just work.

chore clean
rm -rf build .cook
chore fmt
cargo fmt

Chores take parameters (required, defaulted, or variadic) which bind as shell variables and $<...> placeholders in the body:

chore deploy target host="prod.example.com"
rsync -a out/ "$<host>:$<target>"
Terminal window
cook deploy /var/www # host defaults to prod.example.com
cook deploy /var/www staging # arguments bind positionally, in header order

Chores and recipes depend on each other with the same colon syntax. cook play below builds first, then drops you into the binary:

chore play: build
./build/app