@echo off TITLE Kronos AI Trading Terminal v6.0 COLOR 0B echo ==================================================== echo KRONOS AI TRADING TERMINAL - STARTUP echo ==================================================== :: Port to check set PORT=7860 :: Check if port is already in use and try to free it echo [1/3] Checking port %PORT%... for /f "tokens=5" %%a in ('netstat -aon ^| findstr :%PORT% ^| findstr LISTENING') do ( if not "%%a"=="" ( echo [INFO] Port %PORT% is in use by PID %%a. Freeing port... taskkill /F /PID %%a >nul 2>&1 timeout /t 2 >nul ) ) :: Check if virtual environment exists if not exist "venv\" ( echo [ERROR] Virtual environment 'venv' not found. echo Please create it using: python -m venv venv pause exit /b ) echo [2/3] Activating Virtual Environment... call venv\Scripts\activate echo [3/3] Launching AI Trading Terminal... echo [INFO] Application will open in your browser automatically. echo [INFO] Press CTRL+C in this window to stop the server. :: Open browser in background start http://localhost:%PORT% :: Run the app python app.py if %ERRORLEVEL% neq 0 ( echo. echo [ERROR] Backend failed to start. pause )