From 8a422fe7614e0ca8d800a236942cf6ffaba8246e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B1=84=EB=AC=B8=EC=B0=BD=40MBA?= Date: Wed, 9 Sep 2026 13:18:29 +0900 Subject: [PATCH] =?UTF-8?q?claude=20code=20=EC=9C=88=EB=8F=84=EC=9A=B0=20?= =?UTF-8?q?=EC=84=A4=EC=B9=98=20=EC=8B=9C=20=EB=82=98=EB=8A=94=20=EC=98=A4?= =?UTF-8?q?=EB=A5=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- install-claude-code.ps1 | 32 ++++++++++---------------------- 2 files changed, 11 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index d6819ef..6f93b5e 100644 --- a/README.md +++ b/README.md @@ -585,7 +585,7 @@ agy --help # 도움말 및 명령어 명세 로드 ``` #### 4.2. Claude Code -Anthropic사에서 개발한 공식 터미널 기반 AI 개발 어시스턴트 툴킷입니다. npm이 깔려있지 않은 시스템에서도 curl(macOS/Linux) 및 winget(Windows) 네이티브 설치 방식을 사용하여 즉시 CLI 코딩 환경에 접목할 수 있습니다. +Anthropic사에서 개발한 공식 터미널 기반 AI 개발 어시스턴트 툴킷입니다. npm이 깔려있지 않은 시스템에서도 curl(macOS/Linux) 및 PowerShell(Windows) 공식 네이티브 설치 방식을 사용하여 즉시 CLI 코딩 환경에 접목할 수 있습니다. * **고속 컨텍스트 추론** — Anthropic Claude 3.5 Sonnet 등의 고성능 AI 추론 엔진을 터미널 내에서 바로 가동 * **네이티브 실행 제어** — 시스템 아키텍처 환경과 로컬 파일 구조를 깊이 이해하고 즉시 빌드 및 리서치 수행 diff --git a/install-claude-code.ps1 b/install-claude-code.ps1 index db92912..db92ce7 100644 --- a/install-claude-code.ps1 +++ b/install-claude-code.ps1 @@ -1,11 +1,12 @@ #Requires -Version 5.1 <# .SYNOPSIS - Installs Claude Code (Anthropic's command-line AI assistant) on Windows using WinGet. + Installs Claude Code (Anthropic's command-line AI assistant) on Windows using PowerShell. .DESCRIPTION - Installs Claude Code natively via winget (Anthropic.ClaudeCode). + Installs Claude Code natively by invoking the official install.ps1 script. This native installation method is recommended for Windows. + Official Guide: https://code.claude.com/docs/ko/quickstart#native-install-recommended .EXAMPLE .\install-claude-code.ps1 @@ -32,13 +33,9 @@ $ErrorActionPreference = 'Stop' # 유틸리티 함수 정의 (모든 안내 문구는 영문으로 작성) # ──────────────────────────────────────────── 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 } - # 에러 출력 및 스크립트 강제 종료 # ──────────────────────────────────────────── # 메인 설치 프로세스 @@ -47,28 +44,19 @@ function Main { Write-Info "===== Claude Code install script (Windows PowerShell) =====" Write-Info "Installing Claude Code (command-line AI assistant) natively..." - # 1) winget 명령어 가용성 확인 - if (-not (Get-Command winget -ErrorAction SilentlyContinue)) { - Write-Err "winget is required to install Claude Code. Please install it from the Microsoft Store or https://learn.microsoft.com/en-us/windows/package-manager/winget/" - } - - # 2) winget을 통한 Anthropic.ClaudeCode 설치 가동 try { - Write-Info "Running winget installer..." - # 라이센스 및 소스 협약 자동 수락 처리와 함께 설치 실행 - winget install --id Anthropic.ClaudeCode --accept-package-agreements --accept-source-agreements 2>&1 | Out-Null - + Write-Info "Fetching and executing official installer from: https://claude.ai/install.ps1" + + # Anthropic 공식 설치 ps1 스크립트를 다운로드 및 메모리 상에서 직접 호출 가동 + $installerScript = Invoke-RestMethod -Uri "https://claude.ai/install.ps1" -UseBasicParsing + Invoke-Expression $installerScript + Write-Success "Claude Code has been successfully installed!" Write-Info "Please restart your terminal window or refresh your PATH environment variable." Write-Info "Run command: claude" } catch { - Write-Err "Failed to install Claude Code via winget: $_" + Write-Err "Failed to install Claude Code: $_" } } -# 예기치 못한 전체 프로세스 에러 감지를 위한 Trap 설정 -trap { - Write-Err "An unexpected error occurred during installation: $_" -} - Main