pp-allrecipes

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Allrecipes — Printing Press CLI

Allrecipes — Printing Press CLI

Prerequisites: Install the CLI

前提条件:安装CLI

This skill drives the
allrecipes-pp-cli
binary. You must verify the CLI is installed before invoking any command from this skill. If it is missing, install it first:
  1. Install via the Printing Press installer:
    bash
    npx -y @mvanhorn/printing-press install allrecipes --cli-only
  2. Verify:
    allrecipes-pp-cli --version
  3. Ensure
    $GOPATH/bin
    (or
    $HOME/go/bin
    ) is on
    $PATH
    .
If the
npx
install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.23+):
bash
go install github.com/mvanhorn/printing-press-library/library/food-and-dining/allrecipes/cmd/allrecipes-pp-cli@latest
If
--version
reports "command not found" after install, the install step did not put the binary on
$PATH
. Do not proceed with skill commands until verification succeeds.
本技能驱动
allrecipes-pp-cli
二进制文件。在调用此技能的任何命令之前,必须验证CLI已安装。如果未安装,请先进行安装:
  1. 通过Printing Press安装程序安装:
    bash
    npx -y @mvanhorn/printing-press install allrecipes --cli-only
  2. 验证:
    allrecipes-pp-cli --version
  3. 确保
    $GOPATH/bin
    (或
    $HOME/go/bin
    )已添加到
    $PATH
    中。
如果
npx
安装失败(无Node环境、离线等),可回退到直接通过Go安装(需要Go 1.23+版本):
bash
go install github.com/mvanhorn/printing-press-library/library/food-and-dining/allrecipes/cmd/allrecipes-pp-cli@latest
如果安装后执行
--version
提示“command not found”,说明安装步骤未将二进制文件添加到
$PATH
中。在验证成功前,请不要执行技能命令。

When to Use This CLI

何时使用此CLI

Reach for this CLI when an agent or user needs Allrecipes data as data, not as a webpage: searching for proven recipes, fetching ingredient lists in structured form, building grocery lists across multiple recipes, scaling for different serving counts, or filtering by what's in the pantry. The local SQLite cache makes iterative meal-planning workflows fast — every recipe fetched is queryable forever via
pantry
,
with-ingredient
,
top-rated
, and
dietary
. Skip this CLI when the user wants a multi-site comparison (different tool) or when they need authenticated features like saved recipes or meal plans (intentionally not supported).
当Agent或用户需要以数据形式而非网页形式获取Allrecipes数据时,可使用此CLI:搜索经过验证的食谱、获取结构化的食材列表、跨多个食谱生成购物清单、调整食谱份数、根据现有食材过滤食谱。本地SQLite缓存让迭代式膳食规划流程更快——所有获取的食谱都可通过
pantry
with-ingredient
top-rated
dietary
命令永久查询。当用户需要多网站对比(使用其他工具)或需要已保存食谱、膳食计划等需认证的功能(本工具不支持)时,请不要使用此CLI。

When Not to Use This CLI

何时不使用此CLI

Do not activate this CLI for requests that require creating, updating, deleting, publishing, commenting, upvoting, inviting, ordering, sending messages, booking, purchasing, or changing remote state. This printed CLI exposes read-only commands for inspection, export, sync, and analysis.
请勿针对需要创建、更新、删除、发布、评论、点赞、邀请、下单、发送消息、预订、购买或更改远程状态的请求激活此CLI。本CLI仅提供用于查看、导出、同步和分析的只读命令。

Unique Capabilities

独特功能

These capabilities aren't available in any other tool for this API.
这些功能是其他同类API工具所不具备的。

Local state that compounds

可累积的本地状态

  • pantry
    — Score Allrecipes recipes against your pantry — see which ones you can actually cook tonight without a grocery run.
    When the user says 'what can I make with what I've got', this is the only command that knows the answer.
    bash
    allrecipes-pp-cli pantry --pantry-file ~/pantry.txt --query brownies --agent
  • with-ingredient
    — Find every cached recipe that uses a given ingredient — a SQL view across your local corpus.
    Use this when the user starts from an ingredient they want to use up, not a dish name.
    bash
    allrecipes-pp-cli with-ingredient buttermilk --top 10 --agent
  • dietary
    — Filter cached recipes by gluten-free / vegan / low-carb using JSON-LD keywords plus ingredient-name patterns.
    Use this when dietary restrictions are non-negotiable and the user wants more than what the site's diet category page surfaces.
    bash
    allrecipes-pp-cli dietary --type gluten-free --top 20 --agent
  • pantry
    —— 根据你的 pantry食材评分Allrecipes食谱——查看无需采购即可今晚制作的食谱。
    当用户询问“我能用现有食材做什么”时,只有此命令能给出答案。
    bash
    allrecipes-pp-cli pantry --pantry-file ~/pantry.txt --query brownies --agent
  • with-ingredient
    —— 查找所有包含指定食材的缓存食谱——基于本地语料库的SQL视图。
    当用户从想要消耗的食材而非菜品名称开始查询时使用此命令。
    bash
    allrecipes-pp-cli with-ingredient buttermilk --top 10 --agent
  • dietary
    —— 使用JSON-LD关键词加食材名称模式过滤缓存食谱,支持无麸质/素食/低碳水等饮食要求。
    当饮食限制不可协商,且用户需要比网站饮食分类页面更多内容时使用此命令。
    bash
    allrecipes-pp-cli dietary --type gluten-free --top 20 --agent

Ranking that beats the website

优于网站的排序机制

  • top-rated
    — Rank recipes by Bayesian-smoothed rating — proven popular wins over 1-review 5-star noise.
    Pick this over raw search when the agent wants proven recipes, not freshly-uploaded 5-star outliers.
    bash
    allrecipes-pp-cli top-rated brownies --smooth-c 200 --limit 10 --agent
  • quick
    — Top-rated recipes that fit a strict time cap — Allrecipes' UI cannot enforce one, but the local cache can.
    Use this when the user's constraint is time, not dish — 'what can I make in 25 minutes that's actually good'.
    bash
    allrecipes-pp-cli quick --max-minutes 30 --query chicken --agent
  • top-rated
    —— 通过贝叶斯平滑评分对食谱排序——经过验证的受欢迎食谱胜过仅1条评论的五星噪声。
    当Agent需要经过验证的食谱而非刚上传的五星异常值时,选择此命令而非原生搜索。
    bash
    allrecipes-pp-cli top-rated brownies --smooth-c 200 --limit 10 --agent
  • quick
    —— 符合严格时间限制的高评分食谱——Allrecipes的UI无法强制执行时间限制,但本地缓存可以。
    当用户的限制条件是时间而非菜品时使用此命令,比如“我能在25分钟内做出什么好吃的”。
    bash
    allrecipes-pp-cli quick --max-minutes 30 --query chicken --agent

Agent-native plumbing

原生Agent适配

  • cookbook
    — Compile a top-rated category into a single markdown cookbook with TOC, ingredients, and instructions.
    When the user asks for a curated bundle (gifts, meal-plan packs), this builds it in one command.
    bash
    allrecipes-pp-cli cookbook --category italian --top 20 --output italian-cookbook.md
  • grocery-list
    — Aggregate ingredients from many recipes into a deduped, agent-readable shopping list.
    Use this at the end of a meal plan — one call replaces five scrolls through ingredient lists.
    bash
    allrecipes-pp-cli grocery-list https://www.allrecipes.com/recipe/9599/quick-and-easy-brownies/ https://www.allrecipes.com/recipe/16354/easy-meatloaf/ --agent
  • cookbook
    —— 将高评分分类编译为包含目录、食材和步骤的单份Markdown食谱集。
    当用户要求 curated bundle(如礼品、膳食计划包)时,此命令可一键生成。
    bash
    allrecipes-pp-cli cookbook --category italian --top 20 --output italian-cookbook.md
  • grocery-list
    —— 将多个食谱的食材汇总为去重的、Agent可读的购物清单。
    在膳食计划结束时使用此命令——一次调用替代五次滚动查看食材列表。
    bash
    allrecipes-pp-cli grocery-list https://www.allrecipes.com/recipe/9599/quick-and-easy-brownies/ https://www.allrecipes.com/recipe/16354/easy-meatloaf/ --agent

Reachability mitigation

可达性缓解

  • doctor
    — Health check that names the Cloudflare 'Just a moment...' interstitial by inspecting the response body, then advises the browser-chrome transport.
    When the CLI breaks because of bot detection, the agent gets a specific, actionable error rather than a generic timeout.
    bash
    allrecipes-pp-cli doctor
  • doctor
    —— 健康检查,通过检查响应体识别Cloudflare的“Just a moment...” interstitial,然后建议使用browser-chrome传输方式。
    当CLI因机器人检测而失效时,Agent会收到具体的、可操作的错误信息而非通用超时提示。
    bash
    allrecipes-pp-cli doctor

HTTP Transport

HTTP传输

This CLI uses Chrome-compatible HTTP transport over HTTP/3 for browser-facing endpoints. It does not require a resident browser process for normal API calls.
此CLI对面向浏览器的端点使用兼容Chrome的HTTP/3传输。正常API调用不需要常驻浏览器进程。

Command Reference

命令参考

recipes — Public Allrecipes recipe pages with Schema.org Recipe JSON-LD markup
  • allrecipes-pp-cli recipes get
    — Fetch a recipe by ID + slug; returns parsed JSON-LD Recipe. Requires Cloudflare clearance cookie via `auth login...
  • allrecipes-pp-cli recipes search
    — Search Allrecipes for recipes matching a query (no Cloudflare clearance required).
Hand-written commands
  • allrecipes-pp-cli recipe <url-or-id>
    — Fetch and render a single recipe by URL or ID
  • allrecipes-pp-cli search <query>
    — Search Allrecipes for recipes (live + cache)
  • allrecipes-pp-cli top-rated <query>
    — Search and rank by Bayesian-smoothed rating (prior 4.0, default C=200)
  • allrecipes-pp-cli quick
    — Recipes from cache that fit a strict time cap and are top-rated
  • allrecipes-pp-cli pantry
    — Score cached recipes by overlap with a pantry file
  • allrecipes-pp-cli with-ingredient <ingredient>
    — Reverse index: cached recipes that use a given ingredient
  • allrecipes-pp-cli dietary
    — Filter cached recipes by gluten-free / vegan / low-carb (strict ingredient blocklist)
  • allrecipes-pp-cli cookbook
    — Compile a top-rated category or cuisine into a markdown cookbook
  • allrecipes-pp-cli grocery-list <urls...>
    — Aggregate ingredients across many recipes into a deduped shopping list (subtract --pantry-file if given)
  • allrecipes-pp-cli scale <url>
    — Rescale a recipe to a target serving count
  • allrecipes-pp-cli nutrition <url>
    — Show nutrition for a recipe (per serving and total)
  • allrecipes-pp-cli ingredients <url>
    — Show parsed ingredients for a recipe
  • allrecipes-pp-cli instructions <url>
    — Show numbered instructions for a recipe
  • allrecipes-pp-cli reviews <url>
    — Show review summary for a recipe
  • allrecipes-pp-cli category <slug>
    — Browse recipes in a category (e.g. dessert, weeknight)
  • allrecipes-pp-cli cuisine <slug>
    — Browse recipes by cuisine
  • allrecipes-pp-cli ingredient <name>
    — Browse recipes featuring a primary ingredient
  • allrecipes-pp-cli occasion <slug>
    — Browse recipes by occasion (holiday, weeknight, party)
  • allrecipes-pp-cli article <url>
    — Extract the body of an Allrecipes article page
  • allrecipes-pp-cli gallery <url>
    — Extract recipe links from an Allrecipes round-up gallery
  • allrecipes-pp-cli cook <slug>
    — Show a cook profile and their recipes
  • allrecipes-pp-cli export <url>
    — Export a recipe as markdown
  • allrecipes-pp-cli sync
    — Refresh cached recipes that are stale
  • allrecipes-pp-cli cache
    — Inspect, list, or clear the local recipe cache
  • allrecipes-pp-cli doctor
    — Diagnose connectivity, Cloudflare clearance state, and cache health
recipes —— 带有Schema.org Recipe JSON-LD标记的公开Allrecipes食谱页面
  • allrecipes-pp-cli recipes get
    —— 通过ID+slug获取食谱;返回解析后的JSON-LD Recipe。需要通过
    auth login...
    获取Cloudflare验证Cookie
  • allrecipes-pp-cli recipes search
    —— 搜索Allrecipes中匹配查询关键词的食谱(无需Cloudflare验证)。
手写命令
  • allrecipes-pp-cli recipe <url-or-id>
    —— 通过URL或ID获取并渲染单个食谱
  • allrecipes-pp-cli search <query>
    —— 搜索Allrecipes食谱(实时+缓存)
  • allrecipes-pp-cli top-rated <query>
    —— 搜索并通过贝叶斯平滑评分排序(默认先验值4.0,C=200)
  • allrecipes-pp-cli quick
    —— 缓存中符合严格时间限制的高评分食谱
  • allrecipes-pp-cli pantry
    —— 根据与pantry文件的重叠度为缓存食谱评分
  • allrecipes-pp-cli with-ingredient <ingredient>
    —— 反向索引:包含指定食材的缓存食谱
  • allrecipes-pp-cli dietary
    —— 根据无麸质/素食/低碳水过滤缓存食谱(严格食材黑名单)
  • allrecipes-pp-cli cookbook
    —— 将高评分分类或菜系编译为Markdown食谱集
  • allrecipes-pp-cli grocery-list <urls...>
    —— 汇总多个食谱的食材为去重购物清单(若指定--pantry-file则减去现有食材)
  • allrecipes-pp-cli scale <url>
    —— 将食谱调整到目标份数
  • allrecipes-pp-cli nutrition <url>
    —— 显示食谱的营养信息(每份及总计)
  • allrecipes-pp-cli ingredients <url>
    —— 显示食谱的解析后食材列表
  • allrecipes-pp-cli instructions <url>
    —— 显示食谱的编号步骤
  • allrecipes-pp-cli reviews <url>
    —— 显示食谱的评论摘要
  • allrecipes-pp-cli category <slug>
    —— 浏览分类中的食谱(如dessert、weeknight)
  • allrecipes-pp-cli cuisine <slug>
    —— 按菜系浏览食谱
  • allrecipes-pp-cli ingredient <name>
    —— 浏览以指定食材为主料的食谱
  • allrecipes-pp-cli occasion <slug>
    —— 按场合浏览食谱(如holiday、weeknight、party)
  • allrecipes-pp-cli article <url>
    —— 提取Allrecipes文章页面的正文
  • allrecipes-pp-cli gallery <url>
    —— 从Allrecipes合集图库中提取食谱链接
  • allrecipes-pp-cli cook <slug>
    —— 显示厨师资料及其食谱
  • allrecipes-pp-cli export <url>
    —— 将食谱导出为Markdown格式
  • allrecipes-pp-cli sync
    —— 刷新过期的缓存食谱
  • allrecipes-pp-cli cache
    —— 查看、列出或清除本地食谱缓存
  • allrecipes-pp-cli doctor
    —— 诊断连通性、Cloudflare验证状态和缓存健康状况

Freshness Contract

新鲜度协议

This printed CLI owns bounded freshness only for registered store-backed read command paths. In
--data-source auto
mode, those paths check
sync_state
and may run a bounded refresh before reading local data.
--data-source local
never refreshes.
--data-source live
reads the API and does not mutate the local store. Set
ALLRECIPES_NO_AUTO_REFRESH=1
to skip the freshness hook without changing source selection.
When JSON output uses the generated provenance envelope, freshness metadata appears at
meta.freshness
. Treat it as current-cache freshness for the covered command path, not a guarantee of complete historical backfill or API-specific enrichment.
此CLI仅对已注册的存储支持的只读命令路径提供有限新鲜度保证。在
--data-source auto
模式下,这些路径会检查
sync_state
,并可能在读取本地数据前进行有限刷新。
--data-source local
模式从不刷新。
--data-source live
模式读取API且不修改本地存储。设置
ALLRECIPES_NO_AUTO_REFRESH=1
可跳过新鲜度钩子而不更改数据源选择。
当JSON输出使用生成的来源信封时,新鲜度元数据会出现在
meta.freshness
中。将其视为所覆盖命令路径的当前缓存新鲜度,而非完整历史回填或特定API增强的保证。

Finding the right command

找到合适的命令

When you know what you want to do but not which command does it, ask the CLI directly:
bash
allrecipes-pp-cli which "<capability in your own words>"
which
resolves a natural-language capability query to the best matching command from this CLI's curated feature index. Exit code
0
means at least one match; exit code
2
means no confident match — fall back to
--help
or use a narrower query.
当你知道要做什么但不知道用哪个命令时,直接询问CLI:
bash
allrecipes-pp-cli which "<用你自己的话描述功能>"
which
命令会将自然语言功能查询解析为此CLI精选功能索引中最匹配的命令。退出码
0
表示至少有一个匹配项;退出码
2
表示无可靠匹配项——请回退到
--help
或使用更精确的查询。

Recipes

示例

Top 5 brownies, narrowed to ranking fields only

排名前5的布朗尼,仅显示排序相关字段

bash
allrecipes-pp-cli top-rated brownies --limit 5 --agent --select rank,title,url,rating,reviewCount,madeItCount
Bayesian smoothing kills 1-review 5-star outliers; --select trims the payload to fields agents actually use.
bash
allrecipes-pp-cli top-rated brownies --limit 5 --agent --select rank,title,url,rating,reviewCount,madeItCount
贝叶斯平滑会过滤掉仅1条评论的五星异常值;--select参数将返回内容精简为Agent实际需要的字段。

Plan three weeknight dinners and one grocery list

规划3份晚餐并生成一份购物清单

bash
allrecipes-pp-cli quick --max-minutes 30 --query chicken --limit 3 --agent | xargs allrecipes-pp-cli grocery-list --pantry-file ~/pantry.txt --agent
Compose two commands: quick weeknight selection feeds straight into pantry-aware grocery aggregation.
bash
allrecipes-pp-cli quick --max-minutes 30 --query chicken --limit 3 --agent | xargs allrecipes-pp-cli grocery-list --pantry-file ~/pantry.txt --agent
组合两个命令:快速选择适合工作日晚餐的食谱,直接输入到支持pantry的购物清单汇总命令中。

Compile a personal Italian cookbook

编译个人意大利食谱集

bash
allrecipes-pp-cli cookbook --category italian --top 20 --output ~/italian-cookbook.md
Pulls the top-20 by Bayesian rating and writes a markdown cookbook with TOC.
bash
allrecipes-pp-cli cookbook --category italian --top 20 --output ~/italian-cookbook.md
提取贝叶斯评分前20的食谱,并写入带目录的Markdown食谱集。

Cook with what's in the pantry

用现有食材烹饪

bash
allrecipes-pp-cli pantry --pantry-file ~/pantry.txt --max-missing 2 --agent --select title,url,have,missing
Local index ranks cached recipes by ingredient overlap; --max-missing 2 keeps recipes that need at most two extra ingredients.
bash
allrecipes-pp-cli pantry --pantry-file ~/pantry.txt --max-missing 2 --agent --select title,url,have,missing
本地索引根据食材重叠度为缓存食谱排序;--max-missing 2参数保留最多需要额外2种食材的食谱。

Strict gluten-free with field narrowing

严格无麸质食谱并精简字段

bash
allrecipes-pp-cli dietary --type gluten-free --top 20 --agent --select title,url,rating,recipeIngredient
Strict ingredient blocklist + JSON-LD tag filter; --select pulls only the title, url, rating, and ingredients for agent verification.
bash
allrecipes-pp-cli dietary --type gluten-free --top 20 --agent --select title,url,rating,recipeIngredient
严格食材黑名单+JSON-LD标签过滤;--select参数仅提取标题、URL、评分和食材供Agent验证。

Auth Setup

认证设置

Browse and search work without any auth. Recipe detail pages need a Cloudflare clearance cookie — run
allrecipes-pp-cli auth login --chrome
once to capture one from your browser. This is bot-protection clearance, not an Allrecipes account login: no username, no password, no token tied to a user. The CLI does not support saved-recipes / meal-plan / profile features that require an actual Allrecipes account.
Run
allrecipes-pp-cli doctor
to verify setup.
浏览和搜索无需任何认证。食谱详情页面需要Cloudflare验证Cookie——运行
allrecipes-pp-cli auth login --chrome
一次即可从浏览器获取。这是机器人保护验证,而非Allrecipes账户登录:无需用户名、密码,无绑定用户的令牌。CLI不支持需要实际Allrecipes账户的已保存食谱/膳食计划/个人资料功能。
运行
allrecipes-pp-cli doctor
验证设置。

Agent Mode

Agent模式

Add
--agent
to any command. Expands to:
--json --compact --no-input --no-color --yes
.
  • Pipeable — JSON on stdout, errors on stderr
  • Filterable
    --select
    keeps a subset of fields. Dotted paths descend into nested structures; arrays traverse element-wise. Critical for keeping context small on verbose APIs:
    bash
    allrecipes-pp-cli recipes get mock-value mock-value --agent --select id,name,status
  • Previewable
    --dry-run
    shows the request without sending
  • Offline-friendly — sync/search commands can use the local SQLite store when available
  • Non-interactive — never prompts, every input is a flag
  • Read-only — do not use this CLI for create, update, delete, publish, comment, upvote, invite, order, send, or other mutating requests
在任何命令后添加
--agent
参数。等效于:
--json --compact --no-input --no-color --yes
  • 可管道传输 —— stdout输出JSON,stderr输出错误信息
  • 可过滤 ——
    --select
    参数保留字段子集。点路径可深入嵌套结构;数组可遍历元素。对于冗长的API,这是保持上下文精简的关键:
    bash
    allrecipes-pp-cli recipes get mock-value mock-value --agent --select id,name,status
  • 可预览 ——
    --dry-run
    参数显示请求但不发送
  • 离线友好 —— 同步/搜索命令可在可用时使用本地SQLite存储
  • 非交互式 —— 从不提示,所有输入均为标志参数
  • 只读 —— 请勿使用此CLI执行创建、更新、删除、发布、评论、点赞、邀请、下单、发送或其他变更请求

Response envelope

响应信封

Commands that read from the local store or the API wrap output in a provenance envelope:
json
{
  "meta": {"source": "live" | "local", "synced_at": "...", "reason": "..."},
  "results": <data>
}
Parse
.results
for data and
.meta.source
to know whether it's live or local. A human-readable
N results (live)
summary is printed to stderr only when stdout is a terminal — piped/agent consumers get pure JSON on stdout.
从本地存储或API读取数据的命令会将输出包装在来源信封中:
json
{
  "meta": {"source": "live" | "local", "synced_at": "...", "reason": "..."},
  "results": <data>
}
解析
.results
获取数据,
.meta.source
可了解数据是实时还是本地的。仅当stdout为终端时,才会向stderr打印人类可读的
N results (live)
摘要——管道/Agent消费者仅在stdout获取纯JSON。

Agent Feedback

Agent反馈

When you (or the agent) notice something off about this CLI, record it:
allrecipes-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
allrecipes-pp-cli feedback --stdin < notes.txt
allrecipes-pp-cli feedback list --json --limit 10
Entries are stored locally at
~/.allrecipes-pp-cli/feedback.jsonl
. They are never POSTed unless
ALLRECIPES_FEEDBACK_ENDPOINT
is set AND either
--send
is passed or
ALLRECIPES_FEEDBACK_AUTO_SEND=true
. Default behavior is local-only.
Write what surprised you, not a bug report. Short, specific, one line: that is the part that compounds.
当你(或Agent)发现此CLI存在问题时,请记录:
allrecipes-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
allrecipes-pp-cli feedback --stdin < notes.txt
allrecipes-pp-cli feedback list --json --limit 10
反馈条目存储在本地
~/.allrecipes-pp-cli/feedback.jsonl
中。除非设置了
ALLRECIPES_FEEDBACK_ENDPOINT
且传递了
--send
参数或设置
ALLRECIPES_FEEDBACK_AUTO_SEND=true
,否则不会POST发送。默认行为仅本地存储。
写下让你意外的内容,而非错误报告。简短、具体、单行:这才是有价值的部分。

Output Delivery

输出交付

Every command accepts
--deliver <sink>
. The output goes to the named sink in addition to (or instead of) stdout, so agents can route command results without hand-piping. Three sinks are supported:
SinkEffect
stdout
Default; write to stdout only
file:<path>
Atomically write output to
<path>
(tmp + rename)
webhook:<url>
POST the output body to the URL (
application/json
or
application/x-ndjson
when
--compact
)
Unknown schemes are refused with a structured error naming the supported set. Webhook failures return non-zero and log the URL + HTTP status on stderr.
每个命令都接受
--deliver <sink>
参数。输出会发送到指定的sink,同时(或替代)输出到stdout,因此Agent无需手动管道即可路由命令结果。支持三种sink:
Sink效果
stdout
默认;仅输出到stdout
file:<path>
原子性地将输出写入
<path>
(临时文件+重命名)
webhook:<url>
将输出正文POST到指定URL(
application/json
格式,若使用
--compact
则为
application/x-ndjson
格式)
未知格式会被拒绝,并返回结构化错误信息说明支持的格式。Webhook失败会返回非零退出码,并在stderr记录URL+HTTP状态码。

Named Profiles

命名配置文件

A profile is a saved set of flag values, reused across invocations. Use it when a scheduled agent calls the same command every run with the same configuration - HeyGen's "Beacon" pattern.
allrecipes-pp-cli profile save briefing --json
allrecipes-pp-cli --profile briefing recipes get mock-value mock-value
allrecipes-pp-cli profile list --json
allrecipes-pp-cli profile show briefing
allrecipes-pp-cli profile delete briefing --yes
Explicit flags always win over profile values; profile values win over defaults.
agent-context
lists all available profiles under
available_profiles
so introspecting agents discover them at runtime.
配置文件是一组保存的标志值,可在多次调用中复用。当定时Agent每次运行都使用相同配置调用同一命令时使用此功能——即HeyGen的“Beacon”模式。
allrecipes-pp-cli profile save briefing --json
allrecipes-pp-cli --profile briefing recipes get mock-value mock-value
allrecipes-pp-cli profile list --json
allrecipes-pp-cli profile show briefing
allrecipes-pp-cli profile delete briefing --yes
显式标志始终优先于配置文件值;配置文件值优先于默认值。
agent-context
会在
available_profiles
下列出所有可用配置文件,以便内省Agent在运行时发现它们。

Exit Codes

退出码

CodeMeaning
0Success
2Usage error (wrong arguments)
3Resource not found
4Authentication required
5API error (upstream issue)
7Rate limited (wait and retry)
10Config error
代码含义
0成功
2使用错误(参数错误)
3资源未找到
4需要认证
5API错误(上游问题)
7速率限制(请等待并重试)
10配置错误

Argument Parsing

参数解析

Parse
$ARGUMENTS
:
  1. Empty,
    help
    , or
    --help
    → show
    allrecipes-pp-cli --help
    output
  2. Starts with
    install
    → ends with
    mcp
    → MCP installation; otherwise → see Prerequisites above
  3. Anything else → Direct Use (execute as CLI command with
    --agent
    )
解析
$ARGUMENTS
  1. 为空、
    help
    --help
    → 显示
    allrecipes-pp-cli --help
    输出
  2. install
    开头
    → 若结尾为
    mcp
    → MCP安装;否则 → 参见上方前提条件
  3. 其他情况 → 直接使用(带
    --agent
    参数执行CLI命令)

MCP Server Installation

MCP服务器安装

  1. Install the MCP server:
    bash
    go install github.com/mvanhorn/printing-press-library/library/food-and-dining/allrecipes/cmd/allrecipes-pp-mcp@latest
  2. Register with Claude Code:
    bash
    claude mcp add allrecipes-pp-mcp -- allrecipes-pp-mcp
  3. Verify:
    claude mcp list
  1. 安装MCP服务器:
    bash
    go install github.com/mvanhorn/printing-press-library/library/food-and-dining/allrecipes/cmd/allrecipes-pp-mcp@latest
  2. 注册到Claude Code:
    bash
    claude mcp add allrecipes-pp-mcp -- allrecipes-pp-mcp
  3. 验证:
    claude mcp list

Direct Use

直接使用

  1. Check if installed:
    which allrecipes-pp-cli
    If not found, offer to install (see Prerequisites at the top of this skill).
  2. Match the user query to the best command from the Unique Capabilities and Command Reference above.
  3. Execute with the
    --agent
    flag:
    bash
    allrecipes-pp-cli <command> [subcommand] [args] --agent
  4. If ambiguous, drill into subcommand help:
    allrecipes-pp-cli <command> --help
    .
  1. 检查是否安装:
    which allrecipes-pp-cli
    若未找到,提供安装选项(参见顶部前提条件)。
  2. 将用户查询匹配到上述独特功能和命令参考中最合适的命令。
  3. --agent
    参数执行:
    bash
    allrecipes-pp-cli <command> [subcommand] [args] --agent
  4. 若存在歧义,查看子命令帮助:
    allrecipes-pp-cli <command> --help