-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall_to_codex.ps1
More file actions
30 lines (24 loc) · 1.1 KB
/
install_to_codex.ps1
File metadata and controls
30 lines (24 loc) · 1.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
param(
[string]$CodexHome = "$HOME/.codex"
)
$ErrorActionPreference = "Stop"
$repoRoot = Split-Path -Parent $MyInvocation.MyCommand.Path
$src = Join-Path $repoRoot "code-explainer"
$dst = Join-Path $CodexHome "skills/code-explainer"
if (-not (Test-Path $src)) {
throw "Source skill folder not found: $src"
}
New-Item -ItemType Directory -Force -Path $dst | Out-Null
Copy-Item -Path (Join-Path $src "SKILL.md") -Destination $dst -Force
if (Test-Path (Join-Path $src "package.json")) {
Copy-Item -Path (Join-Path $src "package.json") -Destination $dst -Force
}
if (Test-Path (Join-Path $src "package-lock.json")) {
Copy-Item -Path (Join-Path $src "package-lock.json") -Destination $dst -Force
}
Copy-Item -Path (Join-Path $src "agents") -Destination $dst -Recurse -Force
Copy-Item -Path (Join-Path $src "scripts") -Destination $dst -Recurse -Force
Copy-Item -Path (Join-Path $src "references") -Destination $dst -Recurse -Force
Copy-Item -Path (Join-Path $src "assets") -Destination $dst -Recurse -Force
Write-Host "Installed code-explainer to $dst"
Write-Host "Restart Codex to pick up the new skill."