Windows 11安裝Claude Code方式如下。
安裝環境
- Windows 11 專業版
簡介
Claude Code是一個基於Claude AI模型的CLI介面程式碼輔助開發工具。目前(2026/3)要訂閱Claude Pro方案(200USD/年)才可使用,且目前介面只有英文版。
安裝過程
官方Windows安裝方式有幾種,建議使用Windows PowerShell安裝;若用CMD安裝則要另外裝nvm;用winget安裝則不會自動更新。
開啟PowerShell命令視窗,輸入irm https://claude.ai/install.ps1 | iex即可。
PS C:\Users\user> irm https://claude.ai/install.ps1 | iex
Setting up Claude Code...
✔ Claude Code successfully installed!
Version: 2.1.71
Location: C:\Users\user\.local\bin\claude.exe
Next: Run claude --help to get started
⚠ Setup notes:
• Native installation exists but C:\Users\user\.local\bin is not in your PATH. Add it by opening: System Properties →
Environment Variables → Edit User PATH → New → Add the path above. Then restart your terminal.
✅ Installation complete!
安裝完後可看到訊息中出現要把C:\Users\user\.local\bin設定到環境變數PATH中。
PATH設定完成後重新開啟PowerShell命令視窗,輸入claude --help即可看到相關說明。
PS C:\Users\user> claude --help
Usage: claude [options] [command] [prompt]
Claude Code - starts an interactive session by default, use -p/--print for non-interactive output
Arguments:
prompt Your prompt
Options:
--add-dir <directories...> Additional directories to allow tool access to
--agent <agent> Agent for the current session. Overrides the 'agent' setting.
--agents <json> JSON object defining custom agents (e.g. '{"reviewer":
{"description": "Reviews code", "prompt": "You are a code
reviewer"}}')
...
開始使用
在命令行輸入claude即可進入claude互動介面,在一開始需要選擇偏好顏色、使用方案、允許存取權限等,完成後就會出現如下畫面。
╭─── Claude Code v2.1.71 ──────────────────────────────────────────────────────────────────────────────────────────────╮
│ │ Tips for getting started │
│ Welcome back ! │ Run /init to create a CLAUDE.md file with instructions for Cla… │
│ │ Note: You have launched claude in your home directory. For the… │
│ │ ─────────────────────────────────────────────────────────────── │
│ ▐▛███▜▌ │ Recent activity │
│ ▝▜█████▛▘ │ No recent activity │
│ ▘▘ ▝▝ │ │
│ Sonnet 4.6 · Claude Pro · <youraccount>'s │ │
│ Organization │ │
│ C:\Users\user │ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
沒有留言:
張貼留言