Show HN: CLI to order groceries via reverse-engineered REWE API (Haskell)
A developer has reverse-engineered the REWE supermarket API to create 'korb', a Haskell CLI for automated grocery ordering and pickup. This project impressed HN with its blend of practical utility, advanced technical execution, including mTLS handling and OpenAPI spec generation, and its unique use of formal verification with Lean 4 for even "overkill" features. It's a prime example of building a sophisticated personal tool with cutting-edge techniques.
The Lowdown
The korb CLI is a personal project showcasing a sophisticated approach to automating grocery shopping. Written in Haskell, it interacts directly with the REWE (a German supermarket chain) API, which the author reverse-engineered, to allow programmatic control over basket creation, product search, and order placement for pickup. The tool is designed to be leveraged by "agents" (like AI assistants) to streamline the weekly grocery run.
- Reverse-Engineering Prowess: The project started with the intricate process of reverse-engineering REWE's API, including its use of mTLS, and leveraged tools like
mitmproxy2swaggerto generate OpenAPI specifications. - Haskell & AI-Assisted Development: Developed in Haskell, the author notes the smooth development process in 2026, often leveraging AI to overcome common hurdles like build systems or type issues.
- Automated Workflow:
korbfacilitates an end-to-end automated grocery ordering workflow, from adding items via a Siri shortcut to confirming and placing the order through an AI agent (e.g., Claude) that useskorbcommands. - Comprehensive CLI Functionality: The command-line interface provides extensive capabilities, including authentication, store selection, product search (by name or EAN), managing favorites, adding items to a basket, selecting pickup timeslots, and placing or canceling orders.
- Advanced Features: Beyond basic ordering,
korboffers features like suggesting items to reach free pickup thresholds based on purchase history and the ability to list and download digital receipts (eBons). - Formal Verification for Fun: Uniquely, the
korbsuggestion engine is re-implemented in Lean 4 with mathematically proven properties, and its Haskell counterpart is verified using a Differential Random Testing bridge – a demonstration of technical depth, acknowledged as "overkill, just for fun."
This 'Show HN' entry exemplifies how deep technical dives, creative problem-solving, and a touch of academic rigor can converge to build a highly functional and personally valuable automation tool.