← 返回
开发者工具 Key 中文

Mealie API skill

Interact with a self‑hosted Mealie instance (recipe manager & meal planner) via its REST API. Use for adding, updating, retrieving recipes, meal plans and generating shopping lists. Trigger when the user mentions their Mealie URL, wants to import a recipe, create a meal plan or fetch a shopping list.
通过 REST API 与自托管 Mealie(食谱管理+餐食规划)实例交互,用于添加、更新、获取食谱、餐食计划以及生成购物清单。用户提及 Mealie URL、导入食谱、创建餐食计划或请求购物清单时触发。
g1mb01d
开发者工具 clawhub v1.0.0 1 版本 99777.6 Key: 需要
★ 0
Stars
📥 1,346
下载
💾 7
安装
1
版本
#latest

概述

Mealie Skill

When to use

  • The user provides a Mealie base URL (e.g., https://mealie.example.com) and/or an API token and asks to add/import a recipe, create or modify a meal plan, fetch a shopping list, or query existing recipes.
  • The user wants to automate meal‑planning tasks from the command line or through a script.

Required environment variables

export MEALIE_URL="https://mealie.example.com"   # base URL of the instance
export MEALIE_TOKEN="<your‑jwt‑api‑token>"       # bearer token obtained from Mealie UI (Settings → API Keys)

Both variables must be set in the shell where the skill runs.

Provided script

The skill bundles a small Bash helper (scripts/mealie.sh) that wraps the most common Mealie API calls using curl.

#!/usr/bin/env bash
# mealie.sh – simple wrapper for Mealie REST API
# Requires MEALIE_URL and MEALIE_TOKEN env vars
set -euo pipefail

cmd=$1; shift
case "$cmd" in
  add-recipe)
    # Usage: mealie.sh add-recipe <path‑to‑json>
    curl -s -X POST "$MEALIE_URL/api/recipes" \
      -H "Authorization: Bearer $MEALIE_TOKEN" \
      -H "Content-Type: application/json" \
      --data @${1}
    ;;
  get-recipe)
    # Usage: mealie.sh get-recipe <recipe‑id>
    curl -s "$MEALIE_URL/api/recipes/${1}" \
      -H "Authorization: Bearer $MEALIE_TOKEN" | jq '.'
    ;;
  create-plan)
    # Usage: mealie.sh create-plan <json‑payload>
    curl -s -X POST "$MEALIE_URL/api/mealplan" \
      -H "Authorization: Bearer $MEALIE_TOKEN" \
      -H "Content-Type: application/json" \
      --data @${1}
    ;;
  get-shopping)
    # Usage: mealie.sh get-shopping <plan‑id>
    curl -s "$MEALIE_URL/api/mealplan/${1}/shopping-list" \
      -H "Authorization: Bearer $MEALIE_TOKEN" | jq '.'
    ;;
  *)
    echo "Unknown command: $cmd" >&2
    exit 1
    ;;
esac

Make it executable:

chmod +x scripts/mealie.sh

How to use from the chat

You can ask me to run a specific operation, e.g.:

  • "Add this recipe to Mealie." → I will ask you for the JSON representation of the recipe and then run scripts/mealie.sh add-recipe.
  • "Show me the shopping list for my current week plan." → I will call scripts/mealie.sh get-shopping and return the formatted list.
  • "Search for a recipe called Spaghetti Bolognese." → I will query the API (GET /api/recipes?search=Spaghetti%20Bolognese) and return matches.

Extending the skill

If you need additional endpoints (e.g., tags, categories, batch import), just add new case blocks to mealie.sh or create separate scripts under scripts/ and reference them in this README.


Note: The skill does not store the API token in any file; it relies on the environment variables you provide. Keep the token secret and rotate it regularly via the Mealie UI.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 03:55 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 921 📥 185,798
developer-tools

Agent Browser

matrixy
专为AI智能体优化的无头浏览器自动化CLI,支持无障碍树快照和基于引用的元素选择。
★ 427 📥 118,201
developer-tools

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 68 📥 180,173