CLI and OpenClaw skill for the Kroger API. Works with all Kroger-family stores: Kroger, Ralphs, Fred Meyer, Harris Teeter, King Soopers, Fry's, QFC, Mariano's, Pick 'n Save, and more.
go install github.com/blanxlait/krocli/cmd/krocli@latestOr build from source:
make build # → bin/kroclikrocli works out of the box — no Kroger developer account required. It uses a hosted OAuth proxy so you can start searching immediately.
krocli products search --term "milk" # Just works
krocli auth login # Browser login for cart/profile
krocli auth status # Shows "Mode: hosted"If you prefer to use your own Kroger developer app:
- Go to developer.kroger.com and create an app.
- Scopes:
product.compact,cart.basic:write,profile.compact - Redirect URI:
http://localhost:8080/callback
- Scopes:
- Import your credentials:
krocli auth credentials set /path/to/creds.jsonThis switches krocli to local mode, talking directly to the Kroger API. Remove ~/.config/krocli/credentials.json to switch back to hosted mode.
There are two auth modes:
- Client credentials — automatic, used for product/location searches
- Authorization code — required for cart and identity; run
krocli auth loginto complete the browser OAuth flow
krocli auth login # Browser OAuth → stores refresh token
krocli auth status # Show current auth state and mode (hosted/local)krocli products search --term "milk"
krocli products search --term "bread" --location-id 01400376 --limit 5
krocli products get 0011110838049krocli locations search --zip-code 45202
krocli locations search --zip-code 45202 --radius 25
krocli locations get 01400376
krocli locations chains
krocli locations departmentskrocli cart add --upc 0011110838049 --qty 2krocli identity profile| Flag | Format | Destination |
|---|---|---|
| (none) | Human-friendly | stderr |
-j |
JSON | stdout |
-p |
Plain/TSV | stdout |
Pipe-friendly: krocli -j products search --term "eggs" | jq '.data[].description'
This repo is also published as an OpenClaw skill on ClawHub. No CLI install needed — any LLM agent with OpenClaw learns the Kroger API directly.
clawhub install supermarketThen ask things like "search for organic milk at Ralphs" or "find King Soopers near 80202" and the skill handles it via the hosted proxy.
make build # Build binary
make lint # Run golangci-lint
make clean # Remove build artifacts