#!python
"""
Trello CLI - Main executable
"""

import sys
import os
from pathlib import Path
from dotenv import load_dotenv

# Add parent directory to path to import trello_cli module
script_dir = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, script_dir)

# Load environment variables from .env file (if it exists)
env_file = Path.home() / ".trello_cli_env"
if not env_file.exists():
    env_file = Path(script_dir) / ".env"

if env_file.exists():
    load_dotenv(env_file)

from trello_cli.cli import main

if __name__ == '__main__':
    main()
