from setuptools import setup, find_packages
from setuptools.command.install import install
import sys

class PostInstallCommand(install):
    def run(self):
        install.run(self)
        banner = """
\033[36m      ___      ____   ______               ____      ____  \033[0m
\033[36m     /   |    /  _/  / ____/___   ____    / __ \    / __ ) \033[0m
\033[36m    / /| |    / /   / / __ / _ \ / __ \  / / / /   / __  | \033[0m
\033[36m   / ___ |  _/ /   / /_/ //  __// / / / / /_/ /   / /_/ /  \033[0m
\033[36m  /_/  |_| /___/   \____/ \___//_/ /_/ /_____/   /_____/   \033[0m
"""
        print(banner)
        print("\033[97m\n  Welcome to \033[0m\033[36mAIGenDB\033[0m\033[97m - Database architecture generated by AI\n\033[0m")

setup(
    name="aigendb",
    version="0.1.0",
    description="AIGenDB CLI Platform",
    long_description=open("README.md", encoding="utf-8").read(),
    long_description_content_type="text/markdown",
    license="PolyForm Noncommercial License 1.0.0",
    packages=find_packages(),
    install_requires=[
        "typer>=0.9.0",
        "rich>=13.0.0",
        "requests>=2.31.0",
        "python-dotenv>=1.0.0"
    ],
    entry_points={
        "console_scripts": [
            "aigendb=aigendb.cli:app",
        ],
    },
    cmdclass={
        'install': PostInstallCommand,
    },
)
