跳至主要内容

Claude Code for Windows: Setup Guide

Prepare Windows Terminal for Node.js

  1. open Windows PowerShell 2025-08-07 153809
  2. check the PowerShell version $PSVersionTable.PSVersion Result:
    Major  Minor  Build  Revision
    ----- ----- ----- --------
    5 1 26100 4652
  3. search the latest version winget search Microsoft.PowerShell Result:
    名稱               識別碼                       版本    來源
    ---------------------------------------------------------------
    PowerShell Microsoft.PowerShell 7.5.2.0 winget
    PowerShell Preview Microsoft.PowerShell.Preview 7.6.0.4 winget
  4. use id to install PowerShell winget install --id Microsoft.PowerShell --source winget Result: 2025-08-07 150356
  5. open PowerShell 7 2025-08-07 153809
  6. check the PowerShell version $PSVersionTable.PSVersion Result:
    Major  Minor  Patch  PreReleaseLabel BuildLabel
    ----- ----- ----- --------------- ----------
    7 5 2
  7. open the setting tab 2025-08-07 160233
  8. select PowerShell and Windows Terminal 2025-08-07 160540
  9. restart PowerShell 7

Install Node.js

  1. open PowerShell 7
  2. install Node.js
    • option A - winget install OpenJS.NodeJS
    • option B - download the msi and execute it
  3. check the Node version node -v (JavaScript runtime environment) Result:
    v22.18.0
  4. check the Node Package Manager version npm -v (Node.js Package Manager) Result:
    10.9.3

Install Claude Code

  1. open PowerShell 7
  2. install Claude Code winget install Anthropic.ClaudeCode
  3. cd your-awesome-project
  4. start claude and select a option to login image

給已經開始使用 Claude Code 的夥伴OuO

Account

資訊

本機有登入過其他帳號的,可以在claude指令框先 /logout 成功登出後再重新進入claude,就可以設定新帳號了

Upgrage

資訊

在 PowerShell 直接下指令 claude update 就會自動檢查版本並更新了 image