#Requires -Version 5.1 <# .SYNOPSIS Google Antigravity 2.0 CLI (agy) 설치 스크립트. .DESCRIPTION https://antigravity.google/cli/install.ps1 원격 파워쉘 스크립트를 보안이 설정된 환경에서 안전하게 가져와 실행하여 Antigravity CLI(agy.exe)를 설치합니다. .EXAMPLE .\install-agy.ps1 # Windows 원라인 원격 실행 명령어: powershell -ExecutionPolicy Bypass -c "[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12; $t=\"$env:TEMP\install-agy.ps1\"; iwr -useb 'https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-agy.ps1' -OutFile $t; & $t" .NOTES 실행 정책 에러가 발생하는 경우 다음 명령어로 해결할 수 있습니다: Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser #> [CmdletBinding()] param() Set-StrictMode -Version Latest $ErrorActionPreference = 'Stop' # HTTPS 통신을 위한 TLS 1.2 보안 프로토콜 설정 강제 [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 # ──────────────────────────────────────────── # 유틸리티 함수 정의 # ──────────────────────────────────────────── function Write-Info { param([string]$msg) Write-Host "[INFO] $msg" -ForegroundColor Cyan } function Write-Warn { param([string]$msg) Write-Host "[WARN] $msg" -ForegroundColor Yellow } function Write-Success { param([string]$msg) Write-Host "[OK] $msg" -ForegroundColor Green } function Write-Err { param([string]$msg) Write-Host "[ERROR] $msg" -ForegroundColor Red; exit 1 } # ──────────────────────────────────────────── # 상수 정의 # ──────────────────────────────────────────── $INSTALL_URL = "https://antigravity.google/cli/install.ps1" # ──────────────────────────────────────────── # 메인 설치 프로세스 # ──────────────────────────────────────────── Write-Info "Starting installation of Google Antigravity 2.0 CLI (agy)..." Write-Info "Fetching remote installation script: $INSTALL_URL" try { # 원격 스크립트 다운로드 및 파이프(iex) 실행 Invoke-RestMethod -Uri $INSTALL_URL -UseBasicParsing | Invoke-Expression Write-Host "" Write-Host "==================================================" -ForegroundColor Green Write-Success "Antigravity CLI installation completed successfully!" Write-Host "==================================================" -ForegroundColor Green Write-Info "Please restart your terminal and run 'agy' command to get started." Write-Info "Google Account authentication is required on first launch." } catch { Write-Err "An error occurred while executing the Antigravity CLI installation script: $_" }