开源项目 GitHub Topic ai-agent 2026-07-06T12:02 正文 ok 723 words

esengine/DeepSeek-Reasonix:终端里的 DeepSeek 原生 AI 编程代理

英文标题:📦 esengine/DeepSeek-Reasonix

Reasonix 1.0 使用 Go 从零重写,是专为 DeepSeek 前缀缓存调优的终端 AI 编码代理。它通过配置文件驱动、插件化架构,支持多模型组合运行,目标是在长会话中大幅降低 token 成本。开发者可通过 npm 或 Homebrew 直接获得静态编译的单二进制文件,并可快速集成 MCP 兼容插件。该项目为需要稳定、低成本命令行编码辅助的开发者提供了一种开箱即用的轻量方案。
打开原文相关 5.6 · 机会 4
media3.8 KB media1.0 KB media2.9 KB media556 B media582 B media1.9 KB media8.7 KB media1.7 KB media1.7 KB media2.4 KB media63.0 KB media62.9 KB media138.5 KB media330.9 KB media429.9 KB

中文

Reasonix

English · 简体中文 · Guide · Spec · Website · Discord

Important

Reasonix 1.0 是使用 Go 进行的彻底重写 — 这个分支(main-v2)现在是新的默认分支,也是当前开发的主线。早期的 0.x TypeScript 版本已成为旧版,保留在 v1 分支(仅作维护)。请查阅 迁移指南。npm i -g reasonix 仍然是安装命令 — 1.0.0 以上会交付 Go 二进制,0.x 则是旧的 TS 构建。

npm version CI license downloads GitHub stars AtomGit stars contributors Discussions Discord

一个为终端打造的 DeepSeek 原生 AI 编程代理。

一个由配置和插件驱动的运行框架 —— 单个静态 Go 二进制文件,围绕 DeepSeek 的前缀缓存进行调优,让长会话的 token 成本保持在低位。

Important

社区 · 加入社区 — 双语 Discord,提供设置帮助(#help / #求助)、工作流展示和功能想法。 → https://discord.gg/XF78rEME2D

  • 配置驱动。 提供商、代理、启用的工具和插件全在 reasonix.toml 里声明。不硬编码模型。

  • 多模型且可组合。 DeepSeek 作为预置项提供;任何兼容 OpenAI 的端点只需一个配置条目,无需新增代码。还可以让两个模型(executor + planner)在不同的、缓存稳定的会话中同时运行。

  • 插件驱动。 外部工具通过 stdio JSON-RPC(兼容 MCP)作为子进程运行。内置工具在编译时自注册。

  • 缓存感知的上下文维护。 启动时注入一个简短稳定的环境摘要,过期的工具输出在摘要压缩前被裁剪/修剪,内置工具的 schema 契约有文档记录,方便回归审查。

  • 零摩擦分发。 CGO_ENABLED=0 单一二进制;一条命令即可交叉编译到六个目标平台。唯一的依赖是一个 TOML 解析器。

    npm i -g reasonix # 任意操作系统;拉取预编译原生二进制 brew install esengine/reasonix/reasonix # macOS

预编译归档包(darwin|linux|windows × amd64|arm64)以及 SHA256SUMS 都在每个 GitHub 发布版 中提供。

Windows 构建使用由 SignPath 基金会 提供的免费证书进行代码签名,签名通过 SignPath.io 完成。

make build      # -> bin/reasonix(.exe)
make cross      # -> dist/ (darwin|linux|windows × amd64|arm64)

reasonix setup                      # 配置向导 → ./reasonix.toml
export DEEPSEEK_API_KEY=sk-...      # 或让安装向导将其保存到 Reasonix 主目录的 .env 文件
reasonix                            # 之后运行 /init 生成 AGENTS.md(项目记忆)
reasonix run "实现 main.go 中的待办项"
reasonix run --model deepseek-pro "为这个函数添加单元测试"
echo "解释这段代码" | reasonix run

一个极简的 reasonix.toml —— 一个提供商和一个默认模型 —— 就足以开始:

default_model = "deepseek-flash"

[[providers]]
name        = "deepseek-flash"
kind        = "openai"
base_url    = "https://api.deepseek.com"
model       = "deepseek-v4-flash"
api_key_env = "DEEPSEEK_API_KEY"

解析顺序为 命令行标志 > ./reasonix.toml > 用户配置文件 > 内置默认值;从 Reasonix v1.8.1 开始,用户配置文件位于 macOS/Linux 的 ~/.reasonix/config.toml,Windows 的 %AppData%\reasonix\config.toml。详见 配置路径 了解迁移细节以及完整的 config.toml / .env 结构。提供商条目通过 api_key_env 命名密钥;密钥值本身存放在 Reasonix 的全局 <Reasonix home>/.env 中,由 CLI 和桌面应用共享。项目 .env 文件不会作为提供商密钥的运行时后备,但仍可为工作区范围、非提供商的 ${VAR} 扩展提供 MCP/插件设置所需值,而不会导入 Reasonix 的控制变量。权限、沙箱、插件(MCP)、斜线命令、@ 引用以及双模型设置均在 指南 中。

  • 指南 — 配置、权限与沙箱、插件(MCP)、斜线命令、@ 引用、双模型协作。
  • 机器人指南 — 从桌面应用连接飞书、Lark 和微信机器人,然后通过即时通讯使用审批、YOLO 和命令。
  • 规范 — 工程契约:架构、注册表、数据类型和路线图。
  • 任务契约与暂停策略 — 用上下文、输出边界、约束以及何时询问来结构化复杂请求。
  • 工具契约 — 提供商可见的内置工具名称、只读标志与 schema 快照保护。
  • 从 0.x 迁移 — 从旧的 TypeScript 版本迁移到 1.0 Go 重写版。
  • 检查点与回滚 — 基于快照的编辑安全网(Esc-Esc / /rewind)。

Star 历史图表

如果 Reasonix 对你有帮助,你可以表示感谢。这只是杯咖啡,不是契约 —— 捐赠不会左右功能的优先级,也不会影响 Issue 的处理方式。

微信支付二维码

一小部分对 Reasonix 影响最大的贡献者 —— 按提交数量和代码量衡量。按字母顺序排列,不分先后。 完整的贡献者图谱请见 GitHub。

另外,特别感谢 Bernardxu123 设计了项目 logo,以及 AIGC Link 在小红书上推广本项目。

esengine/DeepSeek-Reasonix 贡献者


MIT — 详见 LICENSE
由社区在 esengine/DeepSeek-Reasonix 构建

English / 原文

Reasonix

English · 简体中文 · Guide · Spec · Website · Discord

Important

Reasonix 1.0 is a ground-up rewrite in Go — this branch (main-v2) is the new default and where development happens now. The earlier 0.x TypeScript releases are legacy , living on the v1 branch (maintenance only). See the migration guide. npm i -g reasonix stays the install command — 1.0.0+ delivers the Go binary, 0.x is the legacy TS build.

npm version CI license downloads GitHub stars AtomGit stars contributors Discussions Discord

A DeepSeek-native AI coding agent for your terminal.

A config- and plugin-driven harness — a single static Go binary, tuned around DeepSeek's prefix cache so token costs stay low across long sessions.

Important

Community · 加入社区 — bilingual Discord for setup help (#help / #求助), workflow showcases, and feature ideas. → https://discord.gg/XF78rEME2D

  • Config-driven. Providers, the agent, enabled tools, and plugins are all declared in reasonix.toml. No hardcoded models.

  • Multi-model & composable. DeepSeek ships as a preset; any OpenAI-compatible endpoint is a config entry, not new code. Optionally run two models together (executor + planner) in separate, cache-stable sessions.

  • Plugin-driven. External tools run as subprocesses over stdio JSON-RPC (MCP-compatible). Built-in tools self-register at compile time.

  • Cache-aware context maintenance. Startup injects a small stable environment summary, stale tool output is snipped/pruned before summary compaction, and the built-in tool schema contract is documented for regression review.

  • Zero-friction distribution. CGO_ENABLED=0 single binary; cross-compile to six targets with one command. The only dependency is a TOML parser.

    npm i -g reasonix # any OS; pulls the prebuilt native binary brew install esengine/reasonix/reasonix # macOS

Prebuilt archives (darwin|linux|windows × amd64|arm64) and SHA256SUMS are on every GitHub release.

Windows builds are code-signed with a free certificate provided by the SignPath Foundation, with signing through SignPath.io.

make build      # -> bin/reasonix(.exe)
make cross      # -> dist/ (darwin|linux|windows × amd64|arm64)


reasonix setup                      # config wizard → ./reasonix.toml
export DEEPSEEK_API_KEY=sk-...      # or let setup save it to Reasonix home .env
reasonix                            # then run /init to generate AGENTS.md (project memory)
reasonix run "implement the TODOs in main.go"
reasonix run --model deepseek-pro "add unit tests for this function"
echo "explain this code" | reasonix run

A minimal reasonix.toml — one provider and a default model — is enough to start:

default_model = "deepseek-flash"

[[providers]]
name        = "deepseek-flash"
kind        = "openai"
base_url    = "https://api.deepseek.com"
model       = "deepseek-v4-flash"
api_key_env = "DEEPSEEK_API_KEY"

Resolution order is flag > ./reasonix.toml > the user config file > built-in defaults; starting with Reasonix v1.8.1 , the user file lives at ~/.reasonix/config.toml on macOS/Linux and %AppData%\reasonix\config.toml on Windows. See Configuration paths for migration details and the full config.toml / .env structure. Provider entries name secrets with api_key_env; the secret values themselves live in Reasonix's global <Reasonix home>/.env, shared by CLI and desktop. Project .env files are not provider-key runtime fallbacks, but still feed workspace-scoped, non-provider ${VAR} expansion for MCP/plugin settings without importing Reasonix control variables. Permissions, the sandbox, plugins (MCP), slash commands, @ references, and two-model setup are all in the Guide.

  • Guide — configuration, permissions & sandbox, plugins (MCP), slash commands, @ references, two-model collaboration.
  • Bot guide — connect Feishu, Lark, and WeChat bots from the desktop app, then use approvals, YOLO, and commands from IM.
  • Spec — engineering contract: architecture, registries, data types, and roadmap.
  • Task contracts& pause policy — structure complex requests with context, output boundaries, constraints, and when to ask.
  • Tool contract — provider-visible built-in tool names, read-only flags, and schema snapshot guard.
  • Migrating from 0.x — moving from the legacy TypeScript releases to the 1.0 Go rewrite.
  • Checkpoints& rewind — the snapshot-based edit safety net (Esc-Esc / /rewind).

Star History Chart

If Reasonix has been useful and you'd like to say thanks, you can. It stays a coffee, not a contract — donations don't buy feature priority or change how issues get triaged.

WeChat Pay QR code

A small list of folks whose work has shaped Reasonix the most — measured by both commit count and code volume. Listed alphabetically, no ordering of importance. The full contributor graph is on GitHub.

Also a separate thank-you to Bernardxu123 for designing the project logo, and to AIGC Link for promoting the project on XiaoHongShu.

Contributors to esengine/DeepSeek-Reasonix


MIT — see LICENSE
Built by the community at esengine/DeepSeek-Reasonix