Skip to content

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.

Notifications You must be signed in to change notification settings

huan11/claude-code

 
 

Repository files navigation

准备工作

  1. 安装 Vscode 和插件 Dev Containers
  2. 安装 Docker Desktop

给 Claude Code 配置你需要的 LLM

配置主要分为 3 步

  1. 指定你要的 Claude Code 版本
  2. 配置你要使用 大模型供应商
  3. 配置 API key

Step1 指定你要的Claude Code 版本

找到 .devcontainer 目录下面的Dockerfile 文件

搜索 ARG CLAUDE_CODE_VERSION

根据需要修改成你需要的版本:

latest

ARG CLAUDE_CODE_VERSION=latest

指定版本号

ARG CLAUDE_CODE_VERSION=2.0.11

Step2 配置你要使用 大模型供应商

新建一个文件 settings.json ,

根据你要选择的供应商,将 settings_XXX.json 里面的内容复制到 settings.json 里面

Step3 配置 API key

定位到 .claude 目录,找到 anthropic_key-template.sh 文件

  1. 把 anthropic_key-template.sh 复制成 anthropic_key.sh
  2. 替换成你的 API-Key

附录:文档

GLM

https://docs.bigmodel.cn/cn/coding-plan/tool/claude#claude-code

Kimi

https://platform.moonshot.cn/docs/guide/agent-support#%E5%9C%A8-claude-code-%E4%B8%AD%E4%BD%BF%E7%94%A8-kimi-k2-%E6%A8%A1%E5%9E%8B

Qwen

https://help.aliyun.com/zh/model-studio/claude-code

DeepSeek

https://api-docs.deepseek.com/zh-cn/guides/anthropic_api

附录:配置总表

大脑(大模型) BASE_URL API Key
Kimi K2 https://api.moonshot.cn/anthropic https://platform.moonshot.cn/console/api-keys
DeepSeek 3.1 https://api.deepseek.com/anthropic https://platform.deepseek.com/api_keys
GLM 4.5 https://open.bigmodel.cn/api/anthropic https://www.bigmodel.cn/usercenter/proj-mgmt/apikeys
Qwen https://dashscope-intl.aliyuncs.com/api/v2/apps/claude-code-proxy https://bailian.console.aliyun.com/?tab=model#/api-key

About

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.

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 38.4%
  • Python 28.3%
  • PowerShell 14.0%
  • Shell 12.1%
  • Dockerfile 7.2%