# GiL0 git l0cal — Windows Installer (PowerShell) # irm https://328project.com/git_l0cal/install.ps1 | iex $ErrorActionPreference = "Stop" $BaseUrl = "http://328project.com/git_l0cal" $InstallDir = "$env:USERPROFILE\.git_l0cal" $PluginsDir = "$InstallDir\plugins" Write-Host "" Write-Host "╔══════════════════════════════════════════╗" -ForegroundColor Cyan Write-Host "║ ⚡ GiL0 git l0cal Installer ║" -ForegroundColor Cyan Write-Host "╚══════════════════════════════════════════╝" -ForegroundColor Cyan Write-Host "" # ── Node.js check ───────────────────────────────────────────────────────────── if (!(Get-Command "node" -ErrorAction SilentlyContinue)) { Write-Host "❌ Node.js не знайдено!" -ForegroundColor Red Write-Host " Відкриваємо nodejs.org для завантаження..." Start-Process "https://nodejs.org/en/download/" Read-Host "Встановіть Node.js та запустіть скрипт знову. Натисніть Enter для виходу" exit 1 } Write-Host "✅ Node.js: $(node --version)" Write-Host "" # ── Mode selection ───────────────────────────────────────────────────────────── Write-Host "┌──────────────────────────────────────────┐" Write-Host "│ Оберіть режим встановлення: │" Write-Host "├──────────────────────────────────────────┤" Write-Host "│ 1 ⚡ Базова — arduino + chat + diff │" -ForegroundColor Green Write-Host "│ 2 📦 Всі плагіни (90+) │" -ForegroundColor Yellow Write-Host "│ 3 🧹 Чиста — тільки ядро GiL0 │" -ForegroundColor Gray Write-Host "└──────────────────────────────────────────┘" Write-Host "" $ModeInput = Read-Host "Ваш вибір (1/2/3) [1]" if ([string]::IsNullOrWhiteSpace($ModeInput)) { $ModeInput = "1" } switch ($ModeInput) { "1" { Write-Host "⚡ Режим: Базова (arduino + chat + diff_merge)" -ForegroundColor Green } "2" { Write-Host "📦 Режим: Всі плагіни (90+)" -ForegroundColor Yellow } "3" { Write-Host "🧹 Режим: Чиста установка (тільки ядро)" -ForegroundColor Gray } default { Write-Host "⚠️ Невірний вибір, використовується 1 (Базова)"; $ModeInput = "1" } } Write-Host "" # ── Create directories ──────────────────────────────────────────────────────── New-Item -ItemType Directory -Force -Path $InstallDir | Out-Null New-Item -ItemType Directory -Force -Path $PluginsDir | Out-Null $wc = New-Object System.Net.WebClient function Download-File($url, $dest) { try { $wc.DownloadFile($url, $dest); return $true } catch { return $false } } function Step($name) { Write-Host " ⬇️ $($name.PadRight(30))" -NoNewline } function Ok { Write-Host "✅" -ForegroundColor Green } function Skip { Write-Host "⏭ пропущено" -ForegroundColor Gray } # ── Download core ───────────────────────────────────────────────────────────── Write-Host "┌─ Ядро GiL0 ─────────────────────────────┐" foreach ($f in @("server.js","dashboard.html","plugin_hub.html","index.html","instruction.html","cheatsheet.html")) { Step $f if (Download-File "$BaseUrl/$f" "$InstallDir\$f") { Ok } else { Skip } } Write-Host "└─────────────────────────────────────────┘" Write-Host "" # ── Download plugins ────────────────────────────────────────────────────────── $BasePlugins = @("arduino","chat","diff_merge") $AllPlugins = @( "arduino","chat","diff_merge","ollama","openai","gemini","translate", "compilers","json_tools","csv_tools","markdown","regex_tester","lint", "snippets","templates","env_manager","benchmark","file_watcher","cron_manager", "calc","uuid_tools","format_code","sqlite","api_mock","github_sync", "changelog","git_advanced","branch","readme_gen","httptest","ip_info", "weather","ssh_manager","qr_generator","proxy","downloader","renpy","ruffle", "themes","color_picker","voice","godot_helper","unity_helper","unreal_engine", "gamemaker","construct","flutter","kubernetes","nginx_conf","systemd","deploy", "tauri_helper","pdf_tools","playwright","todo","notes","timer","sysinfo", "process_mgr","clipboard","docker_helper","password_gen","webserver","archiver", "monorepo","makefile","encrypt","security_audit","git_connect","git_IN_GiL0","git_sender" ) if ($ModeInput -eq "3") { Write-Host "🧹 Чиста установка — плагіни пропущені." -ForegroundColor Gray Write-Host " Пізніше: GiL0 plug install <назва>" Write-Host "" } elseif ($ModeInput -eq "2") { Write-Host "┌─ Плагіни (всі) ─────────────────────────┐" $Count = 0 foreach ($plug in $AllPlugins) { Step $plug if (Download-File "$BaseUrl/plugins/$plug.js" "$PluginsDir\$plug.js") { Ok; $Count++ } else { Skip } } Write-Host "└─────────────────────────────────────────┘" Write-Host " ✅ Завантажено плагінів: $Count" Write-Host "" } else { Write-Host "┌─ Базові плагіни ─────────────────────────┐" foreach ($plug in $BasePlugins) { Step $plug if (Download-File "$BaseUrl/plugins/$plug.js" "$PluginsDir\$plug.js") { Ok } else { Skip } } Write-Host "└─────────────────────────────────────────┘" Write-Host " ℹ️ Ще 90+ плагінів: GiL0 plug install <назва>" -ForegroundColor Yellow Write-Host " Або: GiL0 plug install --all" -ForegroundColor Yellow Write-Host "" } # ── Create .cmd wrappers ────────────────────────────────────────────────────── $BinDir = "$env:USERPROFILE\.local\bin" New-Item -ItemType Directory -Force -Path $BinDir | Out-Null Write-Host "┌─ Команди ───────────────────────────────┐" $GiL0Content = "@echo off`r`nset GIL0_CALLED_AS=GiL0`r`nnode `"%USERPROFILE%\.git_l0cal\server.js`" %*" $Git_l0calContent = "@echo off`r`nset GIL0_CALLED_AS=git_l0cal`r`nnode `"%USERPROFILE%\.git_l0cal\server.js`" %*" $AliasContent = "@echo off`r`nset GIL0_CALLED_AS=GiL0`r`nnode `"%USERPROFILE%\.git_l0cal\server.js`" %*" Set-Content -Path "$BinDir\GiL0.cmd" -Value $GiL0Content Set-Content -Path "$BinDir\git_l0cal.cmd" -Value $Git_l0calContent Set-Content -Path "$BinDir\git0.cmd" -Value $AliasContent Set-Content -Path "$BinDir\gitL0.cmd" -Value $AliasContent Write-Host " ✅ GiL0.cmd → $BinDir" -ForegroundColor Green Write-Host " ✅ git_l0cal.cmd → $BinDir" -ForegroundColor Green Write-Host " ✅ git0.cmd → $BinDir" -ForegroundColor Green Write-Host "└─────────────────────────────────────────┘" Write-Host "" # ── Add to PATH if needed ───────────────────────────────────────────────────── $CurrentPath = [Environment]::GetEnvironmentVariable("PATH", "User") if ($CurrentPath -notlike "*$BinDir*") { [Environment]::SetEnvironmentVariable("PATH", "$BinDir;$CurrentPath", "User") Write-Host "⚠️ Додано до PATH. ПЕРЕЗАПУСТІТЬ термінал або PowerShell!" -ForegroundColor Yellow Write-Host "" } # ── Done ────────────────────────────────────────────────────────────────────── Write-Host "╔══════════════════════════════════════════╗" -ForegroundColor Green Write-Host "║ ✅ GiL0 успішно встановлено на Windows! ║" -ForegroundColor Green Write-Host "╚══════════════════════════════════════════╝" -ForegroundColor Green Write-Host "" Write-Host " Зайдіть у вашу папку проекту та виконайте:" Write-Host " GiL0 ui — запустити Dashboard" -ForegroundColor Cyan Write-Host " GiL0 commit — зберегти версію" -ForegroundColor Cyan Write-Host " GiL0 ginit — підключити локальний git" -ForegroundColor Cyan if ($ModeInput -eq "1") { Write-Host "" Write-Host " Базові плагіни: arduino ✅ chat ✅ diff_merge ✅" -ForegroundColor Green Write-Host " Ще плагіни: GiL0 plug install compilers" -ForegroundColor Yellow Write-Host " GiL0 plug install --all" -ForegroundColor Yellow } Write-Host "" Write-Host " Безпечне оновлення: git_l0cal update" -ForegroundColor Gray Write-Host ""