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(andBRING_EMAIL) in the skill's OpenClaw config, where the password is declared as a secret, or runconfigurein their own terminal, which asks for the password with a hidden prompt. - Never print
BRING_PASSWORD,~/.openclaw/bring/config.jsonor~/.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
smartaddand language detection). It adds and removes items. It never calls the list-member, invitation or account-settings APIs, and thelistsandfindlistoutput carries only UUID, name and theme. - Network: the Bring! API (through the
bring-shoppingnpm package), nothing else. - Environment:
BRING_EMAIL,BRING_PASSWORD. - Local files:
~/.openclaw/bring/config.jsonand~/.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:
- the
BRING_PASSWORDenvironment variable (recommended in OpenClaw: set it in the skill's config); - stdin, with
--password-stdin(for automation and password managers); - a hidden prompt, when the user runs
configurein 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)
- If user doesn't specify a list, use default (check
itemswithout UUID first). - Use
smartaddwith the list's locale for icon support. Fall back toaddif catalog miss. - 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
itemsoutput. removemoves to recent, doesn't delete.- Token cache expires after 7 days; run
renewif commands start failing with auth errors, and after every password change. smartaddneeds the right locale to find catalog matches.- Lists use mixed languages (e.g. "Home in Florence" has Italian, German, English items). Detect per-list.
