1414 -EnableClaudeCode Merge a Stop hook into <target>/.claude/settings.json.
1515 Existing user entries are preserved; our entry is tagged
1616 with "_codesee" so reruns stay idempotent.
17- -EnableKiro Drop a hook file into <target>/.kiro/hooks/codesee-sync-on-stop.json .
17+ -EnableKiro Drop a hook file into <target>/.kiro/hooks/codesee-sync-on-stop.kiro.hook .
1818 -AutoDetect Equivalent to -EnableClaudeCode / -EnableKiro driven by
1919 which directories exist in the target.
2020 -ForceHooks Replace our existing hook entry even if the user changed it.
2121 -UninstallHooks Remove every entry tagged with _codesee and any
22- .kiro/hooks/codesee-*.json . Templates stay.
22+ .kiro/hooks/codesee-*.kiro.hook . Templates stay.
2323
2424. EXAMPLE
2525 ./scripts/install.ps1 D:\path\to\project
@@ -217,10 +217,15 @@ if ($UninstallHooks) {
217217 }
218218 $kiroDir = Join-Path $TargetDir ' .kiro/hooks'
219219 if (Test-Path $kiroDir ) {
220- Get-ChildItem $kiroDir - Filter ' codesee-*.json ' - ErrorAction SilentlyContinue | ForEach-Object {
220+ Get-ChildItem $kiroDir - Filter ' codesee-*.kiro.hook ' - ErrorAction SilentlyContinue | ForEach-Object {
221221 Remove-Item $_.FullName - Force
222222 Write-Host (" - removed " + $_.FullName )
223223 }
224+ # Also clean up legacy .json named hooks from earlier install versions
225+ Get-ChildItem $kiroDir - Filter ' codesee-*.json' - ErrorAction SilentlyContinue | ForEach-Object {
226+ Remove-Item $_.FullName - Force
227+ Write-Host (" - removed " + $_.FullName + " (legacy)" )
228+ }
224229 }
225230} elseif ($wantClaudeCode -or $wantKiro ) {
226231 Write-Host ' '
@@ -239,9 +244,9 @@ if ($UninstallHooks) {
239244 if ($wantKiro ) {
240245 $kiroDst = Join-Path $TargetDir ' .kiro/hooks'
241246 New-Item - ItemType Directory - Force - Path $kiroDst | Out-Null
242- $kiroSrc = Join-Path $Self ' hooks/kiro/sync-on-stop.json '
247+ $kiroSrc = Join-Path $Self ' hooks/kiro/sync-on-stop.kiro.hook '
243248 if (Test-Path $kiroSrc ) {
244- $kiroOut = Join-Path $kiroDst ' codesee-sync-on-stop.json '
249+ $kiroOut = Join-Path $kiroDst ' codesee-sync-on-stop.kiro.hook '
245250 Copy-Item - Force $kiroSrc $kiroOut
246251 Write-Host " - wrote $kiroOut "
247252 }
0 commit comments