如何在Mac上安装Claude Code与配置Kimi Code 2.6

b站视频:https://www.bilibili.com/video/BV1zsoYBeEzQ/

kimi的官方文档:
https://www.kimi.com/code/docs/third-party-tools/other-coding-agents.html

1 安装Claude Code

https://www.kimi.com/code/docs/third-party-tools/other-coding-agents.html

这个官方的安装连接:https://docs.anthropic.com/en/docs/claude-code/getting-started

但是我应为网络问题无法安装

bash 复制代码
curl -fsSL https://claude.ai/install.sh | bash

于是我换了个国内镜像安装的网站:
https://claude-zh.cn/guide/getting-started

bash 复制代码
source <(curl -fsSL https://claude-zh.cn/scripts/install.sh)

执行结果如下:

2 Claude Code 配置 Kimi Code 模型

https://www.kimi.com/code/docs/third-party-tools/other-coding-agents.html

bash 复制代码
node --eval "
    const homeDir = os.homedir();
    const filePath = path.join(homeDir, '.claude.json');
    if (fs.existsSync(filePath)) {
        const content = JSON.parse(fs.readFileSync(filePath, 'utf-8'));
        fs.writeFileSync(filePath, JSON.stringify({ ...content, hasCompletedOnboarding: true }, null, 2), 'utf-8');
    } else {
        fs.writeFileSync(filePath, JSON.stringify({ hasCompletedOnboarding: true }), 'utf-8');
    }"

然后

bash 复制代码
$env:ENABLE_TOOL_SEARCH="false"
$env:ANTHROPIC_BASE_URL="https://api.kimi.com/coding/"
$env:ANTHROPIC_API_KEY="你的API Key"

claude

3 启动Claude Code的Kimi版

看看最后效果:

4 卸载

https://claude-zh.cn/guide/getting-started

bash 复制代码
# 卸载
npm uninstall -g @anthropic-ai/claude-code

但是单单用这个卸载不干净(https://gemini.google.com/share/e297f1877df6),还要这样:

bash 复制代码
rm -rf ~/.claude.json
rm -rf ~/.claude


相关推荐
武子康6 小时前
调查研究-200 llama.cpp b9754:一次很小但很关键的 Agent 工具调用修复
人工智能·agent·llama
Ralph_Salar7 小时前
从0到1搭建AI智能支付风控助手Stage1-RAG知识库升级 — 元数据让检索更精准
人工智能
武子康7 小时前
调查研究-199 MCP Zero-Touch OAuth:为什么它是 MCP 进入企业生产的关键门槛?
人工智能·agent·mcp
冬奇Lab7 小时前
每日一个开源项目(第144篇):ai-website-cloner-template - 一条命令、多 Agent 并行,把任意网站逆向成 Next.js 代码
前端·人工智能·开源
冬奇Lab7 小时前
AI 原生组织不是买工具,而是让等待消失
人工智能·工作流引擎
半个落月7 小时前
从数据集划分理解大模型的数据工程
人工智能
用户8299792943937 小时前
一文带你彻底搞懂claude code中的上下文压缩
人工智能
IT_陈寒8 小时前
Vue的这个响应式陷阱让我熬到凌晨三点
前端·人工智能·后端
冬奇Lab17 小时前
Workflow 系列(01):基础理论——三种执行模型与 Anthropic 5 种模式
人工智能·agent·工作流引擎