-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.cmd
More file actions
63 lines (53 loc) · 1.18 KB
/
Copy pathstart.cmd
File metadata and controls
63 lines (53 loc) · 1.18 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
52
53
54
55
56
57
58
59
60
61
62
63
@echo off
setlocal EnableExtensions
title Codex Pro Max
cd /d "%~dp0"
echo.
echo Starting Codex Pro Max
echo Project folder: %CD%
echo.
if not defined CODEX_PRO_MAX_ROOT (
set "CODEX_PRO_MAX_ROOT=%USERPROFILE%\.codex-pro-max"
)
if not exist "%CODEX_PRO_MAX_ROOT%" (
mkdir "%CODEX_PRO_MAX_ROOT%" >nul 2>nul
)
where node >nul 2>nul
if errorlevel 1 (
echo [ERROR] Node.js was not found on PATH.
echo Install Node.js from https://nodejs.org/ and run start.cmd again.
echo.
pause
exit /b 1
)
where npm >nul 2>nul
if errorlevel 1 (
echo [ERROR] npm was not found on PATH.
echo Reinstall Node.js with npm enabled and run start.cmd again.
echo.
pause
exit /b 1
)
if not exist "node_modules" (
echo Dependencies are missing. Running npm install...
call npm install
if errorlevel 1 (
echo.
echo [ERROR] Dependency installation failed.
echo.
pause
exit /b 1
)
)
echo Data folder: %CODEX_PRO_MAX_ROOT%
echo API: http://127.0.0.1:53127
echo UI: http://127.0.0.1:53128
echo.
echo Close this window to stop the project.
echo.
call npm run dev
set "EXIT_CODE=%ERRORLEVEL%"
echo.
echo Codex Pro Max stopped with exit code %EXIT_CODE%.
pause
exit /b %EXIT_CODE%