Windows 10 환경에서, Claude Code GUI / Codex GUI를 설치하고 사용하기 위한 셋업. --- ### 1. Winget 설치 ``` # Powershell Install-PackageProvider -Name NuGet -Force | Out-Null Install-Module -Name Microsoft.WinGet.Client -Force -Repository PSGallery | Out-Null Repair-WinGetPackageManager -Force -Latest ``` (https://learn.microsoft.com/en-us/windows/package-manager/winget/troubleshooting) --- ### 2. Useful developer tools (Codex) 설치 OpenAI의 Codex 문서 (https://developers.openai.com/codex/app/windows) 에서 권장하는 셋업 (2-A)이 있는데, 일부 불편한 점이 있어서 수동으로 셋업 (2-B) 함. - 2-A로 진행했을 시, Codex windows app의 Sandbox mode 에서 Python을 정상적으로 작동하지 못함. 환경변수 문제인 것으로 추측됨. ##### 2-A : Powershell 명령어로 설치 ``` # Powershell winget install --id Git.Git winget install --id OpenJS.NodeJS.LTS winget install --id Python.Python.3.14 winget install --id Microsoft.DotNet.SDK.10 winget install --id GitHub.cli ``` - **Git**: Powers the review panel in the Codex app and lets you inspect or revert changes. - **Node.js**: A common tool that the agent uses to perform tasks more efficiently. - **Python**: A common tool that the agent uses to perform tasks more efficiently. - **.NET SDK**: Useful when you want to build native Windows apps. - **GitHub CLI**: Powers GitHub-specific functionality in the Codex app. ##### 2-B : 수동 설치 ``` # Powershell winget install --id Microsoft.DotNet.SDK.10 ``` Git : https://git-scm.com/install/windows Node.js : https://nodejs.org/ko/download (명령어로 설치해도 무방) - Node.js 설치 완료 후 추가적으로 스크립트를 실행해서 Addon을 설치할 것이냐고 물어보는데, 설치하지 않음. Python이 3.14로 자동 설치 (덮어쓰기 설치) 되기 때문. Python 3.11 : https://www.python.org/downloads/release/python-3119/ Github CLI : 필요하면 설치 --- ### 3. Powershell 7 설치 Powershell 7을 설치하는 이유는 기본 탑재된 Powershell 5 버전보다 훨 낫기 때문. 특히 한국어 환경에서 인코딩이 깨지는 경우가 많은데, Powershell 7을 사용하면 기본적으로 UTF-8 인코딩을 사용해서 문제가 생기지 않음. Claude Code : `pwsh.exe`(PowerShell 7+)를 자동 감지하며 `powershell.exe`(PowerShell 5.1)로 폴백 함. (https://code.claude.com/docs/ko/tools-reference) Codex : 별도의 시스템 프롬프트 필요. 기본적으로 Powershell 5.1을 사용하게 설정이 되어있음. `prompt 1 (추천)` : 항상 Windows PowerShell 5.1이 아니라 PowerShell 7+ (pwsh.exe)로만 명령을 실행하라. `prompt 2` : 항상 PowerShell 7+ (pwsh.exe)만 사용하고, 모든 텍스트 파일 입출력은 명시적 UTF-8로 처리하라. ``` # Powershell 1. 버전 확인 winget search --id Microsoft.PowerShell 이름 장치 ID 버전 원본 ----------------------------------------------------------------- PowerShell Microsoft.PowerShell 7.6.0.0 winget PowerShell Preview Microsoft.PowerShell.Preview 7.6.0.101 winget 2-A. MSI 방식 설치 $msi = "$env:TEMP\PowerShell-7.6.0-win-x64.msi" Invoke-WebRequest "https://github.com/PowerShell/PowerShell/releases/download/v7.6.0/PowerShell-7.6.0-win-x64.msi" -OutFile $msi Start-Process msiexec.exe -Verb RunAs -Wait -ArgumentList "/i `"$msi`" ADD_PATH=1" 2-B. Github 링크에서 직접 수동 설치 https://github.com/PowerShell/PowerShell/releases/ ``` --- ### 3-X. Powershell 7에 관하여 ``` # Powershell winget install --id Microsoft.PowerShell --source winget ``` 위 명령어로 설치하는 것은 추천하지 않음. 이 명령어로 설치했을 시, ``` # Powershell $PSHOME (Get-Command pwsh).Source ``` 위 명령어로 조회해보면, Powershell 7의 설치 경로가 'WindowsApps'로 설정됨. 이렇게 설치했을 시 Codex의 Sandbox 환경에서 pwsh.exe를 실행하지 못함. (error: CreateProcessAsUserW failed: 5) **해결 방법** ``` # Powershell 1. Store 버전 Powershell 7 제거 winget uninstall --id Microsoft.PowerShell 2-A. MSI 방식 설치 $msi = "$env:TEMP\PowerShell-7.6.0-win-x64.msi" Invoke-WebRequest "https://github.com/PowerShell/PowerShell/releases/download/v7.6.0/PowerShell-7.6.0-win-x64.msi" -OutFile $msi Start-Process msiexec.exe -Verb RunAs -Wait -ArgumentList "/i `"$msi`" ADD_PATH=1" 2-B. Github 링크에서 직접 수동 설치 https://github.com/PowerShell/PowerShell/releases/ ``` 다시 조회해보면, 정상적으로 Program Files 폴더에 설치된 것을 알 수 있음. ``` # Powershell 7 $PSHOME (Get-Command pwsh).Source C:\Program Files\PowerShell\7 C:\Program Files\PowerShell\7\pwsh.exe ``` --- ### 4. rg / vc-redist / codex gui / claude gui 설치 **rg** : Powershell 에서 사용하는 도구. Codex 가 파일을 탐색할 때 많이 사용함. **vc-redist** : 설치해야 Codex Windows GUI App이 설치 가능함. **Codex GUI / Claude GUI** : 사용할 것이기에 지금까지의 과정을 겪었으니.. 1. rg 설치 ``` # Powershell 7 winget install BurntSushi.ripgrep.MSVC ``` 2. vc-redist 설치 https://learn.microsoft.com/ko-kr/cpp/windows/latest-supported-vc-redist?view=msvc-170 -> https://aka.ms/vc14/vc_redist.x64.exe 3. Codex GUI 설치 3-A. exe로 설치 : https://openai.com/ko-KR/index/introducing-the-codex-app/ 3-B. Powershell 7로 설치 ``` # Powershell 7 winget install Codex -s msstore ``` 4. Claude GUI 설치 : https://claude.com/download