準備開始在本地安裝 Claude Code!
完整的安裝說明請參考: https://code.claude.com/docs/en/quickstart
簡要步驟如下:
-
安裝 Claude Code
- macOS(Homebrew):
brew install --cask claude-code - macOS / Linux / WSL:
curl -fsSL https://claude.ai/install.sh | bash -
Windows CMD:
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
- macOS(Homebrew):
-
安裝完成後,在終端機執行
claude。首次執行會提示你進行認證。
如果你使用 AWS Bedrock 或 Google Cloud Vertex,還需要額外配置:
- AWS Bedrock 說明: https://code.claude.com/docs/en/amazon-bedrock
- Google Cloud Vertex 說明: https://code.claude.com/docs/en/google-vertex-ai
其他安裝方式
除了終端機版本,Claude Code 現在還提供多種使用方式:
- VS Code 擴展:在 VS Code 中搜索 "Claude Code" 或執行
code --install-extension anthropic.claude-code - JetBrains 插件:在 JetBrains Marketplace 搜索 "Claude Code",支持 IntelliJ IDEA、PyCharm、WebStorm 等
- 桌面應用:Mac 和 Windows 版本可在 claude.ai/download 下載
- 網頁版:直接在 claude.ai/code 使用,無需本地安裝
更多 IDE 整合細節請參考第 27 課。