Show HN: CLI to order groceries via reverse-engineered REWE API (Haskell) (github.com)
I just had the best time learning about the REWE (German supermarket chain) API, how they use mTLS and what the workflows are. Also `mitmproxy2swagger`[1] is a great tool to create OpenAPI spec automatically.
And then 2026 feels like the perfect time writing Haskell. The code is handwritten, but whenever I got stuck with the build system or was just not getting the types right, I could fall back to ask AI to unblock me. It was never that smooth before.
Finally the best side projects are the ones you actually use and this one will be used for all my future grocery shopping.
36 comments
[ 2.1 ms ] story [ 51.3 ms ] threadHaskell is indeed an interesting choice. ;)
Did you implement your own OAUTH2 flow in haskell for this?
It can search for items, add them to the basket, picks a delivery slot and does the checkout.
With a little more scaffolding in markdown files, this now takes care of my weekly shopping.
Also there already exists this reverse engineered project: https://github.com/ByteSizedMarius/rewerse-engineering/
I do have a suggestion for your app though: Have it compare your basket of goods across different markets in your region to show you the cheapest option. I'm pretty sure this possibility is actually one of the reasons they locked down the API.
I've used Data from REWE in the past and made a comparison between a couple of cities in Germany (I believe it was Frankfurt, cologne, Berlin, Munich and Hamburg). Hamburg was by far the most expensive, often as much as 10-20% more expensive.
This is a great idea. I just think the use case is not that big since REWE is the worst in the price/quality ration and just going to another shop would save you more.
Until it breaks in a few weeks.
It would have been a cool project!
The workflow in our house is basically to use Siri to add items to an iOS Reminders list as the week goes on. Then, the day of or day before we plan to shop we fill-in with commonly purchased items or one-off things and go shop.
It's been on my TODO list to have an agent "skill" take the Reminders list, ask for additional items, and populate the cart to schedule a pickup. We tend to prefer going in the store though to browse the produce because our local Kroger isn't great about that. Pickup is generally reserved for the weeks where we're feeling a bit short on time.
[1] https://github.com/CupOfOwls/kroger-api
The basic idea is to write a prove in Lean4 and then test both the production implementation (Haskell) and the Lean implementation against random inputs. Compare if the results are the same.
If that is the case -> you can be pretty sure the unproven production version is as correct as the proven lean version.
https://www.dev-log.me/formal_verification_in_any_language_f...
This is the future of doing groceries. Let us login with our credentials and let us do the search/filling the cart with agents.
Totally fine to do the payment only on the web, so everyone can be sure they only order what was wished, and not 300 avocados.
I think a big issue here is the lack of standard - there is no established way of where an MCP server should be hosted so that agents are easily able to find it. Right now, the best solution I could think of would be to serve it at something like rewe.de/shop/mcp and you'd manually have to register it with your agent.
I wrote a skill some time ago to support me with "agentic groceries" on my own - it's the future of shopping I would say.
My workflow:
- I paste in urls or text for receipts I will cook this week - agent extracts the ingredients, calculates cups to ml and such, replaces meat with vegi ingredients, replaces some other things I prefer always (often also creates a nice markdown receipe at this steo I can put into Obsidian) - check my list of favs, check search cache (so not every time the api is called, I'm a good netizen :D ) - ask me which items I have at home (no need to add to the basket) - search rewe api for multiple candidates and let me choose. - after each recipe I enter /new to start with fresh context - also I have a list of things I buy every week
I still put everything manually in the basket in the end, but this is not the thing which is time intensive.