File size: 1,529 Bytes
bbdd198
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
52
53
54
55
@echo off
setlocal enabledelayedexpansion



REM ==================================================

REM  AI-Toolkit — Secure UI Launcher (Password Prompt)

REM  Double-click to start / Ctrl+C to stop

REM ==================================================



REM  Assumptions:

REM   • This file lives inside the ai-toolkit root folder

REM     (next to the "ui" directory and "venv" folder).

REM   • You have already run the full installer once.

REM --------------------------------------------------

:: Check venv exists
if not exist "venv\Scripts\activate.bat" (
    echo [ERROR] venv not found. Run the installer first.
    pause
    exit /b 1
)

:: -------------------------------------------------
:: Ask for password
:: -------------------------------------------------
echo.
echo Enter a password to protect the AI‑Toolkit UI.
set /p UI_PWD=Password: 

if "%UI_PWD%"=="" (
    echo No password entered. Aborting.
    pause
    exit /b 1
)

set "AI_TOOLKIT_AUTH=%UI_PWD%"
echo Password set.

:: -------------------------------------------------
:: Activate Python venv
:: -------------------------------------------------
call "venv\Scripts\activate.bat"

:: Kill any stray Node servers (frees port & file locks)
taskkill /F /IM node.exe >nul 2>&1

:: Change into UI directory
cd ui

:: Launch UI with password protection
echo Starting AI‑Toolkit UI on http://localhost:3000
echo Press Ctrl+C to stop the server when you are done.
npm run build_and_start

endlocal