#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 "Google Antigravity 2.0 CLI (agy) 설치를 시작합니다..." Write-Info "원격 설치 스크립트 가져오는 중: $INSTALL_URL" try { # 원격 스크립트 다운로드 및 파이프(iex) 실행 Invoke-RestMethod -Uri $INSTALL_URL -UseBasicParsing | Invoke-Expression Write-Host "" Write-Host "==================================================" -ForegroundColor Green Write-Success "Antigravity CLI 설치가 완료되었습니다!" Write-Host "==================================================" -ForegroundColor Green Write-Info "터미널 창을 다시 시작한 후 'agy' 명령어를 입력하여 실행하세요." Write-Info "최초 가동 시 Google 계정 로그인 연동이 필요합니다." } catch { Write-Err "Antigravity CLI 설치 스크립트 실행 중 에러가 발생했습니다: $_" }