poke-ordering
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePoke Co Ordering CLI
The Poke Co 订单CLI工具
CLI for browsing menus and placing orders at The Poke Co (South Africa). All output is JSON. Requires Node.js.
这是一款用于浏览南非The Poke Co菜单并下单的CLI工具。所有输出均为JSON格式。需要依赖Node.js环境。
Commands
命令
Run via .
node scripts/poke-cli.js <command>| Command | Flags | Output |
|---|---|---|
| — | All locations with open/closed status |
| | |
| | |
| | Matching items with prices, types, deal groups |
| | Full menu dump (large — prefer |
| | Order confirmation with payment URL |
| see below | Build Your Own bowl builder |
| | All BYO ingredient options for a location |
通过 运行。
node scripts/poke-cli.js <command>| 命令 | 参数 | 输出 |
|---|---|---|
| — | 所有门店及其营业/打烊状态 |
| | |
| | |
| | 匹配的商品及其价格、类型、套餐组 |
| | 完整菜单导出(内容较多 — 推荐使用 |
| | 订单确认信息及支付链接 |
| 见下文 | 自定义碗(Build Your Own)构建工具 |
| | 指定门店的所有自定义碗配料选项 |
Workflow
操作流程
- Find location: — pick one by name
node scripts/poke-cli.js locations - Check hours: — confirm
node scripts/poke-cli.js hours --location "Kloof"is_open: true - Search items: — find what to order
node scripts/poke-cli.js search --location "Kloof" --query "salmon" - Place order: pipe JSON to
node scripts/poke-cli.js order --from -
- 查找门店:— 根据名称选择一家门店
node scripts/poke-cli.js locations - 查看营业时间:— 确认
node scripts/poke-cli.js hours --location "Kloof"is_open: true - 搜索商品:— 找到想要下单的商品
node scripts/poke-cli.js search --location "Kloof" --query "salmon" - 下单:将JSON内容通过管道传递给
node scripts/poke-cli.js order --from -
BYO Workflow
自定义碗操作流程
- Find location:
node scripts/poke-cli.js locations - Check hours:
node scripts/poke-cli.js hours --location "Kloof" - Get options: — shows all available bases, proteins, toppings, sauces, crunches, extras with prices for both regular and maxi
node scripts/poke-cli.js byo-options --location "Kloof" - Build bowl:
node scripts/poke-cli.js byo --location Kloof --size regular --base ... --protein ... --topping ... --sauce ... --crunch ...
Always run first to see what ingredients are available before building a bowl.
byo-options- 查找门店:
node scripts/poke-cli.js locations - 查看营业时间:
node scripts/poke-cli.js hours --location "Kloof" - 获取配料选项:— 展示常规款和大份装可用的所有基底、蛋白质、配料、酱料、脆顶、附加食材及其价格
node scripts/poke-cli.js byo-options --location "Kloof" - 制作碗品:
node scripts/poke-cli.js byo --location Kloof --size regular --base ... --protein ... --topping ... --sauce ... --crunch ...
在制作自定义碗之前,请务必先运行命令查看可用的配料。
byo-optionsOrder JSON Format
订单JSON格式
json
{
"location": "Kloof St",
"mobile": "+27XXXXXXXXX",
"order_type": "collection",
"time": "asap",
"items": [
{ "name": "Miso Soup", "quantity": 1 },
{
"name": "Build Your Own",
"quantity": 1,
"instructions": "Extra sauce",
"choices": {
"Choose Your Base": ["White Sushi Rice"],
"Choose Your Protein": ["Salmon"]
}
}
]
}json
{
"location": "Kloof St",
"mobile": "+27XXXXXXXXX",
"order_type": "collection",
"time": "asap",
"items": [
{ "name": "Miso Soup", "quantity": 1 },
{
"name": "Build Your Own",
"quantity": 1,
"instructions": "Extra sauce",
"choices": {
"Choose Your Base": ["White Sushi Rice"],
"Choose Your Protein": ["Salmon"]
}
}
]
}Build Your Own (BYO) Command
自定义碗(Build Your Own,BYO)命令
The command provides a typed CLI for building custom bowls without needing to know the raw deal group structure.
byoRequired flags:
- — location (partial match)
--location <name> - — bowl size (R83 regular, R99 maxi)
--size <regular|maxi> - — 1-2 bases (repeat flag for split base, or "none")
--base <name> - — 1 protein (or "none")
--protein <name> - — 1-4 toppings (repeat flag)
--topping <name> - — 1-2 sauces (repeat flag), or "none" for no sauce
--sauce <name> - — 1 crunch (or "none")
--crunch <name>
Optional flags:
- — paid extras, up to 2 (repeat flag)
--extra <name> - — extra protein
--extra-protein <name> - — extra sauce (paid, repeat flag)
--extra-sauce <name> - — remove defaults
--remove <name> - — add a side
--side <name> - — add a drink
--drink <name> - — output order-ready JSON item (for piping into
--json)order
Example:
bash
node scripts/poke-cli.js byo --location Kloof --size regular \
--base "sticky rice" --protein salmon \
--topping mango --topping cucumber --topping edamame --topping radish \
--sauce "house shoyu" --sauce "creamy togarashi" \
--crunch "cashew nuts"Discover options: Use to see all available ingredients with prices.
byo-options --location <name>byo必填参数:
- — 门店名称(支持部分匹配)
--location <name> - — 碗品尺寸(常规款83兰特,大份装99兰特)
--size <regular|maxi> - — 1-2种基底(重复参数可选择双拼基底,或输入"none")
--base <name> - — 1种蛋白质(或输入"none")
--protein <name> - — 1-4种配料(重复参数添加多种)
--topping <name> - — 1-2种酱料(重复参数添加多种),或输入"none"选择无酱料
--sauce <name> - — 1种脆顶(或输入"none")
--crunch <name>
可选参数:
- — 付费附加食材,最多2种(重复参数添加多种)
--extra <name> - — 额外蛋白质
--extra-protein <name> - — 额外酱料(付费,重复参数添加多种)
--extra-sauce <name> - — 移除默认配料
--remove <name> - — 添加配菜
--side <name> - — 添加饮品
--drink <name> - — 输出可直接用于下单的JSON格式商品信息(可通过管道传递给
--json命令)order
示例:
bash
node scripts/poke-cli.js byo --location Kloof --size regular \
--base "sticky rice" --protein salmon \
--topping mango --topping cucumber --topping edamame --topping radish \
--sauce "house shoyu" --sauce "creamy togarashi" \
--crunch "cashew nuts"查看可用选项: 使用命令查看所有可用配料及其价格。
byo-options --location <name>Deal Items (generic)
套餐商品(通用)
When returns an item with , you must provide in the order:
searchdeal_groupschoices- Each key is a partial match on the group's
description - Each value is an array of partial matches on option names
- Check and
required/minto know which groups need selectionsmax
当命令返回包含的商品时,你必须提供字段,规则如下:
searchdeal_groupschoices- 每个键是对套餐组的部分匹配
description - 每个值是对选项名称的部分匹配数组
- 查看和
required/min字段了解哪些套餐组需要选择max
Authentication
身份验证
Ensure is set
POKE_TOKEN=<token>请确保已设置环境变量
POKE_TOKEN=<token>Errors
错误处理
All errors return to stderr with exit code 1.
{ "error": "..." }| Error | Fix |
|---|---|
| No location matching "X" | Check |
| Not currently accepting orders | |
| No menu item matching "X" | Broaden search query or check |
| Deal requires "choices" | Use |
所有错误都会向stderr返回,并以退出码1结束程序。
{ "error": "..." }| 错误 | 解决方法 |
|---|---|
| 没有匹配“X”的门店 | 查看 |
| 当前不接受订单 | |
| 没有匹配“X”的菜单商品 | 扩大搜索范围或先查看 |
| 套餐需要“choices”字段 | 使用 |
Tips
小贴士
- Prefer over
search— menu dumps 80+ items; search returns only matchesmenu - Partial matching everywhere — "kloof" matches "Kloof St", "salmon" matches "Salmon Sashimi"
- Mobile format — use international format:
+27XXXXXXXXX - Filter by category —
search --location Kloof --query rice --category sides
- 优先使用而非
search—menu命令会导出80+个商品;menu仅返回匹配结果search - 全平台支持部分匹配 — “kloof”会匹配“Kloof St”,“salmon”会匹配“Salmon Sashimi”
- 手机号格式 — 使用国际格式:
+27XXXXXXXXX - 按分类筛选 —
search --location Kloof --query rice --category sides