MCPcopy Index your code
hub / github.com/Shmakov/kroger-cli

github.com/Shmakov/kroger-cli @v0.0.6

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.0.6 ↗ · + Follow
48 symbols 137 edges 7 files 2 documented · 4% updated 5y agov0.0.6 · 2020-06-01★ 1393 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Kroger CLI

Display Purchases Summary

The idea of the project is to create a command line utility that can automate certain tasks on the Kroger's website.

At this moment the application can:

The script works on kroger.com and other Kroger-owned grocery stores (Ralphs, Fry's, Fred Meyer, Dillons, Food 4 Less, etc).

Install/Download

Windows

You can download the latest version from the GitHub's releases tab.

Linux

  • Clone the repository: git clone git@github.com:Shmakov/kroger-cli.git && cd ./kroger-cli
  • Creating virtual environment: python3.8 -m venv ./venv (you might need to install sudo apt-get install python3.8-venv)
  • And activate it: source venv/bin/activate
  • Install the requirements: pip install -r requirements.txt
  • And you should be able to launch the project: python -m kroger_cli

CLI Commands

The application support non-interactive mode by passing a name of a command. An example on how to complete Kroger's Survey: kroger-cli survey.

Please use kroger-cli --help to see list of all available commands. Alternatively you can run the application without any command to launch the interactive mode (you can see the screenshot of it below).

Screenshots

Main Interface

Kroger CLI Screenshot

Clip Digital Coupons

Clip all Kroger's Digital Coupons

Purchases Summary

Display Purchases Summary

Fuel Points Balance

Fuel Points Balance

Complete Kroger's Feedback Form

Watch

Side Notes

The initial plan was to use plain HTTP (and requests package), however I couldn't sign in to the Kroger's website using it. Possibly had to do with csrf token validation and/or JavaScript-based protection. Because of that I had to use pyppeteer, which is a python's port of Puppeteer (Headless Chrome).

TODO

  • Purchased items (receipt data) Excel export, which could be useful for budgeting/categorization/filtering
  • Notification on when certain items go on sale

Core symbols most depended-on inside this repo

destroy
called by 13
kroger_cli/api.py
_write_config_file
called by 5
kroger_cli/cli.py
sign_in_routine
called by 5
kroger_cli/api.py
option_account_info
called by 3
kroger_cli/cli.py
_get_json_from_page_content
called by 3
kroger_cli/api.py
prompt_credentials
called by 2
kroger_cli/cli.py
option_survey
called by 2
kroger_cli/cli.py
option_points_balance
called by 2
kroger_cli/cli.py

Shape

Method 36
Function 9
Class 3

Languages

Python100%

Modules by API surface

kroger_cli/api.py18 symbols
kroger_cli/cli.py15 symbols
kroger_cli/memoize.py6 symbols
kroger_cli/__main__.py6 symbols
kroger_cli/helper.py3 symbols

For agents

$ claude mcp add kroger-cli \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact