Anthropic 的 AI 编程工具。在终端中编辑文件、运行命令、管理 Git。Anthropic agentic coding tool. Edit files, run commands, manage git from your terminal.
# Homebrew (推荐recommended)
brew install --cask claude-code
# 或使用脚本Or shell script
curl -fsSL https://claude.ai/install.sh | bash# 脚本安装Shell script
curl -fsSL https://claude.ai/install.sh | bash
# 或使用 npmOr npm
npm install -g @anthropic-ai/claude-code# PowerShell
irm https://claude.ai/install.ps1 | iex
# 或使用 wingetOr winget
winget install Anthropic.ClaudeCode{
"env": {
"ANTHROPIC_BASE_URL": "https://api.orcai.cc",
"ANTHROPIC_AUTH_TOKEN": "sk-your-key"
}
}
export ANTHROPIC_BASE_URL="https://api.orcai.cc"
export ANTHROPIC_AUTH_TOKEN="sk-your-key"
source ~/.zshrc[Environment]::SetEnvironmentVariable("ANTHROPIC_BASE_URL", "https://api.orcai.cc", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_AUTH_TOKEN", "sk-your-key", "User")| 系统OS | 路径Path |
|---|---|
| macOS / Linux | ~/.claude/settings.json |
| Windows | %USERPROFILE%\.claude\settings.json |
| 项目级Per-project | .claude/settings.json |
| 模型Model | ID | 适用Best For |
|---|---|---|
| Claude Opus 4.7 | claude-opus-4-7 | 复杂推理Complex reasoning |
| Claude Sonnet 4.6 | claude-sonnet-4-6 | 均衡 (默认)Balanced (default) |
| Claude Haiku 4.5 | claude-haiku-4-5 | 快速、低成本Fast, cheap |