Claude Code 공식 문서에 따르면:
현재 Claude Code는 Windows에서 직접 실행되지 않으며 WSL이 필요합니다.
…라고 하고 있지만, Git for Windows가 깔려 있을 경우, Git Bash 안에서는 문제 없이 사용 가능하다. 다만, npm
으로 설치할 때 scripts/preinstall.js 스크립트에서 Windows인지 검사하는 부분이 있어서 오류가 나며 설치가 중단되는데, 해당 스크립트는 오로지 Windows인지 검사하는 역할만 하고 있기 때문에[1] 아래와 같이 npm
이 해당 스크립트를 실행하지 않도록 우회해도 설치에 문제가 없다:
NPM_CONFIG_IGNORE_SCRIPTS=true npm install -g @anthropic-ai/claude-code
다만 명령 프롬프트나 PowerShell에서 Claude Code를 실행시키려 할 경우 SHELL
환경 변수가 정의되어 있지 않기 때문에 오류가 난다. 그래서 Git Bash 안에서 Claude Code를 실행해야 한다.
일단 이렇게 설치해서 조금 써 본 결과 크게 문제는 없는 걸로 보인다.
해당 스크립트는 아래 코드가 전부다:
↩︎/** * Preinstall script to check for Windows environment and exit gracefully * with an informative message if detected. */ // Check if running on Windows if (process.platform === 'win32') { console.error('\x1b[31m%s\x1b[0m', 'Error: Claude Code is not supported on Windows.'); console.error('\x1b[33m%s\x1b[0m', 'Claude Code requires macOS or Linux to run properly.'); console.error('\x1b[33m%s\x1b[0m', 'If you are using WSL (Windows Subsystem for Linux):'); console.error('\x1b[33m%s\x1b[0m', ' 1. Make sure you are running npm install from within the WSL terminal, not from PowerShell or CMD'); console.error('\x1b[33m%s\x1b[0m', ' 2. If you\'re still seeing this message in WSL, your environment may be incorrectly reporting as Windows'); console.error('\x1b[33m%s\x1b[0m', 'Please visit https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/overview#check-system-requirements for troubleshooting information.'); process.exit(1); }