Install
openclaw skills install @lanjelin/claw-mealieManage Mealie recipes, imports from websites/images/PDFs/text, meal plans, shopping lists, and the instance API with source-faithful recipe normalization.
openclaw skills install @lanjelin/claw-mealieUse this skill for an authorized user's Mealie recipes, organizers, meal plans, shopping lists, foods/units, cookbooks, and API tasks. Run python3 {baseDir}/scripts/mealie.py .... Python's standard library is sufficient for API calls; PDF text extraction optionally requires pdftotext. Read the workflow reference for detailed import, upload, CRUD, and recovery recipes. Installation and secure credentials: README.
MEALIE_URL is the trusted instance origin, optionally including its installation prefix, without /api (for example https://mealie.example.com). MEALIE_API_TOKEN is a Mealie API token; never put it into recipes, skill files, chat, logs, or command arguments. Configure both in OpenClaw's global ~/.openclaw/.env (or $OPENCLAW_STATE_DIR/.env) and restart the Gateway; no per-skill config entry is needed. The helper reads its process environment, not dotenv files. Sandboxed execution needs separate approved credential forwarding.The helper discovers the configured instance's OpenAPI schema. Do not guess endpoints, field names, request media types, IDs, or permissions. The reference is grounded in Mealie v3.28.0; the live schema wins on other versions.
python3 {baseDir}/scripts/mealie.py request GET /api/users/self
python3 {baseDir}/scripts/mealie.py endpoints --search recipes
python3 {baseDir}/scripts/mealie.py describe GET /api/recipes
python3 {baseDir}/scripts/mealie.py describe PATCH '/api/recipes/{slug}'
python3 {baseDir}/scripts/mealie.py schema
python3 {baseDir}/scripts/mealie.py schema Recipe-Input
endpoints exposes advertised operations across the full API, including admin operations only usable with appropriate permissions. describe METHOD PATH takes the templated path and returns the operation and referenced schemas. schema NAME retrieves a named component. This is generic API access, not a claim that every endpoint has been exercised.
request METHOD PATH uses a concrete path. call OPERATION_ID --path KEY=VALUE fills a discovered operation's path parameters. Both accept repeated --query KEY=VALUE, repeated --header KEY=VALUE, --json JSON|@file|@-, form fields --field KEY=VALUE, repeatable uploads --file FIELD=PATH, raw --body PATH, --content-type TYPE, and --output PATH. Choose one body mode matching the operation: JSON, fields/files, or raw body. Arrays in queries use repeated keys; nested objects, numbers, and booleans belong in JSON. Let the helper set multipart boundaries.
python3 {baseDir}/scripts/mealie.py request GET /api/recipes \
--query 'search=lentil' --query page=1 --query perPage=25
python3 {baseDir}/scripts/mealie.py call get_one_api_recipes__slug__get \
--path slug=ACTUAL_SLUG
Follow pagination until the requested scope is covered; one page is not the entire collection. Resolve names to IDs with a GET. Slugs identify recipe routes; UUIDs identify recipes in meal-plan/shopping payloads.
import-url. If scraping fails or the source is an image, PDF, pasted text, or complex page, read/inspect it with available OpenClaw tools and normalize it to one schema.org Recipe JSON file. Raw HTML is also accepted by import-recipe.recipeIngredient strings and ordered HowToStep objects. Never invent quantities, temperatures, allergens, dietary guarantees, or nutrition. Resolve material ambiguity with the user instead of guessing. Keep unrelated variants separate.python3 {baseDir}/scripts/mealie.py import-url 'https://publisher.example/recipe'
python3 {baseDir}/scripts/mealie.py extract-pdf /path/source.pdf
python3 {baseDir}/scripts/mealie.py import-recipe /path/recipe.json \
--source-url 'https://publisher.example/recipe'
python3 {baseDir}/scripts/mealie.py request GET /api/recipes/ACTUAL_SLUG
import-url and import-recipe support --include-tags and --include-categories; omit unless the user wants source organizers imported. They return the slug and a verified full recipe. extract-pdf prints layout-preserving text but does not OCR scanned pages. For scans/photos, inspect images with available vision/OCR tooling, reconcile page order and fractions, and retain the original.
Optional server AI, only when configured and approved:
python3 {baseDir}/scripts/mealie.py import-ai --content /path/source.txt
python3 {baseDir}/scripts/mealie.py import-ai --image /path/page-1.jpg --image /path/page-2.jpg
import-ai also accepts --url URL and --language LANG. It sends multipart content/images; do not send PDF files as images. Inspect AI output against the source just as strictly as any other import.
JSON responses print as JSON; errors print JSON to stderr and exit nonzero. Binary responses require --output; text can print directly. The helper does not automatically retry mutations or follow redirects. A timeout/disconnect or failed final GET may occur after creation succeeded: recover the returned slug if available, otherwise search and inspect existing recipes before any new create. Repair failed uploads or updates on the existing recipe. Preserve HTTP status/details without exposing credentials. Diagnose 401/403 through credentials/permissions, 422 through describe and payload correction, and redirects through the trusted instance URL configuration. Never bypass authentication or TLS security to make a call succeed.