Initial commit: Bring Shopping List Skill
- CLI tool for managing Bring! shopping lists - Environment variable-based configuration - Commands: add, list, remove, recent - Complete English documentation - Security: credentials via env vars, not hardcoded Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.5
commit
df53e2f1ed
@@ -0,0 +1,146 @@
|
||||
# Bring Shopping List Skill
|
||||
|
||||
Manage your Bring! Shopping List via CLI using the unofficial Bring! API.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
npm install
|
||||
chmod +x bring
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
Set the following environment variables:
|
||||
|
||||
```bash
|
||||
export BRING_EMAIL="your-email@example.com"
|
||||
export BRING_PASSWORD="your-password"
|
||||
export BRING_LIST_UUID="your-list-uuid"
|
||||
```
|
||||
|
||||
### Option 1: Using a `.env` file (recommended)
|
||||
|
||||
Create a `.env` file in your skill directory:
|
||||
|
||||
```bash
|
||||
BRING_EMAIL=your-email@example.com
|
||||
BRING_PASSWORD=your-password
|
||||
BRING_LIST_UUID=your-list-uuid
|
||||
```
|
||||
|
||||
Then source it before running commands:
|
||||
```bash
|
||||
source .env
|
||||
./bring list
|
||||
```
|
||||
|
||||
Or use with AI agents that support .env files.
|
||||
|
||||
### Option 2: System environment variables
|
||||
|
||||
Add to your `~/.bashrc` or `~/.zshrc`:
|
||||
|
||||
```bash
|
||||
export BRING_EMAIL="your-email@example.com"
|
||||
export BRING_PASSWORD="your-password"
|
||||
export BRING_LIST_UUID="your-list-uuid"
|
||||
```
|
||||
|
||||
### Finding your List UUID
|
||||
|
||||
```javascript
|
||||
const bringApi = require('bring-shopping');
|
||||
const bring = new bringApi({
|
||||
mail: 'your@email.com',
|
||||
password: 'yourpassword'
|
||||
});
|
||||
await bring.login();
|
||||
const lists = await bring.loadLists();
|
||||
console.log(lists.lists); // Shows all lists with their UUIDs
|
||||
```
|
||||
|
||||
## Commands
|
||||
|
||||
```bash
|
||||
bring add <item> [specification] # Add item to shopping list
|
||||
bring list # Show current items
|
||||
bring remove <item> # Remove item (mark as purchased)
|
||||
bring recent # Show recently purchased items
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```bash
|
||||
# Add items
|
||||
bring add Apples
|
||||
bring add Milk "1 Liter"
|
||||
bring add "Coffee Beans" "Fair Trade"
|
||||
|
||||
# Show list
|
||||
bring list
|
||||
|
||||
# Remove item (mark as bought)
|
||||
bring remove Apples
|
||||
|
||||
# Show recently purchased items
|
||||
bring recent
|
||||
```
|
||||
|
||||
## Integration with AI Agents
|
||||
|
||||
### For nanoclaw/openclaw/Carson
|
||||
|
||||
Add to your `CLAUDE.md`:
|
||||
|
||||
```markdown
|
||||
## Bring! Shopping List
|
||||
|
||||
**IMPORTANT - "Shopping list" always means Bring! App:**
|
||||
|
||||
When the user says "shopping list", they ALWAYS mean the Bring! Shopping List App:
|
||||
- **NEVER** use a custom text file or other system
|
||||
- **ALWAYS** use the Bring skill: `bring`
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
bring add <item> [specification] # Add item
|
||||
bring list # Show list
|
||||
bring remove <item> # Remove item
|
||||
bring recent # Recently purchased
|
||||
```
|
||||
|
||||
**Examples:**
|
||||
- "Add milk to shopping list" → `bring add Milk`
|
||||
- "What's on the shopping list?" → `bring list`
|
||||
- "Remove apples from list" → `bring remove Apples`
|
||||
```
|
||||
|
||||
### Setting environment variables for AI agents
|
||||
|
||||
Create a `.env` file in the skill directory with your credentials, then ensure your AI agent loads it before executing commands.
|
||||
|
||||
For nanoclaw/Carson, you can set the environment variables in the skill activation:
|
||||
|
||||
```bash
|
||||
export BRING_EMAIL="your-email@example.com"
|
||||
export BRING_PASSWORD="your-password"
|
||||
export BRING_LIST_UUID="your-list-uuid"
|
||||
```
|
||||
|
||||
## API Reference
|
||||
|
||||
This skill uses the unofficial `bring-shopping` npm package:
|
||||
https://github.com/foxriver76/node-bring-api
|
||||
|
||||
## Security Notes
|
||||
|
||||
- **Never commit your `.env` file** - it's in `.gitignore` by default
|
||||
- Environment variables keep credentials out of the code
|
||||
- Each user/agent instance uses their own credentials
|
||||
|
||||
## Notes
|
||||
|
||||
- Items sync in real-time across all connected devices
|
||||
- The specification parameter is optional (e.g., "Organic", "500g", etc.)
|
||||
- Use quotes for items or specifications with spaces
|
||||
Reference in New Issue
Block a user