#!/usr/bin/env python3
"""
EDEN CREDENTIAL MEMORY
Stores Jamey's keys so he never has to type them again.
"""
import json
import getpass
import os

SECRETS_PATH = "/Eden/CORE/secrets.json"

def memorize_credentials():
    print("🦁 INITIALIZING EDEN IDENTITY LINK...")
    
    # I already know this, so I will hardcode it for you.
    email = "jameyecho@gmail.com" 
    print(f"✅ Identity Verified: {email}")
    
    print("\n🔑 I need the Google App Password one last time to lock it in memory.")
    password = getpass.getpass("Enter App Password (hidden): ")
    
    data = {
        "email": email,
        "password": password
    }
    
    with open(SECRETS_PATH, "w") as f:
        json.dump(data, f)
    
    print(f"\n✅ LOCKED. Credentials saved to {SECRETS_PATH}.")
    print("🦁 I will now fire at will without asking for ID.")

if __name__ == "__main__":
    memorize_credentials()
