# 📝 Manual Health Data Entry Guide

Butler provides a CLI tool for manually logging health metrics that aren't captured by Garmin, such as diet, alcohol intake, supplements, and subjective body feelings.

## 🚀 Quick Start

All commands are accessed via the `health.cli.manual` module:

```bash
python -m health.cli.manual [COMMAND] [OPTIONS]
```

## 📋 Available Commands

### 1. 🍱 Diet Log (`diet`)
Log meals, snacks, and caloric intake.

**Usage:**
```bash
python -m health.cli.manual diet --time <HH:MM> --desc <TEXT> [OPTIONS]
```

**Options:**
- `--time` (Required): Time of meal (HH:MM)
- `--desc` (Required): What was eaten
- `--type`: Meal type (`breakfast`, `lunch`, `dinner`, `snack`)
- `--cals`: Estimated calories (integer)
- `--carbs`: Carb content (`Low`, `Medium`, `High`)
- `--notes`: Any additional notes
- `--date`: Date of entry (YYYY-MM-DD), defaults to today

**Example:**
```bash
# Log a healthy lunch
python -m health.cli.manual diet \
    --time 12:30 \
    --desc "Chicken Salad with Avocado" \
    --type lunch \
    --cals 500 \
    --carbs Low

# Log a snack
python -m health.cli.manual diet \
    --time 16:00 \
    --desc "Greek Yogurt" \
    --type snack
```

---

### 2. 🍷 Alcohol Log (`alcohol`)
Log alcohol consumption (critical for Health Protocol tracking).

**Usage:**
```bash
python -m health.cli.manual alcohol --time <HH:MM> --type <TYPE> --amount <AMOUNT> [OPTIONS]
```

**Options:**
- `--time` (Required): Time of drink (HH:MM)
- `--type` (Required): Type (`wine`, `spirits`, `beer`, `cocktail`)
- `--amount` (Required): Quantity (e.g., "1 glass", "2 shots")
- `--food`: Food eaten with/before alcohol (for protocol compliance)
- `--nac`: Flag if NAC was taken pre-drinking
- `--date`: Date of entry (YYYY-MM-DD)

**Example:**
```bash
# Log wine with dinner (Protocol Compliance)
python -m health.cli.manual alcohol \
    --time 20:00 \
    --type wine \
    --amount "1 glass" \
    --food "Steak" \
    --nac
```

---

### 3. 💊 Supplements (`supp`)
Log supplement intake.

**Usage:**
```bash
python -m health.cli.manual supp --time <HH:MM> --name <NAME> [OPTIONS]
```

**Options:**
- `--time` (Required): Time taken (HH:MM)
- `--name` (Required): Supplement name
- `--dosage`: Amount taken (e.g., "5000IU", "1 pill")
- `--timing`: Sort key (`morning`, `evening`, `bedtime`)
- `--date`: Date of entry (YYYY-MM-DD)

**Example:**
```bash
python -m health.cli.manual supp \
    --time 08:00 \
    --name "Vitamin D3" \
    --dosage "5000IU" \
    --timing morning
```

---

### 4. 🤒 Body Feelings (`feeling`)
Log subjective feelings, symptoms, or energy levels.

**Usage:**
```bash
python -m health.cli.manual feeling --time <HH:MM> --type <TYPE> --desc <TEXT> [OPTIONS]
```

**Options:**
- `--time` (Required): Time of feeling (HH:MM)
- `--type` (Required): Category (`energy`, `pain`, `chest_tightness`, `mood`)
- `--desc` (Required): Description
- `--severity`: 1-10 scale
- `--loc`: Body location (if applicable)
- `--triggers`: Suspected triggers
- `--date`: Date of entry (YYYY-MM-DD)

**Example:**
```bash
# Log high energy
python -m health.cli.manual feeling \
    --time 09:00 \
    --type energy \
    --desc "Feeling focus and high energy" \
    --severity 9

# Log chest tightness (Recurrent issue)
python -m health.cli.manual feeling \
    --time 21:00 \
    --type chest_tightness \
    --desc "Mild tightness after sitting too long" \
    --severity 3 \
    --triggers "Poor posture"
```

---

### 5. 🍽️ Fasting Mode (`fasting`)
Set the fasting protocol for the day.

**Usage:**
```bash
python -m health.cli.manual fasting --mode <MODE> [OPTIONS]
```

**Options:**
- `--mode` (Required): (`OMAD`, `PSMF`, `16:8`, `Water Fast`, `Normal`)
- `--date`: Date of entry (YYYY-MM-DD)

**Example:**
```bash
python -m health.cli.manual fasting --mode "OMAD"
```

## 📁 Data Storage

All data is stored in local JSON files at:
`data/health/manual_logs/YYYY/MM/YYYY-MM-DD.json`

Because the storage is file-based, you can also manually edit the JSON files if needed.
