-
Notifications
You must be signed in to change notification settings - Fork 401
Expand file tree
/
Copy pathstart_ui.bat
More file actions
51 lines (43 loc) · 1.38 KB
/
start_ui.bat
File metadata and controls
51 lines (43 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
@echo off
cd /d "%~dp0"
REM AutoForge UI Launcher for Windows
REM This script launches the web UI for the autonomous coding agent.
echo.
echo ====================================
echo AutoForge UI
echo ====================================
echo.
REM Kill any existing processes on port 8888
echo Cleaning up old processes...
for /f "tokens=5" %%a in ('netstat -aon ^| findstr ":8888" ^| findstr "LISTENING"') do (
taskkill /F /PID %%a >nul 2>&1
)
REM Check if Python is available
where python >nul 2>&1
if %ERRORLEVEL% neq 0 (
echo ERROR: Python not found in PATH
echo Please install Python from https://python.org
pause
exit /b 1
)
REM Check if venv exists with correct activation script
if not exist "venv\Scripts\activate.bat" (
echo Creating virtual environment...
python -m venv venv
)
REM Activate the virtual environment
call venv\Scripts\activate.bat
REM Install dependencies
echo Installing dependencies...
pip install -r requirements.txt --quiet
REM Ensure playwright-cli is available for browser automation
where playwright-cli >nul 2>&1
if %ERRORLEVEL% neq 0 (
echo Installing playwright-cli for browser automation...
call npm install -g @playwright/cli >nul 2>&1
if %ERRORLEVEL% neq 0 (
echo Note: Could not install playwright-cli. Install manually: npm install -g @playwright/cli
)
)
REM Run the Python launcher
python "%~dp0start_ui.py" %*