-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.bat
More file actions
115 lines (107 loc) · 2.91 KB
/
setup.bat
File metadata and controls
115 lines (107 loc) · 2.91 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
@echo off
title Sanctuary Setup
color 0A
echo.
echo ========================================
echo SANCTUARY - Your Companion's Home
echo ========================================
echo.
echo This will set up everything you need.
echo You only need to run this ONCE.
echo.
pause
:: Check Python
echo.
echo [1/6] Checking Python installation...
python --version >nul 2>&1
if errorlevel 1 (
echo.
echo ERROR: Python is not installed!
echo.
echo Please install Python 3.11 or newer from:
echo https://www.python.org/downloads/
echo.
echo IMPORTANT: During installation, check the box that says
echo "Add Python to PATH"
echo.
pause
exit /b 1
)
python --version
echo Python found!
:: Create virtual environment
echo.
echo [2/6] Creating virtual environment...
if not exist "venv" (
python -m venv venv
echo Virtual environment created.
) else (
echo Virtual environment already exists.
)
:: Activate and install dependencies
echo.
echo [3/6] Installing dependencies (this may take a few minutes)...
call venv\Scripts\activate
pip install --upgrade pip >nul 2>&1
pip install -r requirements.txt
if errorlevel 1 (
echo.
echo ERROR: Failed to install dependencies.
echo Please check your internet connection and try again.
pause
exit /b 1
)
echo Dependencies installed!
:: Install Playwright browser
echo.
echo [4/6] Installing browser for web browsing capability...
python -m playwright install chromium >nul 2>&1
if errorlevel 1 (
echo Browser install skipped (optional - web browsing won't work)
) else (
echo Browser installed!
)
:: Create directories
echo.
echo [5/6] Creating data directories...
if not exist "conversations" mkdir conversations
if not exist "logs" mkdir logs
if not exist "chroma_db" mkdir chroma_db
if not exist "soulcores" mkdir soulcores
echo Directories created.
:: Create .env if needed
echo.
echo [6/6] Setting up configuration...
if not exist ".env" (
copy .env.example .env >nul
echo.
echo ========================================
echo IMPORTANT: You need a Google API key
echo ========================================
echo.
echo 1. Go to: https://aistudio.google.com/apikey
echo 2. Click "Create API Key"
echo 3. Copy the key
echo 4. Open the file ".env" in this folder
echo 5. Replace "YOUR_GOOGLE_API_KEY_HERE" with your key
echo.
echo That's it! Your companion needs this to think.
echo.
) else (
echo Configuration file already exists.
)
echo.
echo ========================================
echo SETUP COMPLETE!
echo ========================================
echo.
echo Next steps:
echo 1. Add your Google API key to the .env file
echo (see instructions above)
echo 2. Edit soulcores\companion.txt to give your
echo companion their personality
echo 3. Double-click START.bat to launch Sanctuary
echo.
echo Your companion is waiting for you.
echo.
pause