- tags:: AI Coding 应用
- source:: anthropics/claude-code: Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.
Claude Code 是一个闭源的 CLI 工具(提供了良好的 TUI 功能),基于 TypeScript 和 wasm 实现。
功能
- 支持 MCP 工具集成
- 支持代码阅读及代码编辑
安装配置
npm install -g @anthropic-ai/claude-code安装完后,启动一次 claude 然后编辑 home 目录下的 .claude.json 添加一行以下内容:
"hasCompletedOnboarding": true,
在 ~/.claude/settings.json 中设置 api url 及 api key 和模型名称,例如
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "你的apikey",
"ANTHROPIC_BASE_URL": "https://open.bigmodel.cn/api/anthropic",
"API_TIMEOUT_MS": "3000000",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "glm-4.5-air",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "glm-4.6",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "glm-4.6"
}
}