Reasonix is a terminal-based AI coding agent framework built specifically for DeepSeek’s V4 models (flash and pro). It positions itself as a lightweight, cost-optimized alternative to broader AI coding tools—eschewing IDE integrations, vendor-controlled infrastructure, and generic LLM abstractions. Instead, it focuses narrowly on one model family and one execution environment: the command line. Its design reflects an awareness of DeepSeek’s pricing model and token efficiency, with a loop architecture built around cache stability and predictable prompt growth. The project avoids LangChain, doesn’t require installation, and ships with an Ink-based TUI for interactive file editing, tool invocation, and real-time cost tracking.
What it does
- Implements a cache-first agent loop, where prompt prefixes remain stable across tool calls—achieving a measured 94.4% cache hit rate in benchmarks, compared to 46.6% for generic harnesses on identical workloads
- Performs R1 Thought Harvesting, a technique to extract and retain intermediate reasoning steps for reuse and auditing—not just final outputs
- Includes Tool-Call Repair, automatically correcting malformed or failed tool invocations without dropping the conversation thread
- Generates code edits as explicit SEARCH/REPLACE blocks, keeping changes reviewable and reversible until explicitly confirmed with
/apply - Integrates MCP (Model Context Protocol) servers as first-class components, allowing extensible tool discovery and orchestration without custom glue code
Getting it running
No global install is needed. Reasonix runs via npx, targeting any local project directory. Node.js 20.10 or newer is required. The setup takes under a minute:
cd my-project
npx reasonix code
The first run launches a brief wizard: paste your DeepSeek API key (available free with signup at platform.deepseek.com/api_keys), select a preset (e.g., “web app”, “CLI tool”), and optionally enable MCP servers via multi-select. Subsequent runs skip the wizard and drop straight into the TUI. Commands like /help, /stats, and /discard are available at any time. On Windows, it supports PowerShell, Git Bash, and Windows Terminal—no WSL required. Press Esc to exit at any point.
Who this is for
Reasonix suits developers who want AI-assisted code editing without IDE lock-in or opaque infrastructure. It’s useful for tasks like refactoring legacy logic, patching case-sensitivity bugs (as shown in the README example), or writing tests alongside implementation—all while seeing exact cost comparisons per turn. Because it operates entirely in the terminal and makes only one network request (to DeepSeek’s API), it fits into existing workflows with git, tmux, or CI pipelines. Teams running private MCP servers—or those already standardizing on DeepSeek—will find its narrow scope an advantage. It’s also suitable for contributors: the entire codebase is MIT-licensed TypeScript, under 30k lines, with all logic—including cache handling, TUI rendering, and MCP bridging—in the src/ directory.
How it compares
Reasonix distinguishes itself through three constraints: DeepSeek-only backend, terminal-only interface, and no SaaS layer. Unlike Cursor (IDE-based, Electron, multi-model), Claude Code (Anthropic-only, terminal + IDE, closed), or Aider (model-agnostic but requires OpenRouter setup and lacks built-in caching), Reasonix trades flexibility for predictability. Its cost claim—~$0.001–$0.005 per typical task, versus $0.05–$0.50 for Claude Sonnet—is grounded in both DeepSeek’s lower token pricing and the cache-first loop’s effect on effective prompt length. Benchmarks cited in the README verify this: stable prefix caching means more tokens hit DeepSeek’s cheaper cached tiers. Cline, while also CLI-first, supports arbitrary models via OpenRouter but doesn’t optimize for any one provider’s caching behavior. Reasonix doesn’t aim to replace general-purpose agents—it targets users for whom DeepSeek V4 is already the preferred model, and for whom CLI fidelity and cost transparency matter more than plugin ecosystems.
The project has 121 GitHub stars and is written in TypeScript. It does not depend on LangChain, does not ship as a Docker image or binary, and does not include a web UI or hosted service. Its website is static (esengine.github.io/reasonix), and documentation is split across English and Chinese READMEs. If you want a CLI agent tightly coupled to DeepSeek V4—with visible caching, reversible edits, and zero vendor infrastructure—this is one implementation. If you need multi-model support, IDE integration, or offline operation, alternatives like Aider or local Llama-based agents may be more suitable.
Source: github.com/esengine/reasonix
Comments