-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart_xai_proxy.bat
More file actions
32 lines (26 loc) · 1.12 KB
/
start_xai_proxy.bat
File metadata and controls
32 lines (26 loc) · 1.12 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
@echo off
echo Starting xAI Proxy Server and Claude Code...
echo.
REM Get the folder where this batch script is located (always ends with \)
set SCRIPT_DIR=%~dp0
REM Start proxy server in background, using absolute path
echo [1/2] Starting proxy server...
start "xAI Proxy" python "%SCRIPT_DIR%xai_claude_proxy_enhanced.py"
REM Wait a moment for server to start
timeout /t 3 /nobreak >nul
REM Create temporary command file for Claude Code
echo [2/2] Creating Claude Code command...
echo @echo off > "%TEMP%\claude_xai.bat"
echo REM Change to the directory where user originally ran claudeproxy >> "%TEMP%\claude_xai.bat"
echo cd /d "%CLAUDEPROXY_ORIGINAL_DIR%" >> "%TEMP%\claude_xai.bat"
echo claude --settings "{\"env\": {\"ANTHROPIC_BASE_URL\": \"http://localhost:5000\", \"ANTHROPIC_API_KEY\": \"dummy_key\"}}" >> "%TEMP%\claude_xai.bat"
echo pause >> "%TEMP%\claude_xai.bat"
REM Start Claude Code in new window
echo [2/2] Opening Claude Code in new window...
start "Claude Code - xAI" cmd /k "%TEMP%\claude_xai.bat"
echo.
echo [OK] Both windows opened:
echo - Proxy server running
echo - Claude Code ready in new window
echo.
pause