Files
gyandoot-release/windows/install.bat
Tara Menon c78a8e82b5 Initial release: GyanDoot v2.0.0
Cross-platform AI Agent Platform
- Sources: https://git.gyannetra.in/gnpl_admin/gyandoot-v2
- Installer: curl -fsSL https://git.gyannetra.in/gnpl_admin/gyandoot-release/raw/main/install.sh | bash

Platforms:
  - macOS (arm64/x86_64) via Homebrew or install.sh
  - Linux (x86_64/aarch64/i686) via install.sh
  - Windows (x86_64) via Git Bash/MSYS2 or PowerShell
  - WSL via install.sh

Includes:
  - install.sh (cross-platform universal installer)
  - Windows: install.bat + install.ps1
  - macOS: Homebrew formula (homebrew/gyandoot.rb)
  - Linux: prebuilt binary + install guide
  - README.md with full documentation
2026-06-13 18:33:38 +05:30

121 lines
5.8 KiB
Batchfile

@echo off
REM ═══════════════════════════════════════════════════════════════════════════
REM GyanDoot v2.0 — Windows Installer (Git Bash / MSYS2)
REM ═══════════════════════════════════════════════════════════════════════════
REM This script installs GyanDoot on Windows via Git Bash or MSYS2.
REM For PowerShell, use: install.ps1
REM ═══════════════════════════════════════════════════════════════════════════
setlocal enabledelayedexpansion
echo.
echo ╔═══════════════════════════════════════╗
echo ║ GyanDoot v2.0 — Windows Installer ║
echo ╚═══════════════════════════════════════╝
echo.
REM ── Check if running in Git Bash / MSYS2 ──────────────────────────────
if not defined MSYSTEM (
echo [WARN] This script requires Git Bash or MSYS2.
echo For PowerShell, use: install.ps1
echo.
echo Or download from: https://git.gyannetra.in/gnpl_admin/gyandoot-release
pause
exit /b 1
)
REM ── Check prerequisites ───────────────────────────────────────────────
echo [CHECK] Rust...
where cargo >nul 2>&1
if errorlevel 1 (
echo [INFO] Rust not found. Installing Rust...
powershell -Command "& {Invoke-WebRequest -Uri https://win.rustup.rs -OutFile '%TEMP%\rustup-init.exe'; Start-Process '%TEMP%\rustup-init.exe' -Wait -ArgumentList '-y'}"
call "%USERPROFILE%\.cargo\env"
echo [OK] Rust installed
) else (
for /f "tokens=*" %%i in ('cargo --version') do echo [OK] %%i
)
echo [CHECK] Node.js...
where node >nul 2>&1
if errorlevel 1 (
echo [WARN] Node.js is required for browser features.
echo Download from: https://nodejs.org (v20+)
echo Or: winget install OpenJS.NodeJS
) else (
for /f "tokens=*" %%i in ('node --version') do echo [OK] Node.js %%i
)
REM ── Build ──────────────────────────────────────────────────────────────
echo.
echo [BUILD] Compiling GyanDoot (this may take a few minutes)...
cd /d "%~dp0.." 2>nul || (
echo [ERR] Could not find project root.
echo Make sure you're running this from the release directory.
pause
exit /b 1
)
cargo build --release
if errorlevel 1 (
echo [ERR] Build failed. Check the error above.
pause
exit /b 1
)
echo [OK] Build complete
REM ── Install binary ────────────────────────────────────────────────────
set "INSTALL_DIR=%USERPROFILE%\.cargo\bin"
if not exist "%INSTALL_DIR%" mkdir "%INSTALL_DIR%"
copy /Y "target\release\gyandoot.exe" "%INSTALL_DIR%\gyandoot.exe" >nul
echo [OK] Installed to %INSTALL_DIR%\gyandoot.exe
REM ── Check PATH ────────────────────────────────────────────────────────
echo !PATH! | findstr /C:"%USERPROFILE%\.cargo\bin" >nul
if errorlevel 1 (
echo [WARN] %USERPROFILE%\.cargo\bin is not in your PATH.
echo Add it manually to your PATH environment variable.
echo Or run: setx PATH "%%USERPROFILE%%\.cargo\bin;%%PATH%%"
echo.
echo Then restart your terminal.
)
REM ── Verify ────────────────────────────────────────────────────────────
echo.
echo [VERIFY] Checking installation...
"%INSTALL_DIR%\gyandoot.exe" --help >nul 2>&1
if errorlevel 1 (
echo [WARN] Installation verification failed.
) else (
echo [OK] GyanDoot installed successfully!
)
REM ── Optional: Camoufox browser ────────────────────────────────────────
echo.
echo ────────────────────────────────────────────
echo Optional: Install Camoufox Browser?
echo Required for: web_search, web_browse tools
echo ────────────────────────────────────────────
set /p INSTALL_CAMOUFOX="Install Camoufox browser? [y/N]: "
if /i "!INSTALL_CAMOUFOX!"=="y" (
echo [INFO] Installing camoufox-browser npm package...
npm install -g camoufox-browser@0.1.0
echo [INFO] Downloading browser binary (~311MB)...
npx --yes camoufox-js@0.11.0 fetch
echo [OK] Camoufox browser installed
)
REM ── Done ──────────────────────────────────────────────────────────────
echo.
echo ╔═══════════════════════════════════════╗
echo ║ GyanDoot v2.0 installed! ║
echo ╚═══════════════════════════════════════╝
echo.
echo Quick start:
echo gyandoot --help
echo gyandoot setup
echo gyandoot run
echo.
pause