Pantry
Manage and analyze your pantry inventory.
Usage
Options
| Option | Description |
|---|---|
-b, --base-path <PATH> | Base path for recipes and configuration files |
-f, --format <FORMAT> | Output format: human (default), json, yaml |
Subcommands
depleted (alias: d)
Show items that are out of stock or have low quantities.
| Option | Description |
|---|---|
--all | Show all items including those without quantities |
Items are flagged when current quantity is at or below the low threshold. Without a low threshold, uses heuristics.
expiring (alias: e)
Show items that are expiring soon.
| Option | Description |
|---|---|
-d, --days <DAYS> | Number of days to look ahead (default: 7) |
--include-unknown | Include items without expiry dates |
recipes (alias: r)
List recipes that can be made with items currently in pantry.
| Option | Description |
|---|---|
-p, --partial | Include partial matches (most ingredients available) |
--threshold <PERCENT> | Minimum percentage of ingredients for partial matches (default: 75) |
plan
Analyze ingredient usage across recipes to help plan pantry items.
| Option | Description |
|---|---|
-n, --max-ingredients <N> | Maximum number of ingredients to show (default: all needed for 100% coverage) |
-s, --skip <N> | Skip the first N ingredients (default: 0) |
-m, --allow-missing <N> | Allow recipes to be considered cookable even if N ingredients are missing (default: 0) |
Configuration
The pantry inventory is defined in pantry.conf (TOML format), searched in:
./config/pantry.conf— local to recipe directory~/.config/cook/pantry.conf— global configuration
Format
Item attributes: quantity, low (threshold), bought (date), expire (date). Simple format (item = "quantity") also supported.
Examples
Notes
- Unit comparisons only work when units match (e.g.,
gvsg, notkgvsg) - For items without units, use plain numbers (e.g.,
eggs = { quantity = "6", low = "12" })