-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.bat
More file actions
137 lines (121 loc) Β· 3.71 KB
/
install.bat
File metadata and controls
137 lines (121 loc) Β· 3.71 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
133
134
135
136
137
@echo off
REM Antigravity Workspace Template Installer for Windows
REM This script sets up the development environment automatically
setlocal enabledelayedexpansion
echo.
echo πͺ Antigravity Workspace Template - Installer
echo =============================================
echo.
REM Check if Python 3 is installed
python --version >nul 2>&1
if errorlevel 1 (
echo β Error: Python is not installed.
echo Please install Python 3.8 or higher from https://www.python.org/downloads/
echo Make sure to check "Add Python to PATH" during installation.
pause
exit /b 1
)
REM Check Python version
for /f "tokens=2" %%i in ('python --version 2^>^&1') do set PYTHON_VERSION=%%i
echo β
Python !PYTHON_VERSION! detected
REM Check if Git is installed
git --version >nul 2>&1
if errorlevel 1 (
echo β Error: Git is not installed.
echo Please install Git from https://git-scm.com/downloads
pause
exit /b 1
)
for /f "tokens=3" %%i in ('git --version') do set GIT_VERSION=%%i
echo β
Git !GIT_VERSION! detected
echo.
REM Create virtual environment
echo π¦ Creating virtual environment...
if exist "venv\" (
echo β οΈ Virtual environment already exists. Skipping creation.
) else (
python -m venv venv
if errorlevel 1 (
echo β Error: Failed to create virtual environment.
pause
exit /b 1
)
echo β
Virtual environment created
)
REM Activate virtual environment
echo π§ Activating virtual environment...
call venv\Scripts\activate.bat
if errorlevel 1 (
echo β Error: Failed to activate virtual environment.
pause
exit /b 1
)
REM Upgrade pip
echo π¦ Upgrading pip...
python -m pip install --upgrade pip --quiet
if errorlevel 1 (
echo β οΈ Warning: pip upgrade had issues, continuing...
)
REM Install dependencies
echo π¦ Installing dependencies...
pip install -r requirements.txt --quiet
if errorlevel 1 (
echo β Error: Failed to install dependencies.
pause
exit /b 1
)
echo β
Dependencies installed
REM Ensure correct Google GenAI package is installed (avoid deprecated package)
python -m pip show google-generativeai >nul 2>&1
if not errorlevel 1 (
echo β οΈ Detected deprecated google-generativeai package. Removing...
python -m pip uninstall -y google-generativeai --quiet
)
python -m pip show google-genai >nul 2>&1
if errorlevel 1 (
echo π¦ Installing google-genai (required for from google import genai)...
python -m pip install google-genai --quiet
)
REM Initialize configuration
echo π§ Setting up configuration...
REM Create .env if it doesn't exist
if not exist ".env" (
(
echo # Antigravity Workspace Configuration
echo # Copy this file and configure your API keys
echo.
echo # Google Gemini API Key (Required)
echo GOOGLE_API_KEY=your_api_key_here
echo.
echo # Optional: OpenAI API Key for alternative LLM
echo # OPENAI_API_KEY=your_openai_key_here
echo.
echo # Optional: Model Configuration
echo # MODEL_NAME=gemini-2.0-flash-exp
) > .env
echo β
Created .env file (please configure your API keys)
) else (
echo β οΈ .env file already exists. Skipping creation.
)
REM Create artifacts directory if it doesn't exist
if not exist "artifacts\" (
mkdir artifacts
echo β
Created artifacts directory
)
echo.
echo =============================================
echo β
Installation complete!
echo.
echo Next steps:
echo 1. Configure your API keys in .env file:
echo notepad .env
echo.
echo 2. The virtual environment is already activated.
echo.
echo 3. Run the agent:
echo python src/agent.py
echo.
echo π Documentation: docs/en/QUICK_START.md
echo =============================================
echo.
pause