Skip to content

Commit f0fbe1a

Browse files
committed
chore(ci): blog sync
1 parent 8be82eb commit f0fbe1a

File tree

1 file changed

+75
-0
lines changed

1 file changed

+75
-0
lines changed

data/blog/post-79.mdx

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
---
2+
title: 一分钟带你将 DeepSeek-V3.1-Terminus 接入Claude Code 和 Codex
3+
date: 2025-09-24T07:10:54Z
4+
slug: post-79
5+
author: coderPerseus:https://github.com/coderPerseus
6+
tags: ["AI"]
7+
---
8+
9+
10+
就在最近, DeepSeek 发布了 V3 版本的终极版,刚好最近使用 Claude Code 和 Codex 总是被限速,下面跟着我快速将最新的 DeepSeek 接入 cc 和 Codex 吧!
11+
## 接入 Claude Code
12+
13+
1️⃣ 全局安装
14+
15+
```bash
16+
npm install -g @anthropic-ai/claude-code
17+
```
18+
19+
2️⃣ 配置环境变量
20+
先去 DeepSeek 官方 API 后台生成一个 API key
21+
![image.png](https://blog-1304565468.cos.ap-shanghai.myqcloud.com/typora/20250923235052.png)
22+
然后在控制台配置
23+
```bash
24+
export ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic   
25+
export ANTHROPIC_AUTH_TOKEN=你的DEEPSEEK_API_KEY   
26+
export ANTHROPIC_MODEL=deepseek-chat
27+
export ANTHROPIC_SMALL_FAST_MODEL=deepseek-chat
28+
```
29+
3️⃣ 测试使用
30+
运行 `claude` 启动,然后我们可以看到如下:
31+
![image.png](https://blog-1304565468.cos.ap-shanghai.myqcloud.com/typora/20250923235905.png)
32+
这就代表成功啦!🎉
33+
34+
## Codex
35+
36+
> Codex 是 OpenAI 家的终端 Coding Agent Cli ,和 Claude Code 差不多
37+
38+
1️⃣ 安装
39+
40+
```bash
41+
npm install -g @openai/codex
42+
```
43+
44+
2️⃣ 配置
45+
46+
```toml
47+
# 定义一个 DeepSeek 提供方(OpenAI 兼容)
48+
[model_providers.deepseek]
49+
name = "DeepSeek"
50+
base_url = "https://api.deepseek.com/v1"
51+
wire_api = "chat"
52+
env_key = "DEEPSEEK_API_KEY"
53+
54+
[profiles.deepseek-chat]
55+
model_provider = "deepseek"
56+
model = "deepseek-chat"
57+
```
58+
59+
3️⃣ 测试使用
60+
61+
```bash
62+
export DEEPSEEK_API_KEY="sk-xxx"
63+
codex --profile deepseek-chat
64+
```
65+
看到下面就代表成功啦!
66+
![image.png](https://blog-1304565468.cos.ap-shanghai.myqcloud.com/typora/20250924004121.png)
67+
68+
69+
## 参考
70+
71+
1. claude code 官方文档: https://claude.com/product/claude-code
72+
2. codex 官方文档: https://developers.openai.com/codex/cli/
73+
74+
---
75+
此文自动发布于:<a href="https://github.com/coderPerseus/blog/issues/79" target="_blank">github issues</a>

0 commit comments

Comments
 (0)