# Claude Code for Windows: Setup (deprecated)
:::info
### Account Info
給已經使用過的夥伴OuO
本機有登入過其他帳號的,可以在claude指令框先 `/logout` 成功登出後再重新進入claude,就可以設定新帳號了
:::
[TOC]
## Prepare Windows Terminal for Node.js
- official document: [在 Windows 上安裝 PowerShell 7](https://learn.microsoft.com/zh-tw/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.5#winget)
- Windows Terminal Setting: [Windows Terminal as your Default Command Line Experience](https://devblogs.microsoft.com/commandline/windows-terminal-as-your-default-command-line-experience/)
1. open Windows PowerShell

2. check the PowerShell version `$PSVersionTable.PSVersion`
Result:
```powershell
Major Minor Build Revision
----- ----- ----- --------
5 1 26100 4652
```
3. search the latest version `winget search Microsoft.PowerShell`
Result:
```powershell
名稱 識別碼 版本 來源
---------------------------------------------------------------
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:

5. open PowerShell 7

6. check the PowerShell version `$PSVersionTable.PSVersion`
Result:
```powershell
Major Minor Patch PreReleaseLabel BuildLabel
----- ----- ----- --------------- ----------
7 5 2
```
7. open the setting tab

8. select <font color='orange'>**PowerShell**</font> and <font color='orange'>**Windows Terminal**</font>

9. restart PowerShell 7
## Install Node.js
- official document: [下載 Node.js®](https://nodejs.org/zh-tw/download)
1. open PowerShell 7
2. install Node.js
- option A - `winget install OpenJS.NodeJS`
- option B - download the msi and execute it
<!-- - **Node.js runtime** Node.js 本體,必須安裝
- **corepack manager** 讓你能使用其他套件管理工具(如 yarn)
- **npm package manager** Node.js 常用的套件管理器
- Online documentation shortcuts 在「開始選單」建立線上文件的捷徑(非必要)
- **Add to PATH** 把 Node 和 npm 加到系統變數,讓你在命令列能直接用
↳ Node.js and npm 加入 Node 跟 npm 的指令
↳ npm modules 加入全域安裝的套件位置 -->
3. check the Node version `node -v` (JavaScript runtime environment)
Result:
```powershell
v22.18.0
```
4. check the Node Package Manager version `npm -v` (Node.js Package Manager)
Result:
```powershell
10.9.3
```
## Install Claude Code
- official document: [開始使用 Claude Code](https://docs.anthropic.com/zh-TW/docs/claude-code/overview)
1. open PowerShell 7
2. install Claude Code `npm install -g @anthropic-ai/claude-code`
3. cd your-awesome-project
4. start `claude`


5. select a option to login