GB-Power-Market-JJ kronan-cli

install
source · Clone the upstream repo
git clone https://github.com/GeorgeDoors888/GB-Power-Market-JJ
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/GeorgeDoors888/GB-Power-Market-JJ "$T" && mkdir -p ~/.claude/skills && cp -r "$T/openclaw-skills/skills/arnif/kronan" ~/.claude/skills/georgedoors888-gb-power-market-jj-kronan-cli && rm -rf "$T"
OpenClaw · Install into ~/.openclaw/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/GeorgeDoors888/GB-Power-Market-JJ "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/openclaw-skills/skills/arnif/kronan" ~/.openclaw/skills/georgedoors888-gb-power-market-jj-kronan-cli && rm -rf "$T"
manifest: openclaw-skills/skills/arnif/kronan/SKILL.md
source content

kronan-cli

CLI tool for shopping at Kronan.is, Iceland's grocery store chain. Designed for both humans and AI agents.

Prerequisites

  • GitHub CLI (
    gh
    ) — required for the install command
  • An Icelandic phone number with Rafraen skilriki (SIM-based electronic ID) enabled — required for authentication

Install

gh repo clone arnif/kronan-cli /tmp/kronan-cli && bash /tmp/kronan-cli/install.sh

What this does: clones the repo to

/tmp/kronan-cli
, then
install.sh
downloads a pre-built binary from the latest GitHub release and places it at
~/.local/bin/kronan
(override with
INSTALL_DIR
).

To build from source instead:

gh repo clone arnif/kronan-cli && cd kronan-cli
bun install && bun build --compile src/index.ts --outfile kronan
mv kronan ~/.local/bin/

Security and privacy

  • Install script:
    install.sh
    executes on your machine and downloads a binary. Audit the repository and the script before running.
  • Token storage: Auth tokens (Cognito JWTs) are stored at
    ~/.kronan/tokens.json
    . These contain session credentials tied to your identity. Ensure the file is only readable by your user (
    chmod 600 ~/.kronan/tokens.json
    ).
  • PII:
    kronan me
    outputs your full user profile including name, phone number, and Icelandic national ID number (kennitala). Do not share this output in public channels or logged LLM conversations.
  • Credentials: The login flow sends an auth request to your phone via Rafraen skilriki. No passwords are transmitted or stored — authentication is SIM-based.

Authentication

kronan login <phone-number>

You will be prompted to confirm on your phone. Tokens are stored locally in

~/.kronan/tokens.json
and refresh automatically.

kronan logout    # Clear stored tokens
kronan status    # Check login status

Commands

Search products

kronan search "mjolk"
kronan search "epli" --limit 5
kronan search "braud" --json

Product details

kronan product <sku>
kronan product 02500188 --json

Cart management

kronan cart                         # View cart
kronan cart add <sku> [quantity]    # Add item
kronan cart update <lineId> <qty>  # Update quantity
kronan cart remove <lineId>        # Remove item

Order history

kronan orders                # Recent orders
kronan orders --json         # JSON output for parsing
kronan order <id>            # Specific order details

User profile

kronan me              # ⚠️  Outputs PII (name, phone, kennitala)
kronan me --json

AI Agent Usage

All commands support

--json
for structured output. This makes kronan-cli suitable as a tool for AI agents managing grocery shopping.

Important: Commands that change state (

cart add
,
cart update
,
cart remove
,
login
) can modify the user's real shopping cart or initiate authentication. Agents must ask for explicit user confirmation before running any state-changing command.

Read-only commands (

search
,
product
,
orders
,
order
,
cart
(view),
me
,
status
) are safe to run without confirmation.

Example agent workflow:

# 1. Check what the user usually buys
kronan orders --json

# 2. Search for a specific product
kronan search "nymjolk" --json --limit 5

# 3. Add items to cart
kronan cart add 100224198 6
kronan cart add 02200946 1

# 4. Review the cart
kronan cart --json

Typical weekly shopping pattern

An agent can analyze order history to find frequently purchased items and auto-populate the cart:

  1. Fetch orders with
    kronan orders --json
  2. Count product frequency across orders (by SKU)
  3. Add the top items at their typical quantities with
    kronan cart add <sku> <qty>
  4. Present the cart for user review with
    kronan cart

Flags

FlagDescription
--json
Structured JSON output (for AI agents)
--page <n>
Page number (search)
--limit <n>
Results per page
--offset <n>
Offset for pagination (orders)
--store <extId>
Store external ID (search, default: 159)

API Reference

The CLI wraps the Kronan backend API at

https://backend.kronan.is/api/
. Key endpoints:

EndpointMethodAuthDescription
/products/raw-search/
POSTNoProduct search
/products/{sku}/
GETNoProduct detail
/smart-checkouts/default/
GETYesView cart
/smart-checkouts/default/lines/
POSTYesAdd to cart
/smart-checkouts/default/lines/{id}/
PATCHYesUpdate cart line
/smart-checkouts/default/lines/{id}/
DELETEYesRemove from cart
/orders/
GETYesOrder history
/users/me/
GETYesUser profile
/customer_groups/
GETYesCustomer groups

Auth header format:

Authorization: CognitoJWT {idToken}

Cart endpoints also require:

Customer-Group-Id: {groupId}