Import recipes from websites and convert to Cooklang format.
Requires the OPENAI_API_KEY environment variable for conversion to Cooklang. Without the key, you can still download the original recipe content with --skip-conversion. Alternatively, use the cook.md converter.
cook import [OPTIONS] <URL>
| Argument | Description |
|---|---|
<URL> |
URL of the recipe webpage to import. Works with sites using Recipe Schema.org markup. |
| Option | Description |
|---|---|
-s, --skip-conversion |
Output original recipe data without converting to Cooklang |
--metadata <FORMAT> |
Metadata format: frontmatter (default), json, yaml, none |
--metadata-only |
Output only metadata, no recipe content |
# Import and convert to Cooklang
cook import https://www.bbcgoodfood.com/recipes/chicken-bacon-pasta
# Save to file
cook import https://example.com/recipe > lasagna.cook
# Get raw data without conversion
cook import https://example.com/recipe --skip-conversion
# Extract metadata only as JSON
cook import https://example.com/recipe --metadata-only --metadata json