CLI for Kronan.is -- Iceland's grocery store. Search products, manage your cart, and view order history from the terminal. Built with Bun and designed to be used by AI agents.
One-liner (requires GitHub CLI)
gh repo clone arnif/kronan-cli /tmp/kronan-cli && bash /tmp/kronan-cli/install.shThis downloads the latest pre-built binary for your platform and installs it to ~/.local/bin/kronan.
INSTALL_DIR=/usr/local/bin bash install.shgit clone https://github.com/arnif/kronan-cli.git
cd kronan-cli
bun install
bun run src/index.ts helpKronan uses Rafraen skilriki (Iceland's SIM-based electronic ID) for login. You need an Icelandic phone number with Rafraen skilriki enabled.
kronan login XXXXXX # Sends auth request to your phone
kronan status # Check if you're logged in
kronan logout # Clear tokensTokens are stored in ~/.kronan/tokens.json and auto-refresh when expired.
kronan search <query> Search for products
kronan product <sku> Product details by SKU
kronan cart View cart
kronan cart add <sku> [qty] Add item to cart
kronan cart update <id> <qty> Update line quantity
kronan cart remove <id> Remove line from cart
kronan orders Order history
kronan order <id> Specific order details
kronan me User profile (⚠️ outputs PII, see below)
All commands support --json for structured output.
kronan-cli is designed to be called by AI agents as a tool. The --json flag on every command returns structured data suitable for parsing.
Example: an agent analyzing purchase history and building a weekly shopping cart:
# Analyze past orders
kronan orders --json
# Search for a product
kronan search "mjolk" --json --limit 5
# Build a cart from frequent items
kronan cart add 100224198 6 # Nymjolk x6
kronan cart add 02200946 1 # Heimilisbraud
kronan cart add 100253786 4 # Bananar
# Review
kronan cart --jsonsrc/
index.ts CLI entry point and command routing
auth.ts AWS Cognito auth (Rafraen skilriki flow)
api.ts Kronan backend API client
commands/
login.ts login, logout, status
search.ts product search and detail
orders.ts order history
cart.ts cart management
kronan me outputs your full user profile including personally identifiable information (PII) such as your name, phone number, and Icelandic national ID number (kennitala/SSN). Be careful when sharing this output — avoid pasting it in public channels, issue trackers, or LLM conversations that may be logged.
- Icelandic phone number with Rafraen skilriki for authentication
- GitHub CLI for installation (or Bun if running from source)
MIT