summaryrefslogtreecommitdiff
path: root/README.md
blob: 2674b7b0946b95df316c196e98140e68217c0a92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# 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.