{"repo": "bhuvanesh-kumar-g/agentic-database-copilot", "files": {"run.py": {"7647d17996c6002c0a08d8fbbeeb5065b7eb1d58": {"t": 1785674392.529813, "n": 977, "h": "d7d1fd05ba5b7b69", "c": "#!/usr/bin/env python3\n\"\"\"\nDB Copilot launcher\n-------------------\nRun: python run.py\nThen open: http://localhost:8000\n\"\"\"\nimport sys, subprocess, pathlib\n\n\ndef main():\n ENV = pathlib.Path(\".env\")\n if not ENV.exists():\n import shutil\n ex = pathlib.Path(\".env.example\")\n if ex.exists():\n shutil.copy(ex, ENV)\n print(\"Created .env from .env.example — add your GROQ_API_KEY before querying.\")\n else:\n print(\"Warning: no .env file found. Create one with GROQ_API_KEY=gsk_...\")\n\n try:\n import uvicorn\n except ImportError:\n subprocess.check_call([sys.executable, \"-m\", \"pip\", \"install\", \"-r\", \"requirements.txt\"])\n import uvicorn\n\n print(\"\\n DB Copilot v2.0 — http://localhost:8000\\n\")\n uvicorn.run(\"backend.main:app\", host=\"0.0.0.0\", port=8000, reload=True)\n\n\n# ── REQUIRED on Windows: multiprocessing uses 'spawn', not 'fork' ────────────\nif __name__ == \"__main__\":\n main()\n"}}}}