feat(customizations): add removal commands

This commit is contained in:
Julian lechner committed 2026-09-30 17:08:59 +02:00
1 parent 29c0e98272
commit 05663197f7
6 files changed
+333

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
[CmdletBinding()]
param(
[ValidateSet('Codex','Claude','Both')][string]$Client,
[AllowEmptyString()][string]$Instruction,
[string]$HomePath = [Environment]::GetFolderPath('UserProfile')
)
$ErrorActionPreference = 'Stop'
$root = Split-Path (Split-Path $PSScriptRoot -Parent) -Parent
. (Join-Path $root 'scripts/lib/install-targets.ps1')
if (-not $Client) { $Client = Read-InstallClient -Client $Client }
if (-not $PSBoundParameters.ContainsKey('Instruction')) { $Instruction = Read-Host 'Instruction to remove' }
if ([string]::IsNullOrWhiteSpace($Instruction) -or $Instruction.Length -gt 65536) { throw 'Instruction must contain between 1 and 65536 characters.' }
& python (Join-Path $root 'scripts/lib/remove-instruction.py') --client $Client.ToLowerInvariant() --instruction $Instruction.TrimEnd() --home $HomePath
if ($LASTEXITCODE -ne 0) { throw 'Instruction removal failed.' }