安裝 Claude Code
Claude Code 是一個由 AI 驅動的編碼助手,理解你的整個程式碼庫,可以跨多個檔案和工具工作。可在終端、IDE、桌面應用和瀏覽器中使用。
前置要求
- OfoxAI API Key (註冊即可獲取,無需 Claude 訂閱)
終端 CLI
功能完整的 CLI,用於直接在終端中使用 Claude Code。
原生安裝(推薦)
macOS / Linux / WSL:
curl -fsSL https://claude.ai/install.sh | bashWindows PowerShell:
irm https://claude.ai/install.ps1 | iexWindows CMD:
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmdWindows 需要先安裝 Git for Windows 。原生安裝會自動在背景更新。
安裝完成後,請先完成 配置模型供應商 再啟動使用。
VS Code / Cursor
在編輯器中直接提供內聯差異、@-提及、計畫審查和對話歷史。
或在擴充功能檢視中搜尋 “Claude Code”(Cmd+Shift+X / Ctrl+Shift+X)。安裝後,開啟命令面板(Cmd+Shift+P / Ctrl+Shift+P),輸入 “Claude Code”,選擇 在新分頁中開啟。
JetBrains IDE
支援 IntelliJ IDEA、PyCharm、WebStorm 等,具有互動式差異檢視和選擇上下文共享。
從 JetBrains Marketplace 安裝 Claude Code 外掛 ,然後重新啟動 IDE。
驗證安裝
claude --version
# 正常輸出版本號即表示安裝成功更新與解除安裝
# 原生安裝自動更新,其他方式手動更新:
brew upgrade claude-code # Homebrew
winget upgrade Anthropic.ClaudeCode # WinGet
# 解除安裝
brew uninstall claude-code # Homebrew下一步
- 配置模型供應商 — 使用 OfoxAI 作為 API 提供商
- CCometixLine 狀態列 — 即時顯示 Git 狀態、模型、上下文用量
- 配置 Skills — 擴展 Claude Code 能力