# ============================================================ # NXL AI FIRST - Setup do Zero (Windows) # Antigravity + Claude Code + MiniMax M3 # Uso: irm https://SEU-DOMINIO/install.ps1 | iex # ============================================================ $ErrorActionPreference = 'Continue' try { [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 } catch {} function Line { Write-Host ("-" * 54) -ForegroundColor DarkMagenta } function Step($m){ Write-Host "`n==> $m" -ForegroundColor Magenta } function Ok($m) { Write-Host " [OK] $m" -ForegroundColor Green } function Warn($m){ Write-Host " [!] $m" -ForegroundColor Yellow } Clear-Host Line Write-Host " NXL AI FIRST - Setup do Zero (Windows)" -ForegroundColor Magenta Write-Host " Antigravity + Claude Code + MiniMax M3" -ForegroundColor Magenta Line # ---------- winget ---------- $hasWinget = [bool](Get-Command winget -ErrorAction SilentlyContinue) if (-not $hasWinget) { Warn "winget nao encontrado. Instale o 'App Installer' pela Microsoft Store e rode este script de novo." Start-Process "https://apps.microsoft.com/detail/9NBLGGH4NNS1" } function Winget-Install($id, $name) { if (-not $hasWinget) { Warn "Pulei $name (sem winget)"; return } Step "Instalando $name ..." winget install -e --id $id --accept-source-agreements --accept-package-agreements --silent if ($LASTEXITCODE -eq 0) { Ok "$name pronto" } else { Warn "$name pode ja estar instalado (ou pediu acao manual)" } } # ---------- 1) Git (recomendado p/ Claude Code) ---------- Winget-Install 'Git.Git' 'Git para Windows' # ---------- 2) Chrome (necessario p/ Antigravity) ---------- $chrome1 = Join-Path $env:ProgramFiles 'Google\Chrome\Application\chrome.exe' $chrome2 = Join-Path ${env:ProgramFiles(x86)} 'Google\Chrome\Application\chrome.exe' if ((Test-Path $chrome1) -or (Test-Path $chrome2)) { Ok "Google Chrome ja instalado" } else { Winget-Install 'Google.Chrome' 'Google Chrome' } # ---------- 3) Claude Code (instalador nativo oficial) ---------- Step "Instalando o Claude Code (instalador nativo da Anthropic) ..." try { Invoke-Expression (Invoke-RestMethod -Uri 'https://claude.ai/install.ps1') Ok "Claude Code instalado" } catch { Warn ("Falha no instalador nativo: " + $_.Exception.Message) Warn "Alternativa manual: abra o PowerShell e rode irm https://claude.ai/install.ps1 | iex" } # ---------- 4) settings.json com MiniMax M3 ---------- Step "Configurando o Claude Code para o MiniMax M3 ..." $claudeDir = Join-Path $env:USERPROFILE '.claude' New-Item -ItemType Directory -Force -Path $claudeDir | Out-Null $settingsPath = Join-Path $claudeDir 'settings.json' if (Test-Path $settingsPath) { Copy-Item $settingsPath "$settingsPath.bak" -Force Warn "settings.json existente salvo como settings.json.bak" } $settings = @' { "env": { "ANTHROPIC_BASE_URL": "https://api.minimax.io/anthropic", "ANTHROPIC_AUTH_TOKEN": "sk-cp-Ag53rKzI6wuJaWQX68fiI_1vi-7vTjKMusUTl4o7vuYSZ9xWMUrKaloxRr6GPenDSxLiy3mP46t3xcIK8uemqLO1L4cq335JojX2EGofgqE2C3Pv26vK5yY", "API_TIMEOUT_MS": "3000000", "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1", "ANTHROPIC_MODEL": "MiniMax-M3", "ANTHROPIC_DEFAULT_SONNET_MODEL": "MiniMax-M3", "ANTHROPIC_DEFAULT_OPUS_MODEL": "MiniMax-M3", "ANTHROPIC_DEFAULT_HAIKU_MODEL": "MiniMax-M3" } } '@ try { $utf8NoBom = New-Object System.Text.UTF8Encoding($false) [System.IO.File]::WriteAllText($settingsPath, $settings, $utf8NoBom) Ok "settings.json escrito em $settingsPath" } catch { Warn ("Nao consegui escrever o settings.json: " + $_.Exception.Message) } # ---------- 5) Google Antigravity ---------- Step "Instalando o Google Antigravity ..." $agOk = $false if ($hasWinget) { winget install -e --id Google.Antigravity --accept-source-agreements --accept-package-agreements --silent if ($LASTEXITCODE -eq 0) { $agOk = $true; Ok "Antigravity instalado via winget" } } if (-not $agOk) { Warn "Abrindo o download oficial do Antigravity. Instale e depois faca login com sua conta Google." Start-Process "https://antigravity.google/download" } # ---------- Fim ---------- Write-Host "" Line Write-Host " TUDO PRONTO!" -ForegroundColor Green Line Write-Host "Proximos passos:" -ForegroundColor White Write-Host " 1) FECHE e ABRA de novo o PowerShell (para atualizar o PATH)." Write-Host " 2) Rode: claude (o modelo ja vem configurado no MiniMax-M3)" Write-Host " 3) Abra o Antigravity e faca login com sua conta Google." Write-Host "" Write-Host "Config do Claude Code em: $settingsPath" -ForegroundColor DarkGray Write-Host ""