$petId = "cat-maine-coon-linwang"
$codexRoot = if ($env:CODEX_HOME) { $env:CODEX_HOME } else { Join-Path $env:USERPROFILE ".codex" }
$petsRoot = Join-Path $codexRoot "pets"
$target = Join-Path $petsRoot $petId
$archive = Join-Path $env:USERPROFILE "Downloads\$petId.zip"
if (Test-Path -LiteralPath $target) { throw "$petId already exists. Stop and review it before replacing anything." }
New-Item -ItemType Directory -Force -Path $petsRoot | Out-Null
Expand-Archive -LiteralPath $archive -DestinationPath $petsRoot
Before running, confirm the ZIP is in your Downloads folder. Fully quit and reopen Codex Desktop after installation.