---
description: Show manual health logs
---

# Show Manual Health Logs

Show manual health logs

> Usage: `show-logs [date or "today" or "yesterday" or date range]`

1. Execute the command
// turbo
```bash
python3 << 'PYTHON_SCRIPT'
from datetime import date, timedelta
from health.services.manual_log_storage import ManualLogStorage

# Parse date argument
raw_args = """$ARGUMENTS"""
# Handle case where $ARGUMENTS is literally the string "$ARGUMENTS" (no args provided)
args = raw_args.strip() if raw_args and raw_args != "$ARGUMENTS" else ""

storage = ManualLogStorage()

if not args or args == "today":
    target_date = date.today()
    logs = [storage.load_log(target_date)]
    show_range = False
elif args == "yesterday":
    target_date = date.today() - timedelta(days=1)
    logs = [storage.load_log(target_date)]
    show_range = False
elif " to " in args:
    # Date range
    parts = args.split(" to ")
    start_date = date.fromisoformat(parts[0].strip())
    end_date = date.fromisoformat(parts[1].strip())
    logs = storage.get_logs_in_range(start_date, end_date)
    show_range = True
else:
    # Specific date
    target_date = date.fromisoformat(args)
    logs = [storage.load_log(target_date)]
    show_range = False

# Display logs
if not logs or all(
    not (log.diet_entries or log.alcohol_entries or log.supplement_entries or log.feeling_entries or log.fasting_mode)
    for log in logs
):
    print("📋 No manual logs found for the specified date(s)")
else:
    for log in logs:
        # Skip empty logs in range view
        if show_range and not (log.diet_entries or log.alcohol_entries or log.supplement_entries or log.feeling_entries or log.fasting_mode):
            continue

        print("=" * 80)
        print(f"📋 Manual Health Log for {log.log_date} ({log.log_date.strftime('%A')})")
        print("=" * 80)

        if log.fasting_mode:
            print(f"\n🍽️  Fasting Mode: {log.fasting_mode}")

        if log.diet_entries:
            print("\n🍴 DIET ENTRIES:")
            for entry in sorted(log.diet_entries, key=lambda x: x.time):
                print(f"\n   [{entry.time}] {entry.meal_type.upper() if entry.meal_type else 'SNACK'}")
                print(f"   • {entry.description}")
                if entry.carbs:
                    print(f"   • Carbs: {entry.carbs}")
                if entry.estimated_calories:
                    print(f"   • Calories: ~{entry.estimated_calories}")
                if entry.notes:
                    print(f"   • Notes: {entry.notes}")

        if log.alcohol_entries:
            print("\n🍷 ALCOHOL CONSUMPTION:")
            for entry in sorted(log.alcohol_entries, key=lambda x: x.time):
                print(f"\n   [{entry.time}] {entry.drink_type.upper()}")
                print(f"   • Amount: {entry.amount}")
                print(f"   • NAC pre-drinking: {'✅ Yes' if entry.nac_taken else '❌ No'}")
                if entry.food_with_alcohol:
                    print(f"   • Food: {entry.food_with_alcohol}")
                if entry.notes:
                    print(f"   • Notes: {entry.notes}")

        if log.supplement_entries:
            print("\n💊 SUPPLEMENTS:")
            for entry in sorted(log.supplement_entries, key=lambda x: x.time):
                timing_str = f" ({entry.timing})" if entry.timing else ""
                dosage_str = f" - {entry.dosage}" if entry.dosage else ""
                print(f"   [{entry.time}] {entry.supplement_name}{dosage_str}{timing_str}")
                if entry.notes:
                    print(f"      Notes: {entry.notes}")

        if log.feeling_entries:
            print("\n🩺 BODY FEELINGS:")
            for entry in sorted(log.feeling_entries, key=lambda x: x.time):
                severity_str = f" ({entry.severity}/10)" if entry.severity else ""
                location_str = f" @ {entry.location}" if entry.location else ""
                print(f"\n   [{entry.time}] {entry.feeling_type.upper()}{severity_str}{location_str}")
                print(f"   • {entry.description}")
                if entry.triggers:
                    print(f"   • Triggers: {entry.triggers}")
                if entry.notes:
                    print(f"   • Notes: {entry.notes}")

        print("\n" + "=" * 80 + "\n")
PYTHON_SCRIPT
```
