-
Notifications
You must be signed in to change notification settings - Fork 44
/
install-gemini.bat
44 lines (33 loc) · 1.01 KB
/
install-gemini.bat
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
@echo off
setlocal
call install.bat
call envsubtrans\Scripts\activate.bat
echo Installing Google Gemini SDK...
pip install -U google.generativeai
if not exist .env (
REM Create .env file
echo Creating .env file to hold environment variables
echo PROVIDER=Gemini > .env
) else (
REM Remove existing PROVIDER and add PROVIDER=Gemini
type .env | findstr /v "^PROVIDER=" > temp.env
echo PROVIDER=Gemini >> temp.env
move /y temp.env .env > nul
)
REM Check if GEMINI provider settings are already configured
findstr /m "GEMINI_API_KEY" .env > nul
if not errorlevel 1 (
echo Found GEMINI_API_KEY in .env file
goto skip_api_key
)
echo Please enter your Google Gemini API key:
set /p api_key=GEMINI_API_KEY:
if not "%api_key%"=="" (
echo GEMINI_API_KEY=%api_key% >> .env
echo API key saved to .env
)
:skip_api_key
call scripts\generate-cmd.bat gemini-subtrans
echo default provider set to Google Gemini
echo Installation complete. To uninstall, simply delete the directory.
exit /b 0