Install-ClaudeCode.ps1
|
<#PSScriptInfo
.VERSION 1.0.0 .GUID fe45f7fb-3ca1-439e-88af-d38a18427747 .AUTHOR Will 保哥 .COMPANYNAME Duotify Inc. .COPYRIGHT ©2025 Will Huang .DESCRIPTION Downloads and runs the official Claude Code installer script from https://claude.ai/install.ps1 using Invoke-RestMethod. .SYNOPSIS Installs Claude Code on Windows. #> Write-Host "🚀 Installing Claude Code..." -ForegroundColor Cyan Write-Host "Fetching installer from https://claude.ai/install.ps1" -ForegroundColor Gray try { # Download and execute the installer irm https://claude.ai/install.ps1 | iex Write-Host "`n✅ Claude Code installation completed successfully." -ForegroundColor Green } catch { Write-Host "`n❌ Installation failed: $($_.Exception.Message)" -ForegroundColor Red exit 1 } |