# Setup script for guillaumemeyer/watermarks-remover on Windows (PowerShell), from https://gitmanual.com/guillaumemeyer/watermarks-remover # Read it before you run it: the commands come from the repo's own README and files. # Run: powershell -ExecutionPolicy Bypass -File .\setup.ps1 $ErrorActionPreference = "Stop" function Write-Step($t) { Write-Host "`n==> $t" -ForegroundColor Cyan } # Windows ships a python that only opens the Microsoft Store; it doesn't count. function Have($c) { $cmd = Get-Command $c -ErrorAction SilentlyContinue; [bool]$cmd -and $cmd.Source -notlike '*\WindowsApps\*' } # New installs change PATH; pick it up without opening a new window. function Update-Path { $env:Path = [Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [Environment]::GetEnvironmentVariable("Path", "User") } # Stop when a program fails, like bash's set -e. Dot-sourced, so cd and venv activation carry on to the next step. function Invoke-Step([scriptblock]$Block) { $global:LASTEXITCODE = 0; . $Block; if ($LASTEXITCODE) { throw "Failed with exit code $LASTEXITCODE" } } Write-Step '1/4 Clone the repository' if (-not (Test-Path 'watermarks-remover')) { Invoke-Step { git clone https://github.com/guillaumemeyer/watermarks-remover.git } } Set-Location 'watermarks-remover' Write-Step '2/4 Install the required tools' # make, Python 3 # or use WSL if (-not (Have 'make')) { Invoke-Step { winget install GnuWin32.Make -e --accept-source-agreements --accept-package-agreements }; Update-Path } if (-not (Have 'python')) { Invoke-Step { winget install Python.Python.3.12 -e --accept-source-agreements --accept-package-agreements }; Update-Path } Write-Step '3/4 Configure environment variables' # Optional, add them when you need them: WATERMARKS_SERVER_API_KEY, HF_TOKEN if (-not (Test-Path .env)) { Copy-Item .env.example .env } Write-Step '4/4 Follow the README: Install (agent skill)' # In the maintainers' order. Do the README instructions above first — they cover steps outside the terminal. Invoke-Step { python3 install_skill.py --skill remove-ai-marks --target claude-code } Invoke-Step { python3 install_skill.py --skill remove-ai-marks --target codex } Invoke-Step { python3 install_skill.py --skill clean-user-facing-text --target codex } Invoke-Step { python3 install_skill.py --skill remove-ai-marks --target codex-project --project-dir /path/to/project } Invoke-Step { /plugin marketplace add guillaumemeyer/watermarks-remover } Invoke-Step { /plugin install watermarks-remover@watermarks-remover } Invoke-Step { python3 install_skill.py --skill remove-ai-marks --target claude-code } Invoke-Step { python3 install_skill.py --skill remove-ai-marks --target claude-project \ } Invoke-Step { --project-dir /path/to/project } Invoke-Step { python3 install_skill.py --skill remove-ai-marks --target cowork } Invoke-Step { python3 install_skill.py --skill clean-user-facing-text --target cowork } Invoke-Step { mkdir -p .grok/skills } Invoke-Step { ln -sfn "$(pwd)/skills/remove-ai-marks" .grok/skills/remove-ai-marks } Invoke-Step { mkdir -p ~/.grok/skills } Invoke-Step { ln -sfn "$(pwd)/skills/remove-ai-marks" ~/.grok/skills/remove-ai-marks } Invoke-Step { python3 install_skill.py --skill clean-user-facing-text --target claude-code } Invoke-Step { python3 install_skill.py --skill clean-user-facing-text --target cursor } Invoke-Step { mkdir -p /path/to/project/.cursor/rules } Invoke-Step { cp integrations/cursor/clean-user-facing-text.mdc \ } Invoke-Step { /path/to/project/.cursor/rules/clean-user-facing-text.mdc } # http://127.0.0.1:8765 Invoke-Step { make serve } Invoke-Step { python3 service/scripts/server.py --host 127.0.0.1 --port 8765 } Write-Host 'Set up guillaumemeyer/watermarks-remover.' Write-Host 'Optional, add them when you need them: WATERMARKS_SERVER_API_KEY, HF_TOKEN' Write-Host 'Manual: https://gitmanual.com/guillaumemeyer/watermarks-remover'