forked from cortexkit/magic-context
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.ps1
More file actions
27 lines (24 loc) · 1003 Bytes
/
Copy pathinstall.ps1
File metadata and controls
27 lines (24 loc) · 1003 Bytes
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
# Magic Context — Interactive Setup (Windows)
# Usage: irm https://raw.githubusercontent.com/cortexkit/opencode-magic-context/master/scripts/install.ps1 | iex
Write-Host ""
Write-Host " ✨ Magic Context — Setup" -ForegroundColor Cyan
Write-Host " ────────────────────────"
Write-Host ""
$package = "@cortexkit/opencode-magic-context"
if (Get-Command bun -ErrorAction SilentlyContinue) {
Write-Host " → Using bun" -ForegroundColor Gray
Write-Host ""
& bun x $package setup
} elseif (Get-Command npx -ErrorAction SilentlyContinue) {
Write-Host " → Using npx" -ForegroundColor Gray
Write-Host ""
& npx -y $package setup
} else {
Write-Host " ✗ Neither bun nor npx found." -ForegroundColor Red
Write-Host ""
Write-Host " Install one of:" -ForegroundColor Yellow
Write-Host " • bun: irm bun.sh/install.ps1 | iex"
Write-Host " • node: https://nodejs.org"
Write-Host ""
exit 1
}