🚀🚀🚀 Claude Code: 4种方法1分钟快速上手使用

官网github.com/anthropics/...

核心定位:Claude Code 是一款具备代理特性的编码工具,旨在通过智能化辅助提升开发者工作效率。

环境适配:支持多场景集成,可在终端、IDE 及 GitHub 平台(通过 @claude 标签触发)运行。

核心能力

  • 具备代码库深度理解能力,能精准把握项目结构与逻辑;

  • 支持自然语言指令交互,降低操作门槛;

  • 可自动化执行常规开发任务,减少重复劳动;

  • 能解析复杂代码逻辑,辅助开发者快速理解代码;

  • 可处理 git 工作流等版本控制相关操作,覆盖开发全流程。

价值体现:为开发全流程提供智能化支持,助力开发者提升编码效率与质量。


1. 问问

1.点击 戳👉官网 注册一个你自己的账号

2.添加token

1.1 安装 Node.js

bash 复制代码
#  确保 Node.js 版本 ≥ 18.0

# Ubuntu / Debian 用户
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo bash -
sudo apt-get install -y nodejs

node --version

# macOS 用户
sudo xcode-select --install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install node
node --version

1.2 安装 claude-code

bash 复制代码
npm install -g @anthropic-ai/claude-code
claude --version

1.3 设置token和地址

bash 复制代码
cd your-project-folder
export ANTHROPIC_AUTH_TOKEN=sk-...
export ANTHROPIC_BASE_URL=https://code.wenwen-ai.com
claude

1.4 配置环境变量(推荐)

bash 复制代码
echo -e '\nexport ANTHROPIC_AUTH_TOKEN=sk-...' >> ~/.bash_profile
echo -e '\nexport ANTHROPIC_BASE_URL=https://code.wenwen-ai.com' >> ~/.bash_profile

echo -e '\nexport ANTHROPIC_AUTH_TOKEN=sk-...' >> ~/.bashrc
echo -e '\nexport ANTHROPIC_BASE_URL=https://code.wenwen-ai.com' >> ~/.bashrc

echo -e '\nexport ANTHROPIC_AUTH_TOKEN=sk-...' >> ~/.zshrc
echo -e '\nexport ANTHROPIC_BASE_URL=https://code.wenwen-ai.com' >> ~/.zshrc

2. kimi-k2

1.点击 戳👉官网 注册一个你自己的账号

2.添加token

2.1 安装 Node.js

bash 复制代码
#  确保 Node.js 版本 ≥ 18.0

# Ubuntu / Debian 用户
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo bash -
sudo apt-get install -y nodejs

node --version

# macOS 用户
sudo xcode-select --install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install node
node --version

2.2 安装 claude-code

bash 复制代码
npm install -g @anthropic-ai/claude-code
claude --version

2.3 设置token和地址

bash 复制代码
cd your-project-folder
export ANTHROPIC_AUTH_TOKEN=sk-...
export ANTHROPIC_BASE_URL=https://api.moonshot.cn/anthropic/

claude

2.4 配置环境变量(推荐)

bash 复制代码
echo -e '\nexport ANTHROPIC_AUTH_TOKEN=sk-...' >> ~/.bash_profile
echo -e '\nexport ANTHROPIC_BASE_URL=https://api.moonshot.cn/anthropic/' >> ~/.bash_profile

echo -e '\nexport ANTHROPIC_AUTH_TOKEN=sk-...' >> ~/.bashrc
echo -e '\nexport ANTHROPIC_BASE_URL=https://api.moonshot.cn/anthropic/' >> ~/.bashrc

echo -e '\nexport ANTHROPIC_AUTH_TOKEN=sk-...' >> ~/.zshrc
echo -e '\nexport ANTHROPIC_BASE_URL=https://api.moonshot.cn/anthropic/' >> ~/.zshrc

3. 阿里云百炼

1.点击 戳👉官网 注册一个你自己的账号

2.添加token

3.1 安装 Node.js

bash 复制代码
#  确保 Node.js 版本 ≥ 18.0

# Ubuntu / Debian 用户
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo bash -
sudo apt-get install -y nodejs

node --version

# macOS 用户
sudo xcode-select --install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install node
node --version

3.2 安装 claude-code

bash 复制代码
npm install -g @anthropic-ai/claude-code
claude --version

3.3 设置token和地址

bash 复制代码
cd your-project-folder
export ANTHROPIC_AUTH_TOKEN=sk-...
export ANTHROPIC_BASE_URL=https://dashscope.aliyuncs.com/api/v2/apps/claude-code-proxy


claude

3.4 配置环境变量(推荐)

bash 复制代码
echo -e '\nexport ANTHROPIC_AUTH_TOKEN=sk-...' >> ~/.bash_profile
echo -e '\nexport ANTHROPIC_BASE_URL=https://dashscope.aliyuncs.com/api/v2/apps/claude-code-proxy' >> ~/.bash_profile

echo -e '\nexport ANTHROPIC_AUTH_TOKEN=sk-...' >> ~/.bashrc
echo -e '\nexport ANTHROPIC_BASE_URL=https://dashscope.aliyuncs.com/api/v2/apps/claude-code-proxy' >> ~/.bashrc

echo -e '\nexport ANTHROPIC_AUTH_TOKEN=sk-...' >> ~/.zshrc
echo -e '\nexport ANTHROPIC_BASE_URL=https://dashscope.aliyuncs.com/api/v2/apps/claude-code-proxy' >> ~/.zshrc

4. 智谱

1.点击 戳👉官网 注册一个你自己的账号

2.添加token

4.1 安装 Node.js

bash 复制代码
#  确保 Node.js 版本 ≥ 18.0

# Ubuntu / Debian 用户
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo bash -
sudo apt-get install -y nodejs

node --version

# macOS 用户
sudo xcode-select --install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install node
node --version

4.2 安装 claude-code

bash 复制代码
npm install -g @anthropic-ai/claude-code
claude --version

4.3 设置token和地址

bash 复制代码
cd your-project-folder
export ANTHROPIC_AUTH_TOKEN=sk-...
export ANTHROPIC_BASE_URL=https://open.bigmodel.cn/api/anthropic


claude

4.4 配置环境变量(推荐)

bash 复制代码
echo -e '\nexport ANTHROPIC_AUTH_TOKEN=sk-...' >> ~/.bash_profile
echo -e '\nexport ANTHROPIC_BASE_URL=https://open.bigmodel.cn/api/anthropic' >> ~/.bash_profile

echo -e '\nexport ANTHROPIC_AUTH_TOKEN=sk-...' >> ~/.bashrc
echo -e '\nexport ANTHROPIC_BASE_URL=https://open.bigmodel.cn/api/anthropic' >> ~/.bashrc

echo -e '\nexport ANTHROPIC_AUTH_TOKEN=sk-...' >> ~/.zshrc
echo -e '\nexport ANTHROPIC_BASE_URL=https://open.bigmodel.cn/api/anthropic' >> ~/.zshrc

初始化设置

运行后按照提示完成以下步骤:

选择你喜欢的主题 + Enter

确认安全须知 + Enter

使用默认 Terminal 配置 + Enter

信任工作目录 + Enter

🎉 现在就可以在终端里和你的 AI 编程搭档一起写代码了!

相关推荐
CoderJia程序员甲19 小时前
GitHub 热榜项目 - 日榜(2025-09-26)
ai·开源·github·ai编程·github热榜
哪吒编程20 小时前
重磅更新!Claude Sonnet 4.5发布,编程最强模型
ai编程·claude
飞哥数智坊21 小时前
Claude 4.5 升级解析:很强,但请别跳过“Imagine”
人工智能·ai编程·claude
用户4099322502121 天前
银行转账不白扣钱、电商下单不超卖,PostgreSQL事务的诀窍是啥?
后端·ai编程·trae
码农飞哥1 天前
AI编程开发系统001-基于SpringBoot+Vue的旅游民宿租赁系统
vue.js·spring boot·毕业设计·ai编程·计算机源码
Testopia1 天前
AI与敏捷开发管理系列3:敏捷方法在AI项目中的应用案例
人工智能·ai编程·敏捷流程·#人工智能学习
wifi歪f1 天前
🎨 探究Function Calling 和 MCP 的奥秘
前端·ai编程·mcp
飞哥数智坊1 天前
GLM-4.6 + Cursor 实战首秀:国产大模型高效优化现有模块
ai编程·cursor·chatglm (智谱)
CoderJia程序员甲2 天前
GitHub 热榜项目 - 日榜(2025-10-01)
ai·开源·github·ai编程·github热榜
zzywxc7872 天前
AI行业应用:金融、医疗、教育、制造业的落地实践与技术创新
人工智能·机器学习·金融·自动化·prompt·ai编程·xcode