-
Notifications
You must be signed in to change notification settings - Fork 90
Expand file tree
/
Copy pathinstall.ps1
More file actions
25 lines (20 loc) · 1.02 KB
/
install.ps1
File metadata and controls
25 lines (20 loc) · 1.02 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
$Version = "v5.2.0"
$Repo = "tang-vu/ContribAI"
$Binary = "contribai-windows-x86_64.exe"
$InstallDir = "$env:USERPROFILE\.contribai\bin"
$Url = "https://github.com/$Repo/releases/download/$Version/$Binary"
Write-Host "Installing ContribAI $Version for Windows..." -ForegroundColor Cyan
Write-Host " Downloading: $Url"
if (-not (Test-Path $InstallDir)) { New-Item -ItemType Directory -Path $InstallDir -Force | Out-Null }
$OutPath = Join-Path $InstallDir "contribai.exe"
Invoke-WebRequest -Uri $Url -OutFile $OutPath -UseBasicParsing
# Add to user PATH if not already there
$UserPath = [Environment]::GetEnvironmentVariable("PATH", "User")
if ($UserPath -notlike "*$InstallDir*") {
[Environment]::SetEnvironmentVariable("PATH", "$UserPath;$InstallDir", "User")
Write-Host " Added $InstallDir to PATH" -ForegroundColor Green
}
Write-Host ""
Write-Host "ContribAI installed successfully!" -ForegroundColor Green
Write-Host " Location: $OutPath"
Write-Host " Restart your terminal, then run: contribai init" -ForegroundColor Yellow