如何在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


相关推荐
吴佳浩13 分钟前
Memory Provider 实战:Hermes、Mem0、Honcho、Hindsight 为什么都这样设计?
人工智能·agent·ai编程
吴佳浩21 分钟前
企业级 Agent Memory 选型指南:如何构建可扩展的 Memory Service?
人工智能·agent·ai编程
北方的银狐-Zero1 小时前
ERP 管执行,数据管标准,OntoL本体 管思考:企业智能化升级的规划图
大数据·人工智能·本体论
浅安的邂逅2 小时前
260918-白帽把 OpenAI 论坛“打穿“了:攻防赛漏洞、账户被 Claude 入侵、模型偷偷掩盖不当行为
人工智能·大模型·ai编程·ai模型·行业动态
jinyishu_2 小时前
认识 AI Agent:概念、架构、设计模式与主流框架
人工智能
Hrain-AI2 小时前
AI 爬虫三档授权工程落地:搜索放行、训练拦截、Agent 分层(附脚本)
人工智能·elasticsearch·milvus
sunhy_csdn2 小时前
“词码”作为 Token 候选译名
人工智能
Hrain-AI2 小时前
多 Agent 并行不打架:worktree 隔离与反馈回流落地(附脚本)
网络·数据库·人工智能·架构
Koi慢热3 小时前
DayDayMap学术社区体验:卫星网络测绘专题用下来怎么样
网络·人工智能·windows·web安全·网络安全