CookCLI: Getting Started
The CookCLI helps you manage recipes, generate shopping lists, and automate your cooking workflow with familiar command-line tools.
You can download the latest Cook CLI release using GitHub Releases.
For a more in-depth review of the CLI commands and their usages, use this page.
Install the Cook CLI Program
Core Commands
Here is a list of core commands that you will use with CookCLI. Click on each one to navigate to the respective webpage for thorough documentation.
- recipe: Show recipes in various outputs (Cooklang, JSON, etc.).
- shopping-list: Combine ingredients from multiple recipes.
- server: Browse your recipes in a local web UI.
- search: Find recipes by ingredient or text.
- import: Convert web recipes into Cooklang.
- update: Fetch the latest CookCLI release.
- doctor: Validate recipes.
- seed: Drop example recipes into the current directory.
- report: Build custom reports from templates.
- pantry: Track inventory, expirations, and what you can cook.
Global Flags
CookCLI allows several options that apply to all commands globally.
They are:
- Base path, used to specify the directory of your recipes. For example:
cook --base-path ~/my-recipes recipe "Pizza.cook"or short-b. - Logging verbosity levels, with four different levels of granularity. They are: none (default),
-v(info),-vv(debug),-vvv(trace).
Quick Start
CookCLI Philosophy
CookCLI is grounded in a few basic tenets:
- Everything is a plain-text file that you control.
- Human-readable recipes, no special sauce needed.
- Small, composable UNIX commands.
- Works offline, all the time.
Recipe Files
Cooklang .cook files capture structured recipes. This is the simple Cooklang markup language, no long hours of study required.
Example:
For more details, check out this page on the Cooklang specifications.
Configuration Locations
Configuration files are located in these directories:
./config/~/.config/cooklang//etc/cooklang/
Aisle Configuration (aisle.conf)
Cooklang allows for an aisle.conf file to be added, allowing for organizing shopping lists by the section or aisle of the store.
Tips
- Scale recipes with the
:symbol. For example:cook recipe "Pizza.cook:2"orcook shopping-list "Pasta.cook:3". - Combine with standard UNIX tools. For example:
cook search chicken | head -5orcook shopping-list $(ls *Pasta*.cook), - Validate recipes for errors with validate. Example:
cook doctor validate.
Help
Use cook --help or cook <command> --help for detailed usage.