#!/usr/bin/env python3
import os
import anthropic

# Initialize the client
client = anthropic.Anthropic(api_key=os.getenv("ANTHROPIC_API_KEY"))

def chat_with_claude():
    print("Claude AI is running on your Debian server! (Type 'quit' to exit)")
    
    while True:
        user_input = input("\nYou: ")
        
        if user_input.lower() in ['quit', 'exit', 'q']:
            print("Goodbye!")
            break
            
        try:
            message = client.messages.create(
                model="claude-3-opus-20240229",
                max_tokens=1000,
                temperature=0.7,
                messages=[{"role": "user", "content": user_input}]
            )
            
            print(f"\nClaude: {message.content[0].text}")
            
        except Exception as e:
            print(f"Error: {e}")

if __name__ == "__main__":
    chat_with_claude()
