A zero dependency Node.js wrapper for the Bring! shopping list API, entirely written in TypeScript with full feature parity to the Python bring-api package.
- 🎯 Complete API Coverage - All Bring! API endpoints implemented
- 🔄 Modern Batch Operations - Efficient item management with
batchUpdateList() - 🍽️ Recipe Inspirations - Browse and import seasonal recipes
- 📱 Activity Tracking - Monitor list changes and notifications
- 🔒 Type-Safe - Full TypeScript definitions included
- ⚡ Zero Dependencies - Uses native Node.js fetch API
- 🛠️ CLI Tools - Includes
bring-recipescommand-line tool
- Node.js 18.0.0 or higher
npm install bring-shoppingconst Bring = require('bring-shopping');
async function main() {
// Initialize with credentials
const bring = new Bring({
mail: 'your@email.com',
password: 'yourpassword'
});
// Login
await bring.login();
console.log(`Logged in as ${bring.name}`);
// Get all lists
const lists = await bring.loadLists();
const listUuid = lists.lists[0].listUuid;
// Get items from a list
const items = await bring.getItems(listUuid);
console.log('Shopping list:', items.purchase);
// Add item using modern batch API
await bring.batchUpdateList(listUuid, [{
itemId: 'Milk',
spec: '2 liters',
operation: 'TO_PURCHASE'
}]);
}
main();Authenticate with Bring! and obtain access tokens.
await bring.login();Get current user profile information.
const user = await bring.getUserAccount();
console.log(user.email, user.publicUserUuid);Get all shopping lists.
const lists = await bring.loadLists();
// { lists: [{ listUuid, name, theme }] }Get all items from a specific list.
const items = await bring.getItems(listUuid);
// { purchase: [...], recently: [...] }Get detailed information about list items.
const details = await bring.getItemsDetails(listUuid);Add an item to a list.
await bring.saveItem(listUuid, 'Milk', '2 liters');Remove an item from a list.
await bring.removeItem(listUuid, 'Milk');Move item to recently purchased.
await bring.moveToRecentList(listUuid, 'Milk');Perform batch operations on multiple items atomically.
await bring.batchUpdateList(listUuid, [
{ itemId: 'Milk', spec: '2L', operation: 'TO_PURCHASE' },
{ itemId: 'Bread', spec: '', operation: 'TO_PURCHASE' },
{ itemId: 'Eggs', spec: '', operation: 'TO_RECENTLY' }
]);Operations:
TO_PURCHASE- Add to shopping listTO_RECENTLY- Mark as purchasedREMOVE- Delete from list
Update an existing item's specification.
await bring.updateItem(listUuid, 'Milk', '3 liters');Mark an item as purchased.
await bring.completeItem(listUuid, 'Milk', '2 liters');Get all users with access to a list.
const users = await bring.getAllUsersFromList(listUuid);Get user settings and preferences.
const settings = await bring.getUserSettings();Set language preference for a list.
await bring.setListArticleLanguage(listUuid, 'de-DE');Get activity timeline for a list.
const activity = await bring.getActivity(listUuid);
// { timeline: [...], totalEvents: 42 }Send notifications to list members.
await bring.notify(listUuid, 'GOING_SHOPPING', ['store name']);Notification Types:
GOING_SHOPPINGCHANGED_LISTSHOPPING_DONEURGENT_MESSAGE
Get recipe and meal suggestions.
const recipes = await bring.getInspirations(['seasonal'], 0, 10);
// { entries: [...], count: 10, total: 100 }Get available filter categories for recipes.
const filters = await bring.getInspirationFilters();
// { filters: [{ id, name, tags, ... }] }Get item name translations.
const translations = await bring.loadTranslations('de-DE');
// { "Milk": "Milch", ... }Get complete item catalog with categories.
const catalog = await bring.loadCatalog('de-DE');Add an image to an item.
await bring.saveItemImage(itemUuid, { imageData: base64String });Remove an item's image.
await bring.removeItemImage(itemUuid);Get pending list invitations.
const invites = await bring.getPendingInvitations();CLI for browsing Bring! recipe inspirations. Browse-only - recipe ingredients are not available via the Bring! Inspirations API.
Installation:
cd skills/bring-recipes
npm installUsage:
# Set credentials
export BRING_EMAIL="your@email.com"
export BRING_PASSWORD="yourpassword"
# Browse recipes
node index.js list
# Filter recipes
node index.js list --filter mine
# Show available filters
node index.js filters
# JSON output for scripting
node index.js list --jsonFeatures:
- Browse recipe inspirations (TEMPLATE, RECIPE, POST types)
- Filter by tags (all, mine)
- View recipe metadata (name, author, images, links, likes)
- JSON mode for automation
⚠️ Note: Cannot import ingredients (API limitation)
API Limitation: The Bring! getInspirations() API returns only recipe metadata, not ingredient lists. This CLI is designed for recipe discovery and browsing only.
See skills/bring-recipes/README.md for full documentation.
CLI for adding items to Bring! shopping lists. Supports quick mode, batch mode, stdin, and interactive mode.
Installation:
cd skills/bring-add
npm installUsage:
# Set credentials
export BRING_EMAIL="your@email.com"
export BRING_PASSWORD="yourpassword"
export BRING_DEFAULT_LIST="Shopping" # optional
# Quick mode - single item
node index.js "Tomatoes" "500g"
# Batch mode - multiple items
node index.js --batch "Tomatoes 500g, Onions, Cheese 200g"
# Stdin mode - pipe items
echo -e "Milk 1L\nBread" | node index.js -
# Dry-run - preview without adding
node index.js --dry-run --batch "Apples, Pears"
# JSON output for scripting
node index.js --json lists
# Interactive mode
node index.jsFeatures:
- Quick, batch, stdin, and interactive input modes
--dry-runfor previewing changes--jsonfor machine-readable output--quietfor scripts- Smart parsing:
Tomatoes 500g→ item: "Tomatoes", spec: "500g" - Follows CLI Guidelines
See skills/bring-add/README.md for full documentation.
Full TypeScript definitions included:
import Bring = require('bring-shopping');
const bring = new Bring({
mail: 'your@email.com',
password: 'yourpassword'
});
// Full type inference
const lists: LoadListsResponse = await bring.loadLists();
const items: GetItemsResponse = await bring.getItems(lists.lists[0].listUuid);All methods throw errors with descriptive messages:
try {
await bring.login();
} catch (error) {
if (error.message.includes('Cannot Login')) {
console.error('Invalid credentials');
}
}npm install
npm run buildnpm testnode-bring-api/
├── src/
│ └── bring.ts # Main implementation
├── build/
│ ├── bring.js # Compiled JavaScript
│ └── bring.d.ts # TypeScript definitions
├── test/
│ ├── testMinimal.js
│ └── testNewApis.js # Tests for new features
├── skills/
│ └── bring-recipes/ # CLI tool
└── docs/
└── plans/ # Design documents
This package provides complete feature parity with bring-api (Python):
| Feature | Node Package | Python Package | Status |
|---|---|---|---|
| Authentication | ✅ | ✅ | Complete |
| User account info | ✅ | ✅ | Complete |
| List management | ✅ | ✅ | Complete |
| Item operations | ✅ | ✅ | Complete |
| Batch operations | ✅ | ✅ | Complete |
| Activity tracking | ✅ | ✅ | Complete |
| Notifications | ✅ | ✅ | Complete |
| Recipe inspirations | ✅ | ✅ | Complete |
| Image management | ✅ | ✅ | Complete |
Contributions welcome! Please feel free to submit a Pull Request.
The developers of this module are in no way endorsed by or affiliated with Bring! Labs AG, or any associated subsidiaries, logos or trademarks.
MIT
- 🆕 New API Methods - Complete feature parity with Python package
getUserAccount()- Get user profile informationbatchUpdateList()- Modern batch item operationsupdateItem()- Update item specificationcompleteItem()- Mark item as purchasedgetActivity()- Get list activity timelinenotify()- Send notifications to list membersgetInspirations()- Get recipe suggestionsgetInspirationFilters()- Get recipe filter categoriessetListArticleLanguage()- Set list language preference
- 🔧 Improvements
- Added HTTP status checks to all new methods
- Proper TypeScript interfaces for all request/response types
- Fixed double response body read bug
- Comprehensive test suite for new features
- 🛠️ New CLI Tool
bring-recipes- Interactive seasonal recipe CLI- Auto-detects seasons, batch-adds ingredients
- Supports JSON output for scripting
- (@foxriver76) also throw on http errors
- (@foxriver76) ported to native
fetchmodule (BREAKING: Requires Node.js 18 or above)
- (foxriver76) updated types
- (foxriver76) fixed
removeItemImageas headers were missing
- (Aliyss) added methods to link an image to an item (PR #221)
- (foxriver76) fixed typos in types (thanks to @Squawnchy)
- (foxriver76) restructure to typescript
- (foxriver76) fixed issue where error was used instead of the message on
getPendingInvitations
- (mdhom) added
getItemsDetailsmethod - (foxriver76) now reject with real errors instead of strings
- (foxriver76) on new call of login overwrite bearer header to allow reauth
- (foxriver76) new functionalities -> getTranslations, getCatalog and getPendingInvitations
- (foxriver76) use API version v2
- (foxriver76) official release