360 Secure SkillHub
360 安全技能中心

bring

通过 Node 命令行工具登录 Bring! 账号,查看购物清单及其条目,使用 smartadd 做目录匹配添加商品、把条目移入最近购买,并缓存清单语言偏好。凭据来自环境变量、标准输入或隐藏提示,会话令牌本地缓存 7 天。

分类:生活
grewingm
grewingm
热度 54.53
最近更新 2026-11-30 21:06:15

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add grewingm/bring
兼容性
OpenClaw 专属
联网要求
需要联网
数据出网
必须出网
Metadata
name
bring
description
Manage Bring! shopping lists - view your lists and their items, add and remove items, and look up Bring's item catalog and translations. Logs in with your Bring email and password (from the skill config or a local file) and caches the session locally. Never calls the list-member or invitation APIs.
allowed-tools
["exec"]
permissions
["env","network","file_read","file_write"]
user-invocable
true
metadata
{"openclaw":{"homepage":"https://github.com/GrewingM/openclaw-skill-bring","requires":{"bins":["node","npm"]},"config":[{"id":"BRING_EMAIL","label":"Bring account email","type":"string"},{"id":"BRING_PASSWORD","label":"Bring password","type":"secret"}]}}

Bring Shopping List Integration

Secrets: rules for the agent

  • Never ask the user to type, paste or send their Bring password in chat, and never put it in a command line or a file you write.
  • If the password is missing, tell the user to do one of these themselves: set BRING_PASSWORD (and BRING_EMAIL) in the skill's OpenClaw config, where the password is declared as a secret, or run configure in their own terminal, which asks for the password with a hidden prompt.
  • Never print BRING_PASSWORD, ~/.openclaw/bring/config.json or ~/.openclaw/bring/token.json.
  • If the user pastes the password into chat anyway: don't repeat it, don't use it in a command, and suggest they change their Bring password and set it up again as above.

What the skill accesses

  • Bring! account: your lists (UUID, name, theme), their items and item details, and Bring's public item catalog and translations (for smartadd and language detection). It adds and removes items. It never calls the list-member, invitation or account-settings APIs, and the lists and findlist output carries only UUID, name and theme.
  • Network: the Bring! API (through the bring-shopping npm package), nothing else.
  • Environment: BRING_EMAIL, BRING_PASSWORD.
  • Local files: ~/.openclaw/bring/config.json and ~/.openclaw/bring/token.json (see Setup).

Invocation

The CLI lives at scripts/bring-cli.js (its helper modules are in scripts/lib/). Always prefix with NODE_PATH=$(npm root -g):

NODE_PATH=$(npm root -g) node ~/.openclaw/workspace/skills/bring/scripts/bring-cli.js <command> [args]

Prerequisites

npm install -g bring-shopping

Setup

The user does this once; the agent only explains it. The password is never passed as an argument. The CLI takes it from, in this order:

  1. the BRING_PASSWORD environment variable (recommended in OpenClaw: set it in the skill's config);
  2. stdin, with --password-stdin (for automation and password managers);
  3. a hidden prompt, when the user runs configure in their own terminal.

Without any of these it stops with exit code 2 instead of waiting. The email comes from the argument, BRING_EMAIL, or a prompt.

# Linux / macOS: in a terminal, prompts for the password without echoing it
NODE_PATH=$(npm root -g) node ~/.openclaw/workspace/skills/bring/scripts/bring-cli.js configure you@example.com
# Windows (PowerShell 7)
$env:NODE_PATH = npm root -g
node $env:USERPROFILE\.openclaw\workspace\skills\bring\scripts\bring-cli.js configure you@example.com

Config stored at ~/.openclaw/bring/config.json. Tokens cached at ~/.openclaw/bring/token.json (7-day expiry). The token cache records the account email (lowercased, nothing derived from the password) and is only reused for that account; when BRING_EMAIL or the stored email points to another account, the CLI logs in again and replaces the cache. After changing the Bring password, run renew so the cached session is replaced.

What is stored locally: the email, and the password when it came from the prompt or stdin (in plain text in config.json), plus the Bring session tokens in token.json. Both files are readable by your user only: on Linux and macOS the folder is created with mode 0700 and the files with 0600, and files left with looser permissions by an older version are tightened before they are read or rewritten. On Windows file modes don't apply; the files get the permissions of your user profile folder. A password supplied through BRING_PASSWORD is not written to disk; keep the variable set so the CLI can log in again when the token expires. When BRING_PASSWORD or BRING_EMAIL is set, it takes precedence over the stored value.

Commands

Command Args Notes
configure [email] [--password-stdin] One-time setup; password from BRING_PASSWORD, stdin or a hidden prompt
renew — Force re-login if token expired
lists — All lists with UUIDs
findlist <name> Partial name match
items [listUuid] Default list if omitted
add <listUuid> <item> [note] Raw add, no catalog lookup
smartadd <listUuid> <item> [locale] [note] Preferred: catalog-aware, gets icons
remove <listUuid> <item> Moves to recent
setdefault <listUuid> Avoid passing UUID every time
detectlang <listUuid> Auto-detect list language
setlang <listUuid> <locale> Cache language preference
getlang <listUuid> Cached or auto-detected

Supported locales: en-US, it-IT, es-ES, de-DE, fr-FR

Values are checked before any request: <listUuid> must be a list UUID (from lists), <locale> must look like de-DE, and <item> / [note] must be 1-100 characters of plain text without &, =, % or + (the Bring library sends them unencoded; write "and" instead of "&"). Error messages never repeat the values you passed: argument checks and failures reported by Bring (login, unknown list, network) are printed as fixed text.

Workflow

Adding items (prefer smartadd)

  1. If user doesn't specify a list, use default (check items without UUID first).
  2. Use smartadd with the list's locale for icon support. Fall back to add if catalog miss.
  3. Confirm what was added.

Viewing items

Run items (with listUuid or default). Present purchase items as "to buy" and recently as "recently bought".

Removing items

Run remove <listUuid> "<exact-item-name>". Item names are case-sensitive — match exactly from items output.

Gotchas

  • Item names are case-sensitive — copy exact names from items output.
  • remove moves to recent, doesn't delete.
  • Token cache expires after 7 days; run renew if commands start failing with auth errors, and after every password change.
  • smartadd needs the right locale to find catalog matches.
  • Lists use mixed languages (e.g. "Home in Florence" has Italian, German, English items). Detect per-list.