Dao Code —— 道家美学的 DeepSeek V4 终端编码 agent(Ink TUI · 太极欢迎屏 · 流式+工具+审批 · 持久记忆 · prompt-cache 感知)
$git clone https://github.com/tigicion/dao-codeInstalls into the current project.
Install dao-code by running `git clone https://github.com/tigicion/dao-code`, then use it for the current task and follow its documentation at https://github.com/tigicion/dao-code.
| 1 | # Dao Code 道 |
| 2 | |
| 3 | **English** · [中文](./README.zh-CN.md) |
| 4 | |
| 5 | [](https://github.com/tigicion/dao-code/actions/workflows/ci.yml) |
| 6 | [](./LICENSE) |
| 7 | [](./.nvmrc) |
| 8 | [](./CONTRIBUTING.md) |
| 9 | |
| 10 | > **A terminal coding agent built around cost, experience, and availability** — squeezing the most capability and the lowest cost out of the high-value DeepSeek V4. |
| 11 | |
| 12 |  |
| 13 | |
| 14 | Dao Code (command `dao`) is a terminal-native AI coding assistant: it reads code, writes code, runs commands, and fixes bugs right in your terminal — streaming its reasoning and tool calls while executing safely behind an approval gate, until the task is done. It targets **DeepSeek V4** (1M context), is Chinese-first, and is inspired by Claude Code — but takes a different road: **rather than buying experience with an expensive model, it builds on DeepSeek's strong price-performance and ultra-cheap cache pricing, engineering byte-stable prefixes and cache-reusing forks so cross-session memory and a continuous self-correction layer add almost no token cost.** |
| 15 | |
| 16 | --- |
| 17 | |
| 18 | ## Why Dao Code? |
| 19 | |
| 20 | ### 🌐 Availability |
| 21 | |
| 22 | A coding agent is only useful if you can actually run it. |
| 23 | |
| 24 | - **Claude Code** needs an Anthropic account and network access — a high bar to use out of the box in mainland China; |
| 25 | - **GLM's Coding Plan** has scarce quota that's often hard to grab; |
| 26 | - **Dao Code is fully open source (MIT)**, and its base **DeepSeek is register-and-go, pay-as-you-go, directly reachable in mainland China** — no network gymnastics, no quota grabbing, no waitlist. |
| 27 | |
| 28 | ### 💰 Cost |
| 29 | |
| 30 | - **Low unit price** — DeepSeek sits at the lowest price tier among mainstream capable models; both input and output prices are far below the top-tier closed models. |
| 31 | - **Cache cuts it further** — DeepSeek's prefix-cache *hit* price is ≈ **1/120** of a miss (~two orders of magnitude). Dao Code keeps the system prefix / tool table / memory **byte-stable**, and runs reflection & memory on cache-reusing forks, so the hit rate keeps climbing. |
| 32 | - **Measured on real OSS bug-fixes (not toy demos)** — 7 SWE-bench-style tasks (valibot / date-fns / es-toolkit / sqlglot / hono), **3.89M input tokens** total, **95.8% aggregate cache hit** (85.4%–97.7% per task). At DeepSeek V4 Pro current pricing, a full feature (read + edit + test + self-review) runs **¥0.07–0.21, avg ¥0.15**; all 7 total **¥1.07**. Every figure traces back to `evals/runs/<task>/run-1/agent.log`; replay any time with `/cost`. |
| 33 | - **Cost vs Claude Code** — pricing the **same token trace** of these 7 tasks under each vendor's official rates (and crediting Dao Code's high hit rate to Claude too, in its favor), total cost is still **~30× cheaper than Claude Opus 4.8, ~18× cheaper than Sonnet 4.6**. |
| 34 | |
| 35 | | Task (real OSS repo) | Input tok | Hit % | DeepSeek Pro | vs Opus | vs Sonnet | |
| 36 | |---|---:|---:|---:|---:|---:| |
| 37 | | t7-sqlglot-sqlite-autoinc | 1,218,385 | 97.7% | ¥0.213 | 37× | 22× | |
| 38 | | t6-sqlglot-comment-on | 625,772 | 96.3% | ¥0.144 | 32× | 19× | |
| 39 | | t9-hono-compress | 699,479 | 96.0% | ¥0.209 | 31× | 18× | |
| 40 | | t8-hono-cookie-dup | 502,866 | 94.9% | ¥0.136 | 28× | 17× | |
| 41 | | t4-estoolkit-omitby | 445,475 | 94.4% | ¥0.159 | 28× | 17× | |
| 42 | | L1-nodeps-toolkit | 289,989 | 93.2% | ¥0.140 | 27× | 16× | |
| 43 | | t5-estoolkit-uniqwith | 104,071 | 85.4% | ¥0.068 | 21× | 12× | |
| 44 | | **Total** | **3,886,037** | **95.8%** | **¥1.07** | **30×** | **18×** | |
| 45 | |
| 46 | <sub>Prices as of 2026-06 official rates: DeepSeek V4 Pro hit/miss/output = $0.003625 / $0.435 / $0.87 per 1M; Claude Opus 4.8 = $5 / $25 (hits at 0.1× cache-read), Sonnet 4.6 = $3 / $15. Multiples are USD-on-USD, exchange-rate-independent; ¥ converted at ¥7.1/$. Cross-check: re-pricing L1 at current rates gives ¥0.140 ≈ the ¥0.136 the in-log |