-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.ps1
More file actions
109 lines (97 loc) Β· 4.96 KB
/
Copy pathinstall.ps1
File metadata and controls
109 lines (97 loc) Β· 4.96 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# β skill-blast β Windows PowerShell Installer β
# β Run in PowerShell: β
# β irm https://raw.githubusercontent.com/Venkatesh-6921/ β
# β skill-blast/main/install.ps1 | iex β
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
$ErrorActionPreference = "Stop"
function Write-Info { Write-Host " βΆ $args" -ForegroundColor Cyan }
function Write-Success { Write-Host " β $args" -ForegroundColor Green }
function Write-Warn { Write-Host " β $args" -ForegroundColor Yellow }
function Write-Err { Write-Host " β $args" -ForegroundColor Red }
Write-Host ""
Write-Host " skill-blast β 50 AI Agent Skills Installer" -ForegroundColor Cyan -BackgroundColor Black
Write-Host " βββββββββββββββββββββββββββββββββββββββββββββ" -ForegroundColor DarkGray
Write-Host ""
# ββ Python check βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
$PythonCmd = $null
foreach ($cmd in @("python", "python3", "py")) {
try {
$ver = & $cmd -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')" 2>$null
$major, $minor = $ver.Split(".")
if ([int]$major -ge 3 -and [int]$minor -ge 9) {
$PythonCmd = $cmd
Write-Success "Python $ver found"
break
}
} catch {}
}
if (-not $PythonCmd) {
Write-Err "Python 3.9+ not found."
Write-Host ""
Write-Host " Install Python from:" -ForegroundColor Yellow
Write-Host " https://www.python.org/downloads/windows/" -ForegroundColor Cyan
Write-Host ""
Write-Host " During install, check 'Add Python to PATH'" -ForegroundColor Yellow
Write-Host ""
Read-Host "Press Enter to open the download page, then re-run this script"
Start-Process "https://www.python.org/downloads/windows/"
exit 1
}
# ββ git check ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
try {
$gitVer = git --version 2>$null
Write-Success "git found: $gitVer"
} catch {
Write-Err "git not found."
Write-Host ""
Write-Host " Install git from:" -ForegroundColor Yellow
Write-Host " https://git-scm.com/download/win" -ForegroundColor Cyan
Write-Host ""
$open = Read-Host "Open download page? (y/n)"
if ($open -eq "y") { Start-Process "https://git-scm.com/download/win" }
exit 1
}
# ββ Install skill-blast ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Write-Info "Installing skill-blastβ¦"
# Prefer uv if available
if (Get-Command uv -ErrorAction SilentlyContinue) {
Write-Info "Found uv, using it for installationβ¦"
try {
uv pip install --upgrade skill-blast
Write-Success "skill-blast installed via uv!"
} catch {
Write-Warn "uv install failed, falling back to pipβ¦"
}
}
if (-not (Get-Command skill-blast -ErrorAction SilentlyContinue)) {
try {
& $PythonCmd -m pip install --quiet --upgrade skill-blast
Write-Success "skill-blast installed!"
} catch {
Write-Warn "Standard install failed, trying user installβ¦"
try {
& $PythonCmd -m pip install --quiet --upgrade skill-blast --user
Write-Success "skill-blast installed (user mode)!"
} catch {
Write-Err "pip install failed. Please try: pip install skill-blast"
exit 1
}
}
}
# ββ Verify and run βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Write-Host ""
Write-Host " β Ready! Launching skill-blastβ¦" -ForegroundColor Green
Write-Host ""
Start-Sleep 1
# Refresh PATH
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" +
[System.Environment]::GetEnvironmentVariable("Path","User")
$SbAvailable = $null -ne (Get-Command skill-blast -ErrorAction SilentlyContinue)
if ($SbAvailable) {
skill-blast $args
} else {
Write-Warn "skill-blast not found in PATH. Using python -m skill_blast"
Write-Host " Tip: Restart your terminal to refresh PATH after pip install." -ForegroundColor Yellow
& $PythonCmd -m skill_blast $args
}