Files
antigravity-claudekit/install.ps1
2026-02-16 14:02:42 +09:00

51 lines
1.8 KiB
PowerShell

# Install ClaudeKit skills for Antigravity IDE (Windows)
# Usage: .\install.ps1 [-Workspace]
param(
[switch]$Workspace
)
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
$RepoRoot = Split-Path -Parent $ScriptDir
if ($Workspace) {
$Dest = Join-Path (Get-Location) ".agent\skills"
} else {
$Dest = Join-Path $env:USERPROFILE ".gemini\antigravity\skills"
}
Write-Host "==> Installing skills to: $Dest"
New-Item -ItemType Directory -Force -Path $Dest | Out-Null
# Copy local skills
$SkillsDir = Join-Path $RepoRoot "skills"
if (Test-Path $SkillsDir) {
Write-Host "==> Syncing local skills..."
Get-ChildItem -Path $SkillsDir -Directory | ForEach-Object {
$DestSkill = Join-Path $Dest $_.Name
Copy-Item -Path $_.FullName -Destination $DestSkill -Recurse -Force
}
Write-Host "==> Local skills synced."
}
# Sync external sources from skills_sources.json
$SourcesFile = Join-Path $RepoRoot "skills_sources.json"
if (Test-Path $SourcesFile) {
$Sources = Get-Content $SourcesFile | ConvertFrom-Json
foreach ($Source in $Sources) {
Write-Host "==> Syncing external source: $($Source.name)"
$TmpDir = Join-Path $env:TEMP "ag-sync-$($Source.name)"
if (Test-Path $TmpDir) { Remove-Item -Recurse -Force $TmpDir }
git clone --depth 1 $Source.url $TmpDir 2>$null
$SrcPath = Join-Path $TmpDir ($Source.path ?? "skills")
if (Test-Path $SrcPath) {
Get-ChildItem -Path $SrcPath -Directory | ForEach-Object {
Copy-Item -Path $_.FullName -Destination (Join-Path $Dest $_.Name) -Recurse -Force
}
}
Remove-Item -Recurse -Force $TmpDir
Write-Host "==> Source '$($Source.name)' synced."
}
}
Write-Host "==> Done. Skills installed to: $Dest"