Repository navigation
Expand file tree
/
Copy pathinstall.ps1
More file actions
38 lines (30 loc) · 2.1 KB
/
Copy pathinstall.ps1
File metadata and controls
38 lines (30 loc) · 2.1 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
26
27
28
29
30
31
32
33
34
35
36
37
38
# RTX Code — Windows One-Click Installer
# Usage: irm https://raw.githubusercontent.com/PsProsen-Dev/rtx-code/main/install.ps1 | iex
$ErrorActionPreference = "Stop"
Write-Host "`n⚡ Installing RTX Code (Autonomous Rust Agent)..." -ForegroundColor Cyan
$InstallDir = "$env:USERPROFILE\.rtx\bin"
if (!(Test-Path $InstallDir)) {
New-Item -ItemType Directory -Path $InstallDir -Force | Out-Null
}
$ZipUrl = "https://github.com/PsProsen-Dev/rtx-code/releases/latest/download/rtx-v0.1.0-windows-x86_64.zip"
$ZipFile = "$env:TEMP\rtx.zip"
Write-Host "📥 Downloading latest standalone release from GitHub..." -ForegroundColor Yellow
Invoke-WebRequest -Uri $ZipUrl -OutFile $ZipFile -UseBasicParsing
Write-Host "📦 Extracting rtx.exe to $InstallDir..." -ForegroundColor Yellow
Expand-Archive -Path $ZipFile -DestinationPath $InstallDir -Force
Remove-Item -Path $ZipFile -Force -ErrorAction SilentlyContinue
# Ensure PATH contains install directory
$UserPath = [Environment]::GetEnvironmentVariable("PATH", "User")
if ($UserPath -notlike "*$InstallDir*") {
Write-Host "⚙️ Adding $InstallDir to User PATH..." -ForegroundColor Yellow
[Environment]::SetEnvironmentVariable("PATH", "$UserPath;$InstallDir", "User")
$env:PATH = "$env:PATH;$InstallDir"
}
Write-Host "`n✅ RTX Code installed successfully!" -ForegroundColor Green
Write-Host "────────────────────────────────────────────────────────────" -ForegroundColor DarkGray
Write-Host "Get started now:" -ForegroundColor White
Write-Host " 1. Add your Google Gemini API key:" -ForegroundColor Cyan
Write-Host " rtx auth add --provider gemini --key YOUR_KEY --primary" -ForegroundColor Gray
Write-Host " 2. Run any coding task:" -ForegroundColor Cyan
Write-Host " rtx run `"Explain this repository`"" -ForegroundColor Gray
Write-Host "────────────────────────────────────────────────────────────`n" -ForegroundColor DarkGray