Repository navigation
Expand file tree
/
Copy pathSetupDemoFolder.bat
More file actions
57 lines (48 loc) · 1.63 KB
/
Copy pathSetupDemoFolder.bat
File metadata and controls
57 lines (48 loc) · 1.63 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
@echo off
setlocal
rem Builds the demo folder C:\Conf from the latest build and the files in this repo.
rem Nothing is deleted: C:\Conf must be missing or empty, so clear it yourself before a rerun.
rem Run this from the repo root.
set "TARGET=C:\Conf"
if exist "%TARGET%" (
dir /a /b "%TARGET%" 2>nul | findstr "^" >nul
if not errorlevel 1 (
echo *** %TARGET% already exists and is not empty. Clear it first, then run this again.
goto :fail
)
)
echo.
echo === Building ===
call publish.bat
if errorlevel 1 goto :fail
echo.
echo === Creating %TARGET% ===
mkdir "%TARGET%\.claude" 2>nul
mkdir "%TARGET%\HookAgent" 2>nul
if not exist "%TARGET%\HookAgent" goto :fail
copy /y "EnableProxy.bat" "%TARGET%\" >nul
copy /y "HookAgent\Sample-Settings-Windows\settings.json" "%TARGET%\.claude\" >nul
xcopy /e /i /q /y "DemoFolder\skills" "%TARGET%\.claude\skills" >nul
copy /y "Published\HookAgent\HookAgent.exe" "%TARGET%\HookAgent\" >nul
copy /y "Published\HookAgent\HookAgent.pdb" "%TARGET%\HookAgent\" >nul
if errorlevel 1 goto :fail
rem Local-scope MCP servers are stored in ~/.claude.json under the folder path, not in the folder,
rem so they survive clearing it. Remove the demo servers so the MCP demos start clean.
echo.
echo === Removing local MCP servers for %TARGET% ===
pushd "%TARGET%"
for %%S in (clouddebugger mcp_proxy) do (
call claude mcp remove %%S -s local >nul 2>&1
)
popd
echo.
echo Done. %TARGET% now contains:
echo.
dir /s /b /a-d "%TARGET%"
echo.
echo Next: open a command prompt in %TARGET%, run EnableProxy.bat, then start claude.
goto :eof
:fail
echo.
echo *** Setup failed (see errors above) ***
exit /b 1