-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart-claudia.bat
More file actions
132 lines (120 loc) · 3.95 KB
/
start-claudia.bat
File metadata and controls
132 lines (120 loc) · 3.95 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
@echo off
SETLOCAL
REM =================================================================
REM == ==
REM == CLAUDIA FOR WINDOWS - PRE-FLIGHT CHECK & LAUNCHER ==
REM == v4.2 ==
REM =================================================================
echo.
echo This script will verify your system configuration and then
echo launch the Claudia application.
echo.
echo -----------------------------------------------------------------
echo [1/6] Verifying System Prerequisites...
echo -----------------------------------------------------------------
echo.
REM --- CHECK 1: Is Bun installed? ---
echo Checking for 'bun'...
where bun >nul 2>nul
if %ERRORLEVEL% NEQ 0 (
echo [ERROR] Bun is not installed or not in your PATH.
echo.
echo Please install Bun from https://bun.sh/ and ensure
echo it is added to your system's PATH variable.
echo.
pause
exit /b 1
)
echo -^> [OK] Bun found.
echo.
REM --- CHECK 2: Is WSL installed? ---
echo Checking for 'WSL'...
wsl --status >nul 2>nul
if %ERRORLEVEL% NEQ 0 (
echo [ERROR] Windows Subsystem for Linux ^(WSL^) is not installed.
echo.
echo Please open PowerShell as an Administrator and run:
echo wsl --install
echo Then, restart your computer.
echo.
pause
exit /b 1
)
echo -^> [OK] WSL is installed.
echo.
REM --- CHECK 3: Is the 'claude.bat' bridge script in PATH? ---
echo Checking for 'claude.bat' bridge...
where claude.bat >nul 2>nul
if %ERRORLEVEL% NEQ 0 (
echo [ERROR] The 'claude.bat' bridge script was not found.
echo.
echo This means the setup script was not run correctly
echo or %%APPDATA%%\npm is not in your system PATH.
echo.
echo Please run 'setup-windows.bat' again.
echo.
pause
exit /b 1
)
echo -^> [OK] 'claude.bat' bridge found.
echo.
REM --- CHECK 4: Is the 'claude' CLI tool installed in WSL? ---
echo Checking for 'claude' CLI in WSL...
wsl test -f ~/.npm-global/bin/claude
if %ERRORLEVEL% NEQ 0 (
echo [ERROR] The 'claude' CLI tool was not found in your WSL distribution.
echo.
echo Please ensure you have run the 'setup-windows.bat' script
echo to install the tool inside your WSL environment.
echo.
pause
exit /b 1
)
echo -^> [OK] 'claude' CLI found in WSL.
echo.
REM --- CHECK 5: Does the .claude config directory exist? ---
echo Checking for '~/.claude' config directory in WSL...
wsl test -d ~/.claude
if %ERRORLEVEL% NEQ 0 (
echo [WARNING] The '~/.claude' directory is missing in WSL. Attempting to create it...
wsl mkdir -p ~/.claude
if %ERRORLEVEL% NEQ 0 (
echo [ERROR] Could not create the directory. Please create it manually in WSL:
echo mkdir -p ~/.claude
pause
exit /b 1
)
echo -^> [OK] Directory created successfully.
) else (
echo -^> [OK] Config directory exists.
)
echo.
REM --- CHECK 6: Does the .claude/projects directory exist? ---
echo Checking for '~/.claude/projects' directory in WSL...
wsl test -d ~/.claude/projects
if %ERRORLEVEL% NEQ 0 (
echo [WARNING] The '~/.claude/projects' directory is missing. Creating it...
wsl mkdir -p ~/.claude/projects
if %ERRORLEVEL% NEQ 0 (
echo [ERROR] Could not create the projects directory. Please create it manually in WSL:
echo mkdir -p ~/.claude/projects
pause
exit /b 1
)
echo -^> [OK] Projects directory created successfully.
) else (
echo -^> [OK] Projects directory exists.
)
echo.
echo -----------------------------------------------------------------
echo All checks passed! Launching Claudia...
echo -----------------------------------------------------------------
echo.
REM Change to the project directory (assumes the script is in the root)
cd /d "%~dp0"
echo Working Directory: %CD%
echo Frontend will be available at http://localhost:1420/
echo Press Ctrl+C in the console window to exit.
echo.
bun run tauri dev
pause