pp-jimmy-johns

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
<!-- GENERATED FILE — DO NOT EDIT. This file is a verbatim mirror of library/food-and-dining/jimmy-johns/SKILL.md, regenerated post-merge by tools/generate-skills/. Hand-edits here are silently overwritten on the next regen. Edit the library/ source instead. See AGENTS.md "Generated artifacts: registry.json, cli-skills/". -->
<!-- 生成文件 — 请勿编辑。 此文件是library/food-and-dining/jimmy-johns/SKILL.md的精确镜像, 由tools/generate-skills/在合并后重新生成。此处的手动编辑会在下次重新生成时被自动覆盖。请改为编辑library/中的源文件。 请参阅AGENTS.md中的“生成产物:registry.json, cli-skills/”。 -->

Jimmy John's — Printing Press CLI

Jimmy John's — Printing Press CLI

Prerequisites: Install the CLI

前提条件:安装CLI工具

This skill drives the
jimmy-johns-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 jimmy-johns --cli-only
  2. Verify:
    jimmy-johns-pp-cli --version
  3. Ensure
    $GOPATH/bin
    (or
    $HOME/go/bin
    ) is on
    $PATH
    .
If the
npx
install fails before this CLI has a public-library category, install Node or use the category-specific Go fallback after publish.
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.
Browse stores and menus, build carts, view rewards, and one-shot reorders from the terminal. The Unwich converter computes lettuce-wrap modifier deltas locally so agents can build no-bread orders without an extra API round trip.
本技能驱动
jimmy-johns-pp-cli
二进制文件。在调用本技能的任何命令之前,您必须确认CLI已安装。如果未安装,请先执行以下步骤:
  1. 通过Printing Press安装器进行安装:
    bash
    npx -y @mvanhorn/printing-press install jimmy-johns --cli-only
  2. 验证安装:
    jimmy-johns-pp-cli --version
  3. 确保
    $GOPATH/bin
    (或
    $HOME/go/bin
    )已添加到
    $PATH
    环境变量中。
如果在该CLI进入公共库分类之前
npx
安装失败,请安装Node.js,或在发布后使用特定分类的Go语言备用安装方式。
如果安装后执行
--version
提示“command not found”,说明安装步骤未将二进制文件添加到
$PATH
中。在验证成功前,请不要继续执行技能命令。
您可以通过终端浏览门店和菜单、构建购物车、查看奖励信息,以及一键重新下单。Unwich转换器会在本地计算生菜卷修饰符增量,这样Agent无需额外API往返即可构建无面包订单。

When to Use This CLI

何时使用此CLI

Use this CLI when scripting Jimmy John's order workflows from the terminal, when building a cart for an agent that needs typed access to JJ's menu and rewards data, or when caching menu state for offline composition. The Unwich converter is particularly useful for low-carb diet flows.
当您需要从终端编写Jimmy John's订单工作流脚本、为需要对JJ菜单和奖励数据进行类型化访问的Agent构建购物车,或缓存菜单状态以便离线组合时,使用此CLI。Unwich转换器对低碳水化合物饮食流程尤为有用。

Unique Capabilities

独特功能

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

Local cart composition

本地购物车组合

  • menu unwich-convert
    — Convert a sandwich's modifier set to an Unwich (lettuce wrap) variant — pure-local computation, no live API call.
    Reach for this when an agent is building a JJ cart for a user with a no-bread preference — it gives you the exact modifier delta with no API round-trip.
    bash
    jimmy-johns-pp-cli menu product-modifiers 33328641 --json | jimmy-johns-pp-cli menu unwich-convert --product-id 33328641 --json
  • order plan
    — Suggest a sized cart for a group order — sandwiches + sides + cookies + drinks scaled to N people with dietary filters.
    Reach for this when an agent gets a 'lunch for the team' request — it returns a ready-to-submit cart structure with rationale per line.
    bash
    jimmy-johns-pp-cli order plan --people 8 --dietary vegetarian --json
  • menu half-and-half
    — Compose a two-product share order with the agent-facing note that JJ doesn't natively support half-and-half slicing.
    Reach for this when a user says 'half Vito, half Pepe' — the command outputs the actual cart and the in-store ask the user has to make.
    bash
    jimmy-johns-pp-cli menu half-and-half --left 33328641 --right 33328700 --json
  • menu unwich-convert
    — 将三明治的修饰符集转换为Unwich(生菜卷)变体——纯本地计算,无需实时API调用。
    当Agent为有不吃面包需求的用户构建JJ购物车时,请使用此命令——它能为您提供精确的修饰符增量,无需API往返。
    bash
    jimmy-johns-pp-cli menu product-modifiers 33328641 --json | jimmy-johns-pp-cli menu unwich-convert --product-id 33328641 --json
  • order plan
    — 为团体用餐建议合适规模的购物车——根据人数N和饮食过滤器搭配三明治+配菜+饼干+饮品。
    当Agent收到“团队午餐”请求时,请使用此命令——它会返回一个可直接提交的购物车结构,并为每个条目提供说明。
    bash
    jimmy-johns-pp-cli order plan --people 8 --dietary vegetarian --json
  • menu half-and-half
    — 组合包含两种产品的共享订单,并添加Agent可见的备注,说明JJ本身不支持对半分切。
    当用户说“一半Vito,一半Pepe”时,请使用此命令——该命令会输出实际购物车内容以及用户需要向门店提出的要求。
    bash
    jimmy-johns-pp-cli menu half-and-half --left 33328641 --right 33328700 --json

HTTP Transport

HTTP传输

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

Command Reference

命令参考

account — User account, profile, addresses, and saved payments
  • jimmy-johns-pp-cli account current
    — Get the authenticated user's profile (name, email, preferences).
  • jimmy-johns-pp-cli account delivery_addresses
    — List the authenticated user's saved delivery addresses.
  • jimmy-johns-pp-cli account login
    — Authenticate with email + password. Sets JJ session cookies.
  • jimmy-johns-pp-cli account saved_payments
    — List the authenticated user's saved payment methods.
  • jimmy-johns-pp-cli account web_token
    — Refresh the web session token (called internally by the SPA).
menu — Menu products, filters, and modifier options
  • jimmy-johns-pp-cli menu product_filters
    — List available menu filter dimensions (categories, dietary tags, allergens).
  • jimmy-johns-pp-cli menu product_modifiers
    — List modifier groups (bread, toppings, add-ons) for a specific product.
  • jimmy-johns-pp-cli menu products
    — List menu products for the current store (subs, sides, drinks, cookies, catering).
order — Cart and order management
  • jimmy-johns-pp-cli order add_items
    — Add one or more items to the current cart in a single call.
  • jimmy-johns-pp-cli order current
    — Get the current in-progress order/cart.
  • jimmy-johns-pp-cli order upsell
    — Get upsell suggestions for the current cart (sides, drinks, cookies).
rewards — Freaky Fast Rewards points balance and catalog
  • jimmy-johns-pp-cli rewards catalog
    — List available reward redemptions for the current points balance.
  • jimmy-johns-pp-cli rewards summary
    — Get the authenticated user's rewards points balance and recent activity.
stores — Jimmy John's store locations and operating info
  • jimmy-johns-pp-cli stores get_disclaimers
    — Get store-specific disclaimers (delivery zone caveats, hours warnings).
  • jimmy-johns-pp-cli stores list
    — List stores. Accepts an address search or filter; returns stores with hours, distance, pickup/delivery flags.
system — System utilities (Google Maps signing for store finder)
  • jimmy-johns-pp-cli system
    — Sign a Google Maps URL for client-side use (used internally by store finder)
account — 用户账户、个人资料、地址和已保存的支付方式
  • jimmy-johns-pp-cli account current
    — 获取已认证用户的个人资料(姓名、邮箱、偏好设置)。
  • jimmy-johns-pp-cli account delivery_addresses
    — 列出已认证用户保存的配送地址。
  • jimmy-johns-pp-cli account login
    — 通过邮箱+密码进行认证,设置JJ会话Cookie。
  • jimmy-johns-pp-cli account saved_payments
    — 列出已认证用户保存的支付方式。
  • jimmy-johns-pp-cli account web_token
    — 刷新Web会话令牌(由SPA内部调用)。
menu — 菜单产品、过滤器和修饰符选项
  • jimmy-johns-pp-cli menu product_filters
    — 列出可用的菜单筛选维度(分类、饮食标签、过敏原)。
  • jimmy-johns-pp-cli menu product_modifiers
    — 列出特定产品的修饰符组(面包、配料、附加选项)。
  • jimmy-johns-pp-cli menu products
    — 列出当前门店的菜单产品(三明治、配菜、饮品、饼干、餐食套餐)。
order — 购物车和订单管理
  • jimmy-johns-pp-cli order add_items
    — 单次调用向当前购物车添加一个或多个商品。
  • jimmy-johns-pp-cli order current
    — 获取当前进行中的订单/购物车信息。
  • jimmy-johns-pp-cli order upsell
    — 获取当前购物车的追加销售建议(配菜、饮品、饼干)。
rewards — Freaky Fast Rewards积分余额和兑换目录
  • jimmy-johns-pp-cli rewards catalog
    — 根据当前积分余额列出可用的奖励兑换选项。
  • jimmy-johns-pp-cli rewards summary
    — 获取已认证用户的奖励积分余额和近期活动。
stores — Jimmy John's门店位置和运营信息
  • jimmy-johns-pp-cli stores get_disclaimers
    — 获取门店特定的免责声明(配送区域限制、营业时间提醒)。
  • jimmy-johns-pp-cli stores list
    — 列出门店,支持地址搜索或筛选;返回包含营业时间、距离、自提/配送标识的门店信息。
system — 系统工具(用于门店查找的Google Maps签名)
  • jimmy-johns-pp-cli system
    — 为客户端使用的Google Maps URL签名(由门店查找功能内部使用)

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
JIMMY_JOHNS_NO_AUTO_REFRESH=1
to skip the freshness hook without changing source selection.
Covered paths:
  • jimmy-johns-pp-cli menu
  • jimmy-johns-pp-cli menu product_filters
  • jimmy-johns-pp-cli menu product_modifiers
  • jimmy-johns-pp-cli menu products
  • jimmy-johns-pp-cli stores
  • jimmy-johns-pp-cli stores get_disclaimers
  • jimmy-johns-pp-cli stores list
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且不修改本地存储。设置
JIMMY_JOHNS_NO_AUTO_REFRESH=1
可跳过新鲜度检查,无需更改数据源选择。
覆盖的路径:
  • jimmy-johns-pp-cli menu
  • jimmy-johns-pp-cli menu product_filters
  • jimmy-johns-pp-cli menu product_modifiers
  • jimmy-johns-pp-cli menu products
  • jimmy-johns-pp-cli stores
  • jimmy-johns-pp-cli stores get_disclaimers
  • jimmy-johns-pp-cli stores list
当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
jimmy-johns-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
jimmy-johns-pp-cli which "<用您自己的话描述功能>"
which
命令会将自然语言功能查询解析为与此CLI精选功能索引中最匹配的命令。退出码
0
表示至少找到一个匹配项;退出码
2
表示没有确定的匹配项——请回退到
--help
或使用更精确的查询。

Recipes

使用示例

Show every menu item that has Unwich support

显示所有支持Unwich的菜单商品

bash
jimmy-johns-pp-cli menu products --json | jq '.[] | select(.category=="sandwich")'
Filter the local menu cache to sandwiches before piping into the unwich converter.
bash
jimmy-johns-pp-cli menu products --json | jq '.[] | select(.category=="sandwich")'
在将结果传入Unwich转换器之前,先过滤本地菜单缓存中的三明治商品。

Auth Setup

认证设置

Jimmy John's runs PerimeterX bot protection. Authenticate by capturing cookies from a fresh, hand-driven Chrome session via 'browser-use cookies export', then 'jimmy-johns-pp-cli auth import-cookies --from-file <path>'. Sessions that get fingerprinted by automation stay flagged for ~1 hour.
Run
jimmy-johns-pp-cli doctor
to verify setup.
Jimmy John's采用PerimeterX机器人防护。您可以通过以下方式进行认证:通过“browser-use cookies export”从全新的手动操作Chrome会话中捕获Cookie,然后执行
jimmy-johns-pp-cli auth import-cookies --from-file <路径>
。被自动化工具识别的会话会被标记约1小时。
执行
jimmy-johns-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
    jimmy-johns-pp-cli stores list --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
  • Explicit retries — use
    --idempotent
    only when an already-existing create should count as success
在任何命令后添加
--agent
参数,等效于:
--json --compact --no-input --no-color --yes
  • 可管道传输 — 标准输出为JSON,错误信息输出到标准错误
  • 可筛选
    --select
    参数保留字段子集。点路径可深入嵌套结构;数组会遍历每个元素。这对于在冗长API中缩小上下文范围至关重要:
    bash
    jimmy-johns-pp-cli stores list --agent --select id,name,status
  • 可预览
    --dry-run
    参数显示请求内容但不发送
  • 离线友好 — 同步/搜索命令在可用时可使用本地SQLite存储
  • 非交互式 — 从不提示,所有输入均通过标志参数提供
  • 显式重试 — 仅当已存在的创建操作应被视为成功时,使用
    --idempotent
    参数

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": <数据>
}
解析
.results
字段获取数据,通过
.meta.source
字段判断数据是实时的还是本地的。仅当标准输出为终端时,才会将人类可读的
N results (live)
摘要输出到标准错误;管道/Agent消费者仅会在标准输出中获取纯JSON。

Agent Feedback

Agent反馈

When you (or the agent) notice something off about this CLI, record it:
jimmy-johns-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
jimmy-johns-pp-cli feedback --stdin < notes.txt
jimmy-johns-pp-cli feedback list --json --limit 10
Entries are stored locally at
~/.jimmy-johns-pp-cli/feedback.jsonl
. They are never POSTed unless
JIMMY_JOHNS_FEEDBACK_ENDPOINT
is set AND either
--send
is passed or
JIMMY_JOHNS_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存在问题时,请记录反馈:
jimmy-johns-pp-cli feedback "--since参数是包含性的,但文档说是排他性的"
jimmy-johns-pp-cli feedback --stdin < notes.txt
jimmy-johns-pp-cli feedback list --json --limit 10
反馈条目会本地存储在
~/.jimmy-johns-pp-cli/feedback.jsonl
中。除非设置了
JIMMY_JOHNS_FEEDBACK_ENDPOINT
且传递了
--send
参数或设置了
JIMMY_JOHNS_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>
参数。输出会发送到指定的接收端,同时也会(或替代)输出到标准输出,这样Agent无需手动管道即可路由命令结果。支持三种接收端:
接收端效果
stdout
默认值;仅输出到标准输出
file:<路径>
原子性地将输出写入
<路径>
(先写入临时文件再重命名)
webhook:<URL>
将输出体POST到指定URL(当使用
--compact
时为
application/json
application/x-ndjson
格式)
不支持的协议会返回结构化错误,并列出支持的协议集。Webhook失败会返回非零退出码,并将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.
jimmy-johns-pp-cli profile save briefing --json
jimmy-johns-pp-cli --profile briefing stores list
jimmy-johns-pp-cli profile list --json
jimmy-johns-pp-cli profile show briefing
jimmy-johns-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”模式。
jimmy-johns-pp-cli profile save briefing --json
jimmy-johns-pp-cli --profile briefing stores list
jimmy-johns-pp-cli profile list --json
jimmy-johns-pp-cli profile show briefing
jimmy-johns-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
    jimmy-johns-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
    → 显示
    jimmy-johns-pp-cli --help
    输出
  2. install
    开头
    → 若以
    mcp
    结尾 → 安装MCP;否则 → 参见上方前提条件
  3. 其他情况 → 直接使用(添加
    --agent
    参数执行CLI命令)

MCP Server Installation

MCP服务器安装

Install the MCP binary from this CLI's published public-library entry or pre-built release, then register it:
bash
claude mcp add jimmy-johns-pp-mcp -- jimmy-johns-pp-mcp
Verify:
claude mcp list
从此CLI已发布的公共库条目或预构建版本中安装MCP二进制文件,然后注册:
bash
claude mcp add jimmy-johns-pp-mcp -- jimmy-johns-pp-mcp
验证安装:
claude mcp list

Direct Use

直接使用

  1. Check if installed:
    which jimmy-johns-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
    jimmy-johns-pp-cli <command> [subcommand] [args] --agent
  4. If ambiguous, drill into subcommand help:
    jimmy-johns-pp-cli <command> --help
    .
  1. 检查是否已安装:
    which jimmy-johns-pp-cli
    若未找到,提供安装选项(参见顶部前提条件)。
  2. 将用户查询与上方独特功能和命令参考中的最佳匹配命令进行匹配。
  3. 添加
    --agent
    参数执行命令:
    bash
    jimmy-johns-pp-cli <命令> [子命令] [参数] --agent
  4. 若存在歧义,查看子命令帮助:
    jimmy-johns-pp-cli <命令> --help