@echo off
setlocal
where claude >nul 2>nul
if errorlevel 1 (
  where npm >nul 2>nul
  if errorlevel 1 (
    echo Install Node.js LTS from https://nodejs.org/en/download and run this file again.
    pause
    exit /b 1
  )
  call npm install -g @anthropic-ai/claude-code
  if errorlevel 1 exit /b 1
)
powershell -NoProfile -ExecutionPolicy Bypass -Command "$ErrorActionPreference='Stop'; $setup=Join-Path $env:TEMP ('claudsale-claude-'+[guid]::NewGuid()+'.ps1'); try { Invoke-WebRequest -UseBasicParsing 'https://claud.sale/install/claude.ps1' -OutFile $setup; & powershell -NoProfile -ExecutionPolicy Bypass -File $setup; if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } } finally { Remove-Item -LiteralPath $setup -Force -ErrorAction SilentlyContinue }"
if errorlevel 1 exit /b 1
echo Open a new terminal and run: claude
pause
