Skip to content

Commit 03d812d

Browse files
committed
feat: add Windows PowerShell installer and update README with cross-platform install instructions
1 parent d9efcd0 commit 03d812d

File tree

2 files changed

+32
-2
lines changed

2 files changed

+32
-2
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,13 @@
3232
Run the interactive setup wizard — it detects your models, configures everything, and handles compatibility:
3333

3434
```bash
35-
# One-liner install
35+
# macOS / Linux
3636
curl -fsSL https://raw.githubusercontent.com/cortexkit/opencode-magic-context/master/scripts/install.sh | bash
3737

38-
# Or run directly with bunx/npx
38+
# Windows (PowerShell)
39+
irm https://raw.githubusercontent.com/cortexkit/opencode-magic-context/master/scripts/install.ps1 | iex
40+
41+
# Or run directly (any OS)
3942
bunx @cortexkit/opencode-magic-context setup
4043
npx @cortexkit/opencode-magic-context setup
4144
```

scripts/install.ps1

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Magic Context — Interactive Setup (Windows)
2+
# Usage: irm https://raw.githubusercontent.com/cortexkit/opencode-magic-context/master/scripts/install.ps1 | iex
3+
4+
Write-Host ""
5+
Write-Host " ✨ Magic Context — Setup" -ForegroundColor Cyan
6+
Write-Host " ────────────────────────"
7+
Write-Host ""
8+
9+
$package = "@cortexkit/opencode-magic-context"
10+
11+
if (Get-Command bun -ErrorAction SilentlyContinue) {
12+
Write-Host " → Using bun" -ForegroundColor Gray
13+
Write-Host ""
14+
& bun x $package setup
15+
} elseif (Get-Command npx -ErrorAction SilentlyContinue) {
16+
Write-Host " → Using npx" -ForegroundColor Gray
17+
Write-Host ""
18+
& npx -y $package setup
19+
} else {
20+
Write-Host " ✗ Neither bun nor npx found." -ForegroundColor Red
21+
Write-Host ""
22+
Write-Host " Install one of:" -ForegroundColor Yellow
23+
Write-Host " • bun: irm bun.sh/install.ps1 | iex"
24+
Write-Host " • node: https://nodejs.org"
25+
Write-Host ""
26+
exit 1
27+
}

0 commit comments

Comments
 (0)