---
description: Log alcohol consumption
argument-hint: <time> <type> <amount> [--nac] [--food "description"]
allowed-tools: Bash(python:*), Read
---

# Log Alcohol Consumption

Record alcohol intake for tracking metabolic impact and GABA rebound risk.

## Parse User Input

Input: $ARGUMENTS

Expected format: `<time> <type> <amount> [options]`

Examples:
- `20:00 wine "2 glasses" --nac --food "steak and veggies"`
- `19:30 spirits "3 shots vodka" --food "protein and salad"`
- `21:00 beer "1 pint"`

## Execute Python Script

!`python3 << 'PYTHON_SCRIPT'
from datetime import date
from health.services.manual_log_storage import ManualLogStorage
from health.models.manual_log import AlcoholEntry
import shlex

# Parse arguments
raw_args = """$ARGUMENTS"""
# Use shlex to handle quoted strings properly
args = shlex.split(raw_args)

time_str = args[0] if len(args) > 0 else "20:00"
drink_type = args[1] if len(args) > 1 else "unknown"
amount = args[2] if len(args) > 2 else "unknown amount"

nac_taken = False
food_with_alcohol = None
notes = None

i = 3
while i < len(args):
    if args[i] == '--nac':
        nac_taken = True
        i += 1
    elif args[i] == '--food' and i + 1 < len(args):
        food_with_alcohol = args[i + 1]
        i += 2
    elif args[i] == '--notes' and i + 1 < len(args):
        notes = args[i + 1]
        i += 2
    else:
        i += 1

entry = AlcoholEntry(
    time=time_str,
    drink_type=drink_type,
    amount=amount,
    food_with_alcohol=food_with_alcohol,
    nac_taken=nac_taken,
    notes=notes
)

storage = ManualLogStorage()
log = storage.add_alcohol_entry(date.today(), entry)

print(f"🍷 Alcohol entry logged for {date.today()}")
print(f"   Time: {entry.time}")
print(f"   Type: {entry.drink_type}")
print(f"   Amount: {entry.amount}")
if entry.nac_taken:
    print(f"   ✅ NAC taken (pre-drinking protection)")
else:
    print(f"   ⚠️  NAC NOT taken (higher metabolic stress risk)")
if entry.food_with_alcohol:
    print(f"   Food: {entry.food_with_alcohol}")

# Risk warnings
print("\n⚠️  IMPORTANT REMINDERS:")
print("   - NO Berberine with alcohol (hypoglycemia risk!)")
print("   - Expect possible GABA rebound tomorrow (anxiety/chest tightness)")
print("   - Take Magnesium before bed tonight")
print("   - Hydrate well")
PYTHON_SCRIPT
`
