尧图建网站 尧图建网站 YAOTU WEB BUILD 免费咨询
ARTICLE DETAIL

资讯详情

深耕网站建设与建站编程的一线实战洞察。

DeepSeek Engineer 教程:10 分钟把终端变成 AI 代码助手

DeepSeek Engineer 教程:10 分钟把终端变成 AI 代码助手 DeepSeek Engineer 教程10 分钟把终端变成 AI 代码助手【免费下载链接】deepseek-engineerA powerful coding assistant application that integrates with the DeepSeek API to process user conversations and generate structured JSON responses. Through an intuitive command-line interface, it can read local file contents, create new files, and apply diff edits to existing files in real time.项目地址: https://gitcode.com/gh_mirrors/dee/deepseek-engineer改老代码时最耗时间的往往是先自己把文件读一遍、再复制上下文、最后让 AI 动手。DeepSeek Engineer 是一个终端里的 AI 代码助手接入 DeepSeek API你在命令行里用自然语言对话它就能自动读取本地文件、创建新文件、对现有代码做精确编辑推理过程实时可见。️ 先看它怎么干活装好后才知道怎么提需求它内置了 5 个文件工具由 AI 按需自动调用不用你手动操作read_file/read_multiple_files读一个或多个文件create_file/create_multiple_files新建文件自动建目录edit_file按代码片段替换只改指定位置底层是 DeepSeek-Reasoner 模型思维链可见AI 会先说我打算怎么做再执行。终端里绿色是成功、红色是错误、黄色是警告改动以表格形式预览全程看得见。三步拿到代码并配好密钥第一步准备环境和密钥Python 3.11 或更高版本一个 DeepSeek API Key第二步克隆仓库把密钥写入 .envgit clone https://gitcode.com/gh_mirrors/dee/deepseek-engineer cd deepseek-engineer echo DEEPSEEK_API_KEYyour_api_key_here .env密钥从工作目录的.env读取。容易踩的坑是漏掉这一步启动后报找不到 API 密钥。第三步装依赖并启动推荐 uv更快uv venv uv run deepseek-eng.py习惯 pip 的话两条命令也行pip install -r requirements.txt python3 deepseek-eng.py第一次使用让它读文件并补测试在终端输入帮我看看 main.py给它生成一个测试文件。AI 会先输出几句推理然后自动调用read_file把 main.py 读进来再调用create_file写出 test_main.py每一步在终端都有单行反馈成功显示绿色。我建议从这类小任务开始先养成节奏你只负责提文件路径读取和写文件都由它完成不必手动粘贴代码内容。/add 与批量创建两个进阶用法想提前给 AI 塞上下文用/add命令/add src/可把整个目录带智能过滤加入对话也可指定单个文件。多数场景用不上它——直接提到文件路径AI 会自己去读/add更适合先通读整个目录再开口的评审场景。想一次性搭项目骨架直接说建一个带模型、路由和测试的 Flask API它会调用create_multiple_files一次创建多个文件。⚠️ 常见坑位及绕过方法密钥未找到确认.env中已写入DEEPSEEK_API_KEY导入报错依赖没装全补跑uv sync或pip install -r requirements.txt写入失败当前目录需有写权限路径需真实存在另有内置保护值得知道单文件读取限制 5MB、自动跳过二进制文件、路径规范化与目录遍历防护。它目前仍是实验性项目适合想在终端做轻量结对编程、或想验证 DeepSeek-Reasoner 函数调用能力的开发者上手。我的建议是每次让它改完文件后亲自过一遍结果——它是直接写盘不是只给建议。【免费下载链接】deepseek-engineerA powerful coding assistant application that integrates with the DeepSeek API to process user conversations and generate structured JSON responses. Through an intuitive command-line interface, it can read local file contents, create new files, and apply diff edits to existing files in real time.项目地址: https://gitcode.com/gh_mirrors/dee/deepseek-engineer创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考
返回列表