Aitrepreneur commited on
Commit
028b5a9
·
verified ·
1 Parent(s): 4c87241

Upload 2 files

Browse files
Files changed (2) hide show
  1. LAUNCHER-TOOLKIT.bat +33 -0
  2. SECURE_LAUNCHER-TOOLKIT.bat +54 -0
LAUNCHER-TOOLKIT.bat ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @echo off
2
+ setlocal enabledelayedexpansion
3
+
4
+ REM ==================================================
5
+ REM AI‑Toolkit — Quick UI Launcher
6
+ REM Double‑click to start / Ctrl+C to stop
7
+ REM ==================================================
8
+
9
+ REM Assumptions:
10
+ REM • This file sits **inside the ai-toolkit root folder**
11
+ REM (next to the "ui" directory and "venv" folder).
12
+ REM • You have already run the full installer once.
13
+ REM --------------------------------------------------
14
+
15
+ :: Activate Python virtual environment
16
+ if not exist "venv\Scripts\activate.bat" (
17
+ echo [ERROR] venv not found. Run the installer first.
18
+ pause
19
+ exit /b 1
20
+ )
21
+ call "venv\Scripts\activate.bat"
22
+
23
+ :: Optional: free any orphaned Node servers (heavy‑handed but safe)
24
+ taskkill /F /IM node.exe >nul 2>&1
25
+
26
+ :: Change into the UI directory
27
+ cd ui
28
+
29
+ :: Launch the UI
30
+ echo Starting AI‑Toolkit UI... (Press Ctrl+C to stop)
31
+ npm run build_and_start
32
+
33
+ endlocal
SECURE_LAUNCHER-TOOLKIT.bat ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @echo off
2
+ setlocal enabledelayedexpansion
3
+
4
+ REM ==================================================
5
+ REM AI-Toolkit — Secure UI Launcher (Password Prompt)
6
+ REM Double-click to start / Ctrl+C to stop
7
+ REM ==================================================
8
+
9
+ REM Assumptions:
10
+ REM • This file lives inside the ai-toolkit root folder
11
+ REM (next to the "ui" directory and "venv" folder).
12
+ REM • You have already run the full installer once.
13
+ REM --------------------------------------------------
14
+
15
+ :: Check venv exists
16
+ if not exist "venv\Scripts\activate.bat" (
17
+ echo [ERROR] venv not found. Run the installer first.
18
+ pause
19
+ exit /b 1
20
+ )
21
+
22
+ :: -------------------------------------------------
23
+ :: Ask for password
24
+ :: -------------------------------------------------
25
+ echo.
26
+ echo Enter a password to protect the AI‑Toolkit UI.
27
+ set /p UI_PWD=Password:
28
+
29
+ if "%UI_PWD%"=="" (
30
+ echo No password entered. Aborting.
31
+ pause
32
+ exit /b 1
33
+ )
34
+
35
+ set "AI_TOOLKIT_AUTH=%UI_PWD%"
36
+ echo Password set.
37
+
38
+ :: -------------------------------------------------
39
+ :: Activate Python venv
40
+ :: -------------------------------------------------
41
+ call "venv\Scripts\activate.bat"
42
+
43
+ :: Kill any stray Node servers (frees port & file locks)
44
+ taskkill /F /IM node.exe >nul 2>&1
45
+
46
+ :: Change into UI directory
47
+ cd ui
48
+
49
+ :: Launch UI with password protection
50
+ echo Starting AI‑Toolkit UI on http://localhost:3000
51
+ echo Press Ctrl+C to stop the server when you are done.
52
+ npm run build_and_start
53
+
54
+ endlocal