-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.bat
More file actions
122 lines (109 loc) · 6.35 KB
/
Copy pathinstall.bat
File metadata and controls
122 lines (109 loc) · 6.35 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
@echo off
REM ─────────────────────────────────────────────────────────────────────────
REM Kim AI Agent — Windows Installer
REM Creates a virtual environment, installs all dependencies, and sets up
REM the .env configuration template.
REM
REM Usage: install.bat
REM ─────────────────────────────────────────────────────────────────────────
echo.
echo ╔═══════════════════════════════════════════════════════╗
echo ║ Kim AI Agent — Setup (Windows) ║
echo ╚═══════════════════════════════════════════════════════╝
echo.
REM ── Check Python ──────────────────────────────────────────────────────
where python >nul 2>nul
if %ERRORLEVEL% neq 0 (
echo [ERROR] Python is not installed or not on PATH.
echo Download from https://www.python.org/downloads/
echo Make sure to check "Add Python to PATH" during install.
pause
exit /b 1
)
python --version
echo.
REM ── Create virtual environment ────────────────────────────────────────
if not exist "venv" (
echo [1/6] Creating virtual environment...
python -m venv venv
if %ERRORLEVEL% neq 0 (
echo [ERROR] Failed to create virtual environment.
pause
exit /b 1
)
echo Done.
) else (
echo [1/6] Virtual environment already exists.
)
REM ── Activate venv ─────────────────────────────────────────────────────
echo [2/6] Activating virtual environment...
call venv\Scripts\activate.bat
echo Done.
REM ── Upgrade pip ───────────────────────────────────────────────────────
echo [3/6] Upgrading pip...
python -m pip install --upgrade pip --quiet
echo Done.
REM ── Install dependencies ──────────────────────────────────────────────
echo [4/6] Installing dependencies from requirements.txt...
pip install -r requirements.txt --quiet
if %ERRORLEVEL% neq 0 (
echo [ERROR] Dependency installation failed. Check requirements.txt.
pause
exit /b 1
)
echo Done.
REM ── Install Playwright browsers ──────────────────────────────────────
echo [5/6] Installing Playwright browsers (Chromium)...
REM NOTE: `playwright install` has no --quiet flag; passing it made this step
REM fail on every run while 2>nul hid the real error. Keep output visible.
python -m playwright install chromium
if %ERRORLEVEL% neq 0 (
echo [WARN] Playwright browser install failed. Browser provider may not work.
echo You can install later with: python -m playwright install chromium
)
echo Done.
REM ── Set up .env ───────────────────────────────────────────────────────
echo [6/6] Setting up .env configuration...
if not exist ".env" (
if exist ".env.example" (
copy .env.example .env >nul
echo Created .env from .env.example
echo IMPORTANT: Edit .env with your API keys before running Kim.
) else (
echo [WARN] .env.example not found. Create .env manually.
)
) else (
echo .env already exists — skipping.
)
REM ── Create required directories ───────────────────────────────────────
if not exist "logs" mkdir logs
if not exist "sessions\chrome_data" mkdir sessions\chrome_data
REM ── Write project root for Kim.exe discovery ────────────────────────────
REM Guard: only record a directory that actually looks like the Kim repo so a
REM stray run from an unrelated directory can't poison Kim.exe discovery.
if exist "orchestrator\agent.py" (
>"%USERPROFILE%\.kim_root" echo %CD%
echo Saved project root to %%USERPROFILE%%\.kim_root ^(used by Kim.exe^)
) else (
echo [WARN] %CD% does not look like the Kim repo ^(no orchestrator\agent.py^);
echo not writing %%USERPROFILE%%\.kim_root.
)
echo.
echo ╔═══════════════════════════════════════════════════════╗
echo ║ Setup complete! ║
echo ╠═══════════════════════════════════════════════════════╣
echo ║ ║
echo ║ Next steps: ║
echo ║ ║
echo ║ 1. Edit .env with your API keys ║
echo ║ 2. Edit config.yaml to set your project_root ║
echo ║ 3. Start the MCP server: ║
echo ║ python -m mcp_server.server ║
echo ║ 4. Or run the agent: ║
echo ║ python -m orchestrator.agent --task "..." ║
echo ║ 5. Register with Claude Code: ║
echo ║ claude mcp add Kim -- python -m mcp_server.server║
echo ║ ║
echo ╚═══════════════════════════════════════════════════════╝
echo.
pause