2026-07-26 12:28:25 +07:00
|
|
|
# install.ps1 — code-guide plugin installer for Claude Code (Windows)
|
2026-07-25 11:51:39 +07:00
|
|
|
#
|
|
|
|
|
# Usage:
|
2026-07-26 12:28:25 +07:00
|
|
|
# .\install.ps1 # Install to %USERPROFILE%\.claude\skills\
|
|
|
|
|
# .\install.ps1 -Link # Symlink (PowerShell Admin/Dev mode)
|
2026-07-25 11:51:39 +07:00
|
|
|
|
|
|
|
|
param(
|
2026-07-26 12:28:25 +07:00
|
|
|
[switch]$Link
|
2026-07-25 11:51:39 +07:00
|
|
|
)
|
|
|
|
|
|
2026-07-26 12:28:25 +07:00
|
|
|
$PluginName = "code-guide"
|
2026-07-25 11:51:39 +07:00
|
|
|
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
2026-07-26 12:28:25 +07:00
|
|
|
$TargetDir = Join-Path $env:USERPROFILE ".claude\skills"
|
2026-07-25 11:51:39 +07:00
|
|
|
$PluginDir = Join-Path $TargetDir $PluginName
|
|
|
|
|
|
2026-07-26 12:28:25 +07:00
|
|
|
Write-Host "code-guide installer" -ForegroundColor Cyan
|
2026-07-25 11:51:39 +07:00
|
|
|
|
2026-07-26 12:28:25 +07:00
|
|
|
New-Item -ItemType Directory -Force -Path $TargetDir | Out-Null
|
2026-07-25 11:51:39 +07:00
|
|
|
|
|
|
|
|
if ($Link) {
|
2026-07-26 12:28:25 +07:00
|
|
|
Write-Host " symlink mode"
|
|
|
|
|
Remove-Item -Path $PluginDir -Recurse -Force -ErrorAction SilentlyContinue
|
|
|
|
|
New-Item -ItemType SymbolicLink -Path $PluginDir -Target $ScriptDir -Force | Out-Null
|
|
|
|
|
Write-Host " (symlink — edits in this repo are live)"
|
|
|
|
|
} else {
|
|
|
|
|
Write-Host " copy mode"
|
|
|
|
|
Remove-Item -Path $PluginDir -Recurse -Force -ErrorAction SilentlyContinue
|
|
|
|
|
Copy-Item -Path $ScriptDir -Destination $PluginDir -Recurse -Force
|
2026-07-25 11:51:39 +07:00
|
|
|
}
|
2026-07-26 12:28:25 +07:00
|
|
|
|
2026-07-25 11:51:39 +07:00
|
|
|
Write-Host ""
|
2026-07-26 12:28:25 +07:00
|
|
|
Write-Host "Done. Restart Claude Code or run /reload."
|
|
|
|
|
Write-Host "Skills auto-trigger. Hooks auto-load from hooks/hooks.json."
|