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…
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 fmtChores 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>"cook deploy /var/www # host defaults to prod.example.comcook deploy /var/www staging # arguments bind positionally, in header orderChores 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