Command-line interface for gurkerl.at online grocery shopping (Austria).
โ Working Features: Login, Product Search, Shopping Lists, Shopping Cart
โณ Coming Soon: Orders, Checkout
Features
- ๐ Authentication - Secure login with macOS Keychain โ
- ๐ Product Search - Search the product catalog โ
- ๐ Shopping Lists - Create and manage shopping lists โ
- ๐ Shopping Cart - Add, remove, and view cart items โ
- ๐ฆ Order History - View past orders โณ
- ๐ป CLI-first - Human-friendly interface with JSON output for scripting
- ๐จ Rich formatting - Beautiful tables and colors
Installation
# Via Homebrew (recommended) brew tap pasogott/tap brew install gurkerlcli # Or via UV git clone https://github.com/pasogott/gurkerlcli.git cd gurkerlcli uv sync
Quick Start
# 1. Login gurkerlcli auth login # 2. Search for products gurkerlcli search "bio milch" # 3. Create shopping list gurkerlcli lists create "Wochenende" # 4. Show lists gurkerlcli lists list
Usage
Authentication โ
# Login (credentials stored in macOS Keychain) gurkerlcli auth login # Check status gurkerlcli auth whoami # Logout gurkerlcli auth logout
Alternative: .env file (Linux/CI)
For non-macOS systems or CI/CD, you can use a .env file:
# Copy example and fill in credentials cp .env.example .env # Edit .env with your credentials # Or use environment variables export GURKERL_EMAIL=your-email@example.com export GURKERL_PASSWORD=your-password
Note: .env file is less secure than Keychain. Use it only when Keychain is not available.
Search Products โ
# Basic search gurkerlcli search "bio milch" --limit 5 # JSON output for scripting gurkerlcli search "รคpfel" --json | jq '.[0]'
Shopping Lists โ
# List all shopping lists gurkerlcli lists list # Create new list gurkerlcli lists create "Wochenende Grillen" # Show list details gurkerlcli lists show 12345 # JSON output gurkerlcli lists list --json
Shopping Cart โ
# View cart gurkerlcli cart list # Add product to cart gurkerlcli cart add 4659 --quantity 2 # Remove product from cart gurkerlcli cart remove 4659 # Clear entire cart gurkerlcli cart clear --force # JSON output gurkerlcli cart list --json
Order History โณ (Coming Soon)
# Will be available soon:
gurkerlcli orders list
gurkerlcli orders show G-123456Configuration
Session Storage
- Session:
~/.config/gurkerlcli/session.json(expires after 7 days) - Credentials (priority order):
- macOS Keychain (most secure, macOS only)
.envfile (fallback for Linux/Windows)- Environment variables
GURKERL_EMAIL,GURKERL_PASSWORD(CI/Docker)
Debug Mode
# Enable debug output gurkerlcli search "test" --debug gurkerlcli lists list --debug
Examples
Scripting
# Find cheapest bio milk gurkerlcli search "bio milch" --json | jq 'sort_by(.price) | .[0]' # Export shopping lists gurkerlcli lists list --json > my_lists.json # Search and filter gurkerlcli search "bio" --json | jq '.[] | select(.price < 5)'
Development
# Install dev dependencies uv sync --group dev # Run tests uv run pytest tests/ -v # Lint uv run ruff check src/ # Format uv run ruff format src/
API Endpoints (Verified โ )
โ
POST /services/frontend-service/login
โ
GET /services/frontend-service/user
โ
GET /services/frontend-service/autocomplete-suggestion
โ
GET /api/v1/products/card
โ
GET /api/v1/components/shopping-lists
โ
GET /api/v2/shopping-lists/id/{id}
โ
POST /api/v1/shopping-lists
โ
GET /services/frontend-service/v2/cart-review/check-cart
โ
PUT /services/frontend-service/v2/cart-review/item/{orderFieldId}
โณ GET /services/frontend-service/v2/user-profile/orders
Limitations
โ ๏ธ Unofficial API Client
- No official API documentation
- Endpoints may change without notice
- No checkout/payment via CLI
- Rate limiting may apply
- Use responsibly!
Troubleshooting
Session Expired
gurkerlcli auth logout
gurkerlcli auth loginDebug Mode
gurkerlcli --debug search "test"License
MIT License - see LICENSE file
Disclaimer
Unofficial tool, not affiliated with gurkerl.at or REWE International AG. Use at your own risk.
Support
- ๐ Issues: GitHub Issues
- ๐ Docs: GitHub Wiki