deepcode-cli
Deep Code 是专为 deepseek-v4 模型优化的终端 AI 编码助手,支持深度思考、推理强度控制以及 Agent Skills。
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Check it deeper on your machine
It has changed since its scan on 11 Nov 2026.
As a Claude Code plugin, install it and then ask Claude Code:
/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/lessweb/deepcode-cli with scanskillsafety
Or from a terminal, clone it and run it:
git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/lessweb/deepcode-cli'
It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.
Badge for your README
Markdown
[](/listings/lessweb--deepcode-cli)HTML
<a href="/listings/lessweb--deepcode-cli"><img src="/api/listings/lessweb--deepcode-cli/badge.svg" alt="findsafeskills safety rating" /></a>Install
Install instructions from the README
As written by the repo's author. findsafeskills has not verified these steps.
npm install -g @vegamo/deepcode-cli
在任意项目目录下运行 `deepcode` 即可启动。
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
README.md · README · 231 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.
- <div align="center">
- <br/>
- <br/>
- <p align="center">
- <a href='https://deepcode.vegamo.cn/'>
- <img src='https://avatars.githubusercontent.com/u/118287711?s=200&v=4' width='100' alt="deepcode-cli"/>
- </a>
- </p>
- <h1>Deep Code CLI</h1>
- [![][npm-release-shield]][npm-release-link] [![][npm-downloads-shield]][npm-downloads-link] [![][github-contributors-shield]][github-contributors-link] [![][github-forks-shield]][github-forks-link] [![][github-stars-shield]][github-stars-link]
- [![][github-issues-shield]][github-issues-link] [![][github-issues-pr-shield]][github-issues-pr-link] [![][github-license-shield]][github-license-link]
- [English](README-en.md) · 中文
- <br/>
- </div>
- [Deep Code](https://github.com/lessweb/deepcode-cli) 是专为 `deepseek-v4` 模型优化的终端 AI 编码助手,支持深度思考、推理强度控制、Agent Skills 以及 MCP 集成。
- ## 安装
- ```bash
- npm install -g @vegamo/deepcode-cli
- ```
- 在任意项目目录下运行 `deepcode` 即可启动。
- 
- ## 配置
- 创建 `~/.deepcode/settings.json` 文件,内容如下:
- ```json
- {
- "env": {
- "MODEL": "deepseek-flash",
- "BASE_URL": "https://api.deepseek.com",
- "API_KEY": "sk-..."
- },
- "thinkingEnabled": true,
- "reasoningEffort": "max"
- }
- ```
- 配置文件与 [Deep Code VSCode 插件](https://github.com/lessweb/deepcode-cli) 共享,无需重复配置。
- 完整配置说明(多层级优先级、环境变量等)请参阅 [docs/configuration.md](docs/configuration.md)。
- ## 主要功能
- ### **Skills**
- Deep Code CLI 支持 agent skills,允许您扩展助手的能力:
- Skills 会按以下优先级扫描:
- | Scope | Path | Purpose |
- | :------ | :-------------------- | :---------------------------- |
- | Project | `./.deepcode/skills/` | Deep Code 原生位置 |
- | Project | `./.agents/skills/` | 跨客户端互操作 |
- | User | `~/.deepcode/skills/` | Deep Code 原生位置 |
- | User | `~/.agents/skills/` | 跨客户端互操作 |
- ### **为 DeepSeek 优化**
- - 专门为 DeepSeek 模型性能调优。
- - 通过使用[上下文缓存](https://api-docs.deepseek.com/guides/kv_cache)来降低成本。
- - 原生支持[思考模式](https://api-docs.deepseek.com/guides/thinking_mode)和思考强度控制。
- ## 斜杠命令与按键功能
- | 斜杠命令 | 操作 |
- |-------------|----------------------------------|
- | `/` | 打开 skills / 命令菜单 |
- | `/new` | 开始新对话 |
- | `/resume` | 选择历史对话继续 |
- | `/fork` | 从当前对话创建独立的新会话 |
- | `/continue` | 继续当前对话,或选择历史对话恢复 |
- | `/compact` | 手动压缩当前对话上下文 |
- | `/copy` | 将最近一条助手回复的文本复制到剪贴板 |
- | `/model` | 切换模型、思考模式和推理强度 |
- | `/experimental` | 配置实验功能,如思维链摘要 |
- | `/permissions` | 配置工具权限 |
- | `/raw` | 切换显示模式(Normal / Lite / Raw 滚动回溯) |
- | `/init` | 初始化 AGENTS.md 文件 |
- | `/skills` | 列出可用 skills |
- | `/mcp` | 查看 MCP 服务器状态和可用工具 |
- | `/undo` | 将代码和/或对话恢复到之前的状态 |
- | `/exit` | 退出(也可用连续 `Ctrl+D`) |
- | 按键 | 操作 |
- |---------------|--------------------|
- | `Enter` | 发送消息 |
- | `Shift+Enter` | 插入换行(也可用 `Ctrl+J`) |
- | `Ctrl+V` | 从剪贴板粘贴图片(Windows系统是`Alt+V`) |
- | `Ctrl+Y` | 将输入框中的文本复制到剪贴板 |
- | `Ctrl+R` | 搜索当前及历史会话中的用户输入 |
- | `Esc` | 中断当前模型回复 |
- | 连续 `Ctrl+D` | 退出 |
- ## 支持的模型
- - `deepseek-flash`(即 V4.1 Flash,推荐使用)
- - `deepseek-v4-pro`
- - `deepseek-v4-flash`
- - `deepseek-v4-flash-vision-exp`
- - 任何其他 OpenAI 兼容模型
- ## 架构和基准测试
- Armin Ronacher 在[《Better Models: Worse Tools》](https://lucumr.pocoo.org/2026/7/4/better-models-worse-tools/)中指出,工具 schema 不是「中立的」:模型(LLM)会继承训练和强化学习中形成的工具使用习惯,因此可能在某个主流 harness 中表现很好,却在另一套工具形态下变得不稳定。这正是 Deep Code 的架构出发点:只为 DeepSeek 量身调优,从而让 harness 本身持续贴合 DeepSeek 的行为特点。
- Deep Code 的收益来自于工具约束、上下文管理、Agent Skills 和权限策略等多项设计叠加后的结果。[deepcode-qrcode-benchmark](https://github.com/qorzj/deepcode-qrcode-benchmark) 项目展示了在一个真实且有难度的 Python 需求上,Deep Code + DeepSeek + `/plan` 模式相较 Claude Code + DeepSeek 的组合具有效果优势。
- > 详见:[Deep Code 架构](docs/architecture.md)
- ## 常见问题
- ### Deep Code 是否有 VSCode 插件?
- 有的。Deep Code 提供功能完整的 VSCode 插件,可在 [VSCode Marketplace](https://marketplace.visualstudio.com/items?itemName=vegamo.deepcode-vscode) 安装。插件与 CLI 共享 `~/.deepcode/settings.json` 配置文件,可以在终端和编辑器之间无缝切换。
- ### Deep Code 是否支持理解图片?
- 支持。`deepseek-flash` 模型支持直接读取本地图片或使用`ctrl+v`(Windows系统是`alt+v`)从剪贴板粘贴图片,让模型直接看到图片内容。
- `deepseek-v4-pro`、`deepseek-v4-flash` 等非多模态模型仍会使用 `UnderstandImage` 识图工具。Deep Code 会自动判断模型能力,也可通过 `multimodal` 配置项手动覆盖。
- 默认情况下,图片会以 base64 内联发送给模型。启用 `filesApiEnabled` 后,Deep Code 会使用 DeepSeek Files API 上传图片并在请求中复用 `file_id`。详见 [docs/configuration.md](docs/configuration.md#deepseek-files-api)。
- ### 怎样启用联网搜索功能?
- Deep Code 已支持 [DeepSeek 官方网页搜索](https://api-docs.deepseek.com/zh-cn/guides/search),在 `~/.deepcode/settings.json` 中将 `deepseekSearchApiEnabled` 设为 `true` 即可启用。如果你希望使用自定义脚本进行联网搜索,可以在 `~/.deepcode/settings.json` 中将 `webSearchTool` 设为脚本的完整路径即可。详细步骤可参考:https://github.com/qorzj/web_search_cli
- ### 如何配置 MCP?
- Deep Code 支持 MCP(Model Context Protocol),可以连接 GitHub、浏览器、数据库等外部服务。在 `settings.json` 中配置 `mcpServers` 字段即可启用,启动后使用 `/mcp` 命令查看已配置的 MCP 服务器状态和可用工具。
- 详细配置指南:[docs/mcp.md](docs/mcp.md)
- ### 如何配置 Deep Code 任务完成后发送通知?
- 在 `~/.deepcode/settings.json` 中,将 `notify` 字段设为可执行通知脚本的完整路径。AI 助手完成一轮任务后,Deep Code 会自动执行该脚本,向 Slack 等渠道发送消息或弹出系统通知。
- 详细配置指南:[docs/notify.md](docs/notify.md)
- ### Deep Code 只支持 YOLO 模式吗?
- 不是。Deep Code 内置了细粒度的权限控制机制,支持在 AI 助手执行 Shell 命令、读写文件、访问网络等操作前进行确认。你可以通过 `settings.json` 中的 `permissions` 字段按需配置每种权限范围的策略:始终允许、始终询问、或直接拒绝。详见 [docs/permission.md](docs/permission.md)。
- ### 是否支持 Coding Plan?
- 支持。只要把 `~/.deepcode/settings.json` 的 `env.BASE_URL` 配置为 OpenAI 兼容的接口地址就行。
- 如果使用 [DeepCode Plus 订阅套餐](https://deepcode.vegamo.cn/plus/plan),可直接运行`deepcode --plus`,在提示后粘贴你的 API Key 并回车,CLI 会自动写入配置,无需手动编辑文件:
- ```bash
- $ deepcode --plus
- DeepCode Plus API Key: sk-···(粘贴后回车)
- ```
- ## DeepCode Plus
- DeepCode Plus 旨在提供一站式的 AI 编程与创作体验。它提供 DeepSeek 模型订阅套餐,并支持图片理解、联网搜索、图片生成和视频生成等增强功能。它完全可选,使用 Deep Code 并不需要订阅 Plus。
- - 中文版: https://deepcode.vegamo.cn
- - 国际版: https://www.deepcodeplus.com
- ## 贡献
- 欢迎贡献代码!以下是参与方式:
- ```bash
- # 克隆仓库
- git clone https://github.com/lessweb/deepcode-cli.git
- cd deepcode-cli
- # 安装依赖
- npm install
- # 运行测试
- npm test
- # CLI本地开发(类型检查 + lint + 格式检查 + 构建)
- npm run build
- # CLI链接到全局(即本地全局安装)
- npm link
- # VSCode插件本地开发
- npm run build:vscode
- ```
- - 提交 PR 前请确保 `npm run check` 通过(类型检查 + lint + 格式检查)
- - 建议在执行构建前,先执行 `npm run format` 自动格式化代码,避免构建报错
- ## 获取帮助
- - 在 GitHub Issues 上报告错误或请求功能 (https://github.com/lessweb/deepcode-cli/issues)
- ## 协议
- - MIT
- ## 支持我们
- 如果你觉得这个工具对你有帮助,请考虑通过以下方式支持我们:
- - 在 GitHub 上给我们一个 Star (https://github.com/lessweb/deepcode-cli)
- - 向我们提交反馈和建议
- - 分享给你的朋友和同事
- <!-- LINK GROUP -->
- [npm-release-link]: https://www.npmjs.com/package/@vegamo/deepcode-cli
- [npm-release-shield]: https://img.shields.io/npm/v/@vegamo/deepcode-cli?color=4d6BFE&labelColor=black&logo=npm&logoColor=white&style=flat-square&cacheSeconds=1800
- [npm-downloads-link]: https://www.npmjs.com/package/@vegamo/deepcode-cli
- [npm-downloads-shield]: https://img.shields.io/npm/dt/@vegamo/deepcode-cli?labelColor=black&style=flat-square&color=4d6BFE&cacheSeconds=1800
- [github-contributors-link]: https://github.com/lessweb/deepcode-cli/graphs/contributors
- [github-contributors-shield]: https://img.shields.io/github/contributors/lessweb/deepcode-cli?color=4d6BFE&labelColor=black&style=flat-square&cacheSeconds=1800
- [github-forks-link]: https://github.com/lessweb/deepcode-cli/network/members
- [github-forks-shield]: https://img.shields.io/github/forks/lessweb/deepcode-cli?color=4d6BFE&labelColor=black&style=flat-square&cacheSeconds=1800
- [github-stars-link]: https://github.com/lessweb/deepcode-cli/network/stargazers
- [github-stars-shield]: https://img.shields.io/github/stars/lessweb/deepcode-cli?color=4d6BFE&labelColor=black&style=flat-square&cacheSeconds=1800
- [github-issues-link]: https://github.com/lessweb/deepcode-cli/issues
- [github-issues-shield]: https://img.shields.io/github/issues/lessweb/deepcode-cli?color=4d6BFE&labelColor=black&style=flat-square&cacheSeconds=1800
- [github-issues-pr-link]: https://github.com/lessweb/deepcode-cli/pulls
- [github-issues-pr-shield]: https://img.shields.io/github/issues-pr/lessweb/deepcode-cli?color=4d6BFE&labelColor=black&style=flat-square&cacheSeconds=1800
- [github-license-link]: https://github.com/lessweb/deepcode-cli/blob/main/LICENSE
- [github-license-shield]: https://img.shields.io/github/license/lessweb/deepcode-cli?color=4d6BFE&labelColor=black&style=flat-square&cacheSeconds=1800
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.