Kroger API
Interact with all endpoints of the Kroger Public API. Read references/api-ref.md
for the full endpoint reference, and references/auth-guide.md for OAuth2 details.
Argument Parsing
Parse $ARGUMENTS — the first token routes to a script:
| First Token | Script | Description |
|---|---|---|
auth |
scripts/auth.cs |
Token acquisition and management |
products |
scripts/products.cs |
Product search and detail lookup |
locations |
scripts/locations.cs |
Store, chain, and department lookup |
cart |
scripts/cart.cs |
Add items to an authenticated cart |
identity |
scripts/identity.cs |
Authenticated customer profile |
If no arguments or unrecognized first token, show this usage summary and stop.
First-Time Setup
Read references/auth-guide.md and guide the user through setup. Register at
https://developer.kroger.com to obtain credentials, then run:
auth setup
This interactive command stores all credentials in the OS credential store (Windows Credential Manager / macOS Keychain / Linux Secret Service) — never plaintext.
Operations
All commands work in both bash and PowerShell shells (OpenCode's Bash tool uses pwsh.exe on Windows). Call them directly - no need for cd or special shell syntax. The working directory is automatically set to the skill root when invoked through OpenCode.
Auth
dotnet run scripts/auth.cs -- $2 $3 $4 $5 $6 $7
Subcommands: setup, client [scope], login, url [--scope <s>], exchange <code>, refresh, status
Products
dotnet run scripts/products.cs -- $2 $3 $4 $5 $6 $7
Subcommands: search <term>, get <productId>
Locations
dotnet run scripts/locations.cs -- $2 $3 $4 $5 $6 $7
Subcommands: search, get <id>, chains, chain <name>, departments, department <id>
Cart
dotnet run scripts/cart.cs -- $2 $3 $4 $5 $6 $7
Subcommands: add <items...> [--modality DELIVERY|PICKUP]
Identity
dotnet run scripts/identity.cs -- $2 $3 $4 $5 $6 $7
Subcommands: profile
Reference Files
references/api-ref.md— Full endpoint reference, parameters, and rate limitsreferences/auth-guide.md— OAuth2 flows, scopes, and token management