# Commis An AI-powered personal chef that tracks your pantry, logs what you've eaten, and generates a rotating weekly menu and grocery list — all running locally via Ollama. ## Requirements - Python 3.11+ - [Ollama](https://ollama.com) running locally with a model pulled (e.g. `ollama pull llama3`) ## Setup ```bash pip install -r requirements.txt cp .env.example .env # or edit .env directly uvicorn main:app --reload ``` Open [http://localhost:8000](http://localhost:8000). ### `.env` ``` OLLAMA_HOST=http://localhost:11434 MODEL_NAME=llama3 DATABASE_URL=sqlite:///./chef.db ``` Change `MODEL_NAME` to any model you have pulled locally (`mistral`, `llama3.1`, etc.). ## Features **Pantry** — Add ingredients with quantities, units, categories, and expiry dates. Items expiring within 7 days are highlighted; within 2 days flagged red. **Meal Log** — Record what you eat. Commis tracks the last 14 days of history so the AI knows what to avoid repeating. **Weekly Menu** — Hit "Generate Menu" and Ollama builds a 7-day breakfast/lunch/dinner plan based on what's in your pantry, prioritizing ingredients expiring soon and avoiding recent repeats. **Grocery List** — After generating a menu, "Generate List" diffs the menu's ingredient needs against your pantry and produces a cost-estimated shopping list grouped by store section. "Mark All Purchased" auto-updates your pantry. **Quick Recipe** — `POST /api/ai/suggest-recipe` returns one recipe you can make right now from what's on hand. ## API Interactive docs at [http://localhost:8000/docs](http://localhost:8000/docs) once the server is running.