← 返回
效率工具 Key 中文

Bring Add

Use when user wants to add items to Bring! shopping lists. For adding single items, batch items, or items from stdin/files. Supports dry-run preview and JSON output.
用于向Bring!购物清单添加商品。支持单个、批量或从stdin/文件添加。支持预览和JSON输出。
darkdevelopers
效率工具 clawhub v1.0.0 1 版本 99568.4 Key: 需要
★ 1
Stars
📥 2,287
下载
💾 47
安装
1
版本
#latest

概述

Bring! Add Items CLI

Overview

CLI for adding items to Bring! shopping lists. Supports quick single-item mode, batch mode, stdin/pipe input, and interactive mode.

When to Use

Use this skill when:

  • User wants to add items to a Bring! shopping list
  • Adding single item with optional specification (e.g., "Milk 1L")
  • Adding multiple items at once (batch mode)
  • Piping items from a file or other command
  • Need to preview additions with dry-run
  • Need JSON output for scripting

Don't use when:

  • User wants to browse recipes (use bring-recipes instead)
  • User wants to remove items from a list
  • User wants to view current list contents

Quick Reference

CommandPurpose
------------------
bring-add "Item" "spec"Add single item with specification
bring-add --batch "A, B 1L, C"Add multiple comma-separated items
bring-add -Read items from stdin
bring-addInteractive mode (TTY only)
bring-add listsShow available shopping lists
bring-add --dry-run ...Preview without modifying

Environment variables:

export BRING_EMAIL="your@email.com"
export BRING_PASSWORD="yourpassword"
export BRING_DEFAULT_LIST="Shopping"  # optional

Installation

cd skills/bring-add
npm install

Common Workflows

Add a single item:

node index.js "Tomatoes" "500g"
node index.js "Milk"

Add to specific list:

node index.js --list "Party" "Chips" "3 bags"

Batch add multiple items:

node index.js --batch "Tomatoes 500g, Onions, Cheese 200g"

Pipe from file:

cat shopping-list.txt | node index.js -
echo -e "Milk 1L\nBread\nButter" | node index.js -

Preview before adding:

node index.js --dry-run --batch "Apples 1kg, Pears"

Get JSON output:

node index.js --json --batch "Milk, Bread" 2>/dev/null

List available lists:

node index.js lists
node index.js --json lists

Flags Reference

FlagDescription
-------------------
-l, --list Target list (name or UUID)
-b, --batch Comma-separated items
-n, --dry-runPreview without modifying
-q, --quietSuppress non-error output
-v, --verboseShow detailed progress
--jsonOutput JSON to stdout
--no-colorDisable colored output
--no-inputNever prompt; fail if input required

Input Format

Items follow the pattern: ItemName [Specification]

InputItemSpec
-------------------
Tomatoes 500gTomatoes500g
Oat milk 1LOat milk1L
Red onions 3Red onions3
CheeseCheese(empty)

Rule: Last word becomes specification if it contains a number or unit (g, kg, L, ml, Stück, pck).

Exit Codes

CodeMeaning
---------------
0Success
1Generic failure (API error, network)
2Invalid usage (bad args, missing input)
3Authentication failed
4List not found
130Interrupted (Ctrl-C)

Common Mistakes

Forgetting environment variables:

Set BRING_EMAIL and BRING_PASSWORD before running.

Wrong list name:

Use bring-add lists to see available lists and their exact names.

Specification parsing:

The last word is treated as specification only if it looks like a quantity. "Red onions" stays as one item, but "Red onions 3" splits into item "Red onions" with spec "3".

Interactive mode in scripts:

Use --no-input flag in scripts to fail explicitly rather than hang waiting for input.

Implementation Notes

  • Uses node-bring-api with batchUpdateList() API
  • Requires Node.js 18.0.0+
  • Outputs data to stdout, progress/errors to stderr
  • JSON mode available for automation
  • Interactive mode only when stdin is a TTY

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-28 15:36 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

productivity

Weather

steipete
获取当前天气和预报(无需API密钥)
★ 444 📥 226,110
productivity

Nano Pdf

steipete
使用nano-pdf CLI通过自然语言指令编辑PDF
★ 275 📥 114,726
security-compliance

Bring Recipes

darkdevelopers
当用户想浏览Bring!购物应用的食谱灵感时使用。用于发现食谱、查看详情(名称、作者、类型、图片)或按标签筛选。注意:无法导入食材(API限制)。
★ 1 📥 2,254