Documentation

Allrecipes CLI

allrecipes-pp-cli

Install

npx -y @mvanhorn/printing-press-library install allrecipes

Installs the CLI binary and the agent skill for Claude Code, Codex, Cursor, Gemini CLI, Copilot, and more. Add --cli-only or --skill-only for one half. Requires Node.

Documentation

Every Allrecipes recipe in your terminal — cached as data, with pantry-aware search, Bayesian-smoothed ranking, and one-line grocery lists.

Search Allrecipes' 250k-recipe corpus from the command line, fetch a full recipe as parsed JSON-LD (ingredients with quantity+unit+name, instructions, nutrition, ratings, Made-It count), aggregate grocery lists from a meal plan, scale recipes, and export to clean markdown. Every recipe you fetch lands in a local SQLite store, which unlocks pantry (which recipes can I cook with what I have), with-ingredient (reverse index), top-rated with Bayesian smoothing (no more 1-review 5-star noise), and cookbook (export a category as a personal cookbook). Recipe detail pages are walled by Cloudflare; one-time auth login --chrome captures a clearance cookie from your browser — no Allrecipes account needed.

Learn more at Allrecipes.

Created by @tmchow (Trevin Chow).

Authentication

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.

Quick Start

# One-time: capture a Cloudflare clearance cookie from your browser. Required for recipe detail pages.
allrecipes-pp-cli auth login --chrome

# Search the live site; results land in your local cache for offline reuse. Browse/search work without clearance.
allrecipes-pp-cli search "brownies" --limit 5 --agent

# Fetch a full recipe as parsed JSON-LD; --select narrows the payload.
allrecipes-pp-cli recipe https://www.allrecipes.com/recipe/9599/quick-and-easy-brownies/ --agent --select recipeIngredient,totalTime,aggregateRating

# Rescale ingredients by servings.
allrecipes-pp-cli scale https://www.allrecipes.com/recipe/9599/quick-and-easy-brownies/ --servings 16

# Match cached recipes against what you already have.
allrecipes-pp-cli pantry --pantry-file ~/pantry.txt --query chicken --agent

Unique Features

These capabilities aren't available in any other tool for this 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.

    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.

    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.

    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.

    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'.

    allrecipes-pp-cli quick --max-minutes 30 --query chicken --agent
    

Agent-native plumbing

  • 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.

    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.

    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.

    allrecipes-pp-cli doctor
    

Usage

Run allrecipes-pp-cli --help for the full command reference and flag list.

Commands

Search & Browse

CommandDescription
search <query>Search Allrecipes for recipes (live + cache)
top-rated <query>Search and rank by Bayesian-smoothed rating
category <slug>Browse recipes in a category (e.g. dessert, weeknight)
cuisine <slug>Browse recipes by cuisine (e.g. italian, mexican, thai)
ingredient <name>Browse recipes featuring a primary ingredient
occasion <slug>Browse recipes by occasion (holiday, weeknight, party, etc.)

Recipe Detail

CommandDescription
recipe <url-or-id>Fetch a full recipe; returns parsed JSON-LD
ingredients <url-or-id>Show parsed ingredients (--parsed for qty+unit+name)
instructions <url-or-id>Show numbered instructions
nutrition <url-or-id>Show nutrition (per serving by default)
reviews <url-or-id>Show aggregate rating, review count, "Made It" summary
scale <url-or-id>Rescale ingredients to a target serving count
export-recipe <url-or-id>Export recipe as markdown to stdout or --output

Local-Cache Transcendence

CommandDescription
pantryRank cached recipes by overlap with --pantry-file or --pantry
with-ingredient <name>Reverse index: cached recipes that use a given ingredient
quickTop-rated cached recipes that fit --max-minutes
dietaryFilter cached recipes by gluten-free / vegan / low-carb / etc.
cookbookCompile a top-N category/cuisine into a markdown cookbook
grocery-list <urls...>Aggregate ingredients into a deduped shopping list

Other Pages

CommandDescription
article <url>Extract metadata from an Allrecipes article page
gallery <url>Extract recipe links from a round-up gallery
cook <slug>Show a cook profile and the recipes they've published

Cache & Data Pipeline

CommandDescription
cache statsShow local cache size and on-disk path
cache listList cached recipes (sort by --order rating/recency/etc.)
cache clearWipe the local cache (requires --yes)
syncSync API data to local SQLite
exportExport data to JSONL or JSON
importImport data from JSONL via API create/upsert

Account & Diagnostics

CommandDescription
auth login --chromeCapture a Cloudflare clearance cookie from your browser
doctorCheck CLI health (auth, cache, Cloudflare-clearance state)
agent-contextEmit structured JSON describing this CLI for agents
which <capability>Find the command that implements a capability
profileNamed sets of flags saved for reuse
workflowCompound workflows that combine multiple operations
version / feedback / completionStandard utilities

Output Formats

# Human-readable table (default in terminal, JSON when piped)
allrecipes-pp-cli search brownies --limit 5

# JSON for scripting and agents
allrecipes-pp-cli search brownies --limit 5 --json

# Filter to specific fields
allrecipes-pp-cli recipe 9599/quick-and-easy-brownies --json --select name,recipeIngredient,totalTime

# Dry run — show the request without sending
allrecipes-pp-cli recipe 9599/quick-and-easy-brownies --dry-run

# Agent mode — JSON + compact + no prompts in one flag
allrecipes-pp-cli search brownies --agent

Agent Usage

This CLI is designed for AI agent consumption:

  • Non-interactive - never prompts, every input is a flag
  • Pipeable - --json output to stdout, errors to stderr
  • Filterable - --select id,name returns only fields you need
  • Previewable - --dry-run shows the request without sending
  • Read-only by default - this CLI does not create, update, delete, publish, send, or mutate remote resources
  • Offline-friendly - sync/search commands can use the local SQLite store when available
  • Agent-safe by default - no colors or formatting unless --human-friendly is set

Exit codes: 0 success, 2 usage error, 3 not found, 4 auth error, 5 API error, 7 rate limited, 10 config error.

Freshness

This CLI owns bounded freshness for registered store-backed read command paths. In --data-source auto mode, covered commands check the local SQLite store before serving results; stale or missing resources trigger a bounded refresh, and refresh failures fall back to the existing local data with a warning. --data-source local never refreshes, and --data-source live reads the API without mutating the local store.

Set ALLRECIPES_NO_AUTO_REFRESH=1 to disable the pre-read freshness hook while preserving the selected data source.

JSON outputs that use the generated provenance envelope include freshness metadata at meta.freshness. This metadata describes the freshness decision for the covered command path; it does not claim full historical backfill or API-specific enrichment.

Health Check

allrecipes-pp-cli doctor

Verifies configuration, credentials, and connectivity to the API.

Configuration

Config file: ~/.config/allrecipes-pp-cli/config.toml

Environment variables:

  • ALLRECIPES_COOKIES

Troubleshooting

Authentication errors (exit code 4)

  • Run allrecipes-pp-cli doctor to check credentials
  • Verify the environment variable is set: echo $ALLRECIPES_COOKIES Not found errors (exit code 3)
  • Check the resource ID is correct
  • Run the list command to see available items

API-specific

  • doctor reports clearance_required: true — Run allrecipes-pp-cli auth login --chrome to capture a fresh Cloudflare clearance cookie from your browser. Cookies expire periodically; re-run when doctor flags it again.
  • recipe fetch returns 403 with cf-mitigated: challenge — Same as above — your clearance cookie is missing or expired. Run allrecipes-pp-cli auth login --chrome to refresh it. If your network IP is flagged independently, try a different connection.
  • search returns 0 results — Allrecipes search is text-only; URL-style filter syntax is not supported. Use plain words, then narrow with --max-minutes or pipe to top-rated for client-side ranking.
  • grocery-list output has duplicate ingredients with different units — Unit normalization is best-effort; pass --raw-quantities to see source strings and aggregate manually for edge cases.
  • pantry/with-ingredient returns no results despite expected matches — These commands query the local cache only — run sync or fetch a few recipes first to populate it. Use cache stats to confirm the corpus is non-empty.

HTTP Transport

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.


Sources & Inspiration

This CLI was built by studying these projects and resources:

Generated by CLI Printing Press

For agents: pass /documentation/allrecipes/agents.md to install this CLI from a prompt.