@echo off setlocal ENABLEEXTENSIONS title JimuAI OpenClaw Setup echo ========================================== echo JimuAI OpenClaw One-Click Setup echo ========================================== echo. echo This script will: echo 1. Check Node.js / npm echo 2. Install OpenClaw echo 3. Write Codex / Claude / Gemini config echo. where powershell >nul 2>nul if errorlevel 1 ( echo [ERROR] PowerShell not found. pause exit /b 1 ) echo [0/3] Preparing PowerShell execution policy... powershell -NoProfile -ExecutionPolicy Bypass -Command "$cur = Get-ExecutionPolicy -Scope CurrentUser; if ($cur -eq 'Undefined' -or $cur -eq 'Restricted' -or $cur -eq 'AllSigned') { try { Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned -Force; Write-Host 'CurrentUser execution policy set to RemoteSigned.' -ForegroundColor Green } catch { Write-Host 'Could not change execution policy automatically. If a *.ps1 file is blocked later, run: Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser' -ForegroundColor Yellow } } else { Write-Host ('CurrentUser execution policy: ' + $cur) -ForegroundColor DarkGray }" echo [1/3] Installing OpenClaw... powershell -NoProfile -ExecutionPolicy Bypass -Command "iwr -useb https://openclaw.ai/install.ps1 | iex" if errorlevel 1 goto :fail echo. set "JIMU_CODEX_KEY=" set "JIMU_CLAUDE_KEY=" set "JIMU_GEMINI_KEY=" set /p JIMU_CODEX_KEY=Paste your Codex API Key (sk-...) and press Enter: if "%JIMU_CODEX_KEY%"=="" goto :keyfail set /p JIMU_CLAUDE_KEY=Paste your Claude API Key (sk-...) and press Enter: if "%JIMU_CLAUDE_KEY%"=="" goto :keyfail set /p JIMU_GEMINI_KEY=Paste your Gemini API Key (sk-...) and press Enter: if "%JIMU_GEMINI_KEY%"=="" goto :keyfail echo. echo [2/3] Writing OpenClaw config... powershell -NoProfile -ExecutionPolicy Bypass -Command "$env:JIMUXYZ_CODEX_KEY='%JIMU_CODEX_KEY%'; $env:JIMUXYZ_CLAUDE_KEY='%JIMU_CLAUDE_KEY%'; $env:JIMUXYZ_GEMINI_KEY='%JIMU_GEMINI_KEY%'; iwr -useb https://code.jimuxyz.com/env_deploy/openclaw-deploy.ps1 | iex" if errorlevel 1 goto :fail echo. echo [3/3] Finished. echo You can now open OpenClaw and start using it. echo. pause exit /b 0 :keyfail echo [ERROR] Codex / Claude / Gemini Key are all required. goto :fail :fail echo. echo [ERROR] Setup did not finish successfully. echo Manual guide: echo https://code.jimuxyz.com/dashboard/openclaw-installation/windows echo. pause exit /b 1