{"id":"a3e00618-cb7d-418a-8813-fefb7e0ec6da","slug":"deepseek-build","kind":"skill","name":"deepseek-build","summary":"DeepSeek-native terminal coding agent — Grok-class speed + Reasonix cache discipline + Deep Code V4 surface","owner":"innocarpe","repoUrl":"https://github.com/innocarpe/deepseek-build","license":"Apache-2.0","licenseTier":"permissive","trust":"community","stars":8,"match":null,"fewStars":false,"format":"skill","createdAt":"2026-08-06T08:05:18.000Z","addedAt":"2026-10-22T03:23:01.368Z","logoUrl":"https://avatars.githubusercontent.com/u/2222333?u=7ab7a3cdc314be11e176781914eac81f0e0f9f5a&v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["developer-tools"],"tags":["ai","cli","coding-agent","deepseek","terminal","tui"],"runtime":"node","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-25T14:47:08.066Z","sample":false,"url":"https://conduits.dev/tools/deepseek-build","language":"Rust","transports":["stdio"],"install":{"npm":"@innocarpe/deepseek-build"},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"<div align=\"center\">\n\n**[English](README.md)** · [简体中文](README.zh-CN.md) · [日本語](README.ja-JP.md) · [한국어](README.ko-KR.md)\n\n<!-- Temporary hero source: deepseek-ai/DeepSeek-V2 figures/logo.svg, as used by DeepSeek-V3. -->\n<a href=\"https://github.com/deepseek-ai/DeepSeek-V3\">\n  <img src=\"assets/deepseek-logo.svg\" width=\"60%\" alt=\"DeepSeek logo\">\n</a>\n\n<h1>DeepSeek Build</h1>\n\n<p><strong>DeepSeek-native coding. Grok-class execution.</strong></p>\n\n<p>\n  A full-screen terminal coding agent with safe edits, cache-aware sessions,\n  and parallel execution built around DeepSeek models.\n</p>\n\n<p>\n  <a href=\"https://github.com/innocarpe/deepseek-build/releases\"><img alt=\"GitHub release\" src=\"https://img.shields.io/github/v/release/innocarpe/deepseek-build?style=flat-square&label=release\"></a>\n  <a href=\"https://www.npmjs.com/package/@innocarpe/deepseek-build\"><img alt=\"npm version\" src=\"https://img.shields.io/npm/v/%40innocarpe%2Fdeepseek-build?style=flat-square&label=npm\"></a>\n  <a href=\"LICENSE\"><img alt=\"Apache 2.0 license\" src=\"https://img.shields.io/badge/license-Apache--2.0-blue?style=flat-square\"></a>\n</p>\n\n<p>\n  <a href=\"#quick-start\">Quick start</a> ·\n  <a href=\"#why-deepseek-build\">Why DeepSeek Build</a> ·\n  <a href=\"#how-it-works\">How it works</a> ·\n  <a href=\"#deepseek-harness\">DeepSeek Harness</a> ·\n  <a href=\"#benchmarks\">Benchmarks</a> ·\n  <a href=\"#documentation\">Documentation</a> ·\n  <a href=\"#contributing\">Contributing</a>\n</p>\n\n</div>\n\n<p align=\"center\">\n  <img src=\"assets/dsb-welcome.jpg\" alt=\"DeepSeek Build welcome screen — the full-screen DeepSeek agent TUI opened by dsb\" width=\"85%\">\n</p>\n\n## Quick start\n\nInstall from npm, add your DeepSeek API key, and open the TUI.\n\nnpm 12.0.0 and newer block dependency install scripts unless you opt in.\nWithout the flag below, npm reports success and does not install the agent.\nnpm 11 and older install with or without the flag.\n\n```bash\nnpm install -g --allow-scripts=@innocarpe/deepseek-build @innocarpe/deepseek-build\ndeepseek-build setup\ndeepseek-build\n```\n\nAllow the package once for later global installs, then the plain command works:\n\n```bash\nnpm config set allow-scripts=@innocarpe/deepseek-build --location=user\nnpm install -g @innocarpe/deepseek-build\n```\n\nThe registry install requires Node.js 18 or newer and uses a prebuilt binary\nwhen a matching release asset is available. It does not require Rust on that\npath; see the [npm installation guide](docs/user-guide/05-npm.md) for platform\nand source-fallback details.\n\n`deepseek-build` is the primary command. `dsb` is the fully supported short\nalias with the same behavior and full Semantic Version:\n\n```bash\ndeepseek-build --version\ndsb --version\n```\n\nKeep the install current with the same command on either name:\n\n```bash\ndeepseek-build update\n```\n\nIt asks the published feeds for the latest version and replaces an npm-global\ninstall in place. When the install is already current it says so and changes\nnothing, and it never replaces an install with an older published version.\n\nIf the installer reports that the product bin directory is not on `PATH`, add\nit before launching:\n\n```bash\nexport PATH=\"$HOME/.deepseek-build/bin:$PATH\"\n```\n\n## Why DeepSeek Build\n\n| Capability | What it means |\n| --- | --- |\n| **DeepSeek-native** | DeepSeek API defaults, Flash/Pro routing, reasoning effort, and a DeepSeek-branded TUI. |\n| **Safe edits** | Version-bound snippet editing and fail-closed workspace permissions instead of silent whole-file replacement. |\n| **Long-session economics** | Session changes append after the cached history instead of rewriting it. A cache miss names the assembled document that moved, the session logs its cumulative cache total, and a request that diverges from the session log fails the turn. |\n| **Wall-clock throughput** | Parallel tools, background shell jobs, subagents, and opt-in worktrees run beneath the safety and cache layers. |\n| **Durable sessions** | Resume the most recent full-screen session or address a saved session directly. |\n\nThe result is a coding agent that keeps the speed of a Grok-derived execution\nengine while making DeepSeek-specific cost, edit, and permission rules part of\nthe product path.\n\n## Everyday use\n\n```bash\n# Open the full-screen TUI\ndeepseek-build\n\n# Resume the most recent TUI session\ndeepseek-build --resume\n\n# Continue the most recent TUI session (Claude Code-style -c)\ndeepseek-build -c\n\n# Run one non-interactive turn\ndeepseek-build run \"Explain the architecture of this repository.\"\n\n# Use the trusted local coding profile\ndeepseek-build --dogfood\n```\n\n`--dogfood` allows writes inside the current workspace and enables shell\nexecution under policy. Writes and deletes outside the workspace remain denied.\n\nFor the short command, replace `deepseek-build` with `dsb` in any example.\n\nAt or below 60 columns, a submitted prompt folds to at most two rows and drops\nthe decorative `❯` and blank pad rows; wider windows keep the three-line\nbudget. On that phone-width pane the balance, cache hit, model and permission\nshare one row under the input box — cost and cache on the left, model and\npermission on the right. Wider panes keep the model on the box border and the\nbalance on its own row. The full-screen view has a configurable status line at the bottom. On\nthe official DeepSeek API, DeepSeek V4.1 Flash (`deepseek-flash`) accepts\nattached images directly, and text-only models keep images off the wire with\nthe on-disk fallback.\n\nThe default Flash wire ID is `deepseek-flash`, which DeepSeek currently serves\nas **DeepSeek V4.1 Flash 1017**. OpenRouter setup uses\n`deepseek/deepseek-v4.1-flash-1017`. Existing product homes retain their local\n`[model.deepseek-v4-flash]` slot; DSB updates its old wire ID on launch while\npreserving custom model choices ([ADR 0015](docs/adr/0015-deepseek-v41-flash-1017.md)).\n\n## Authentication and configuration\n\nInteractive setup asks how to reach the DeepSeek models — the DeepSeek API or\nOpenRouter — then stores that provider's API key in\n`~/.deepseek-build/credentials.json` with mode `0600`:\n\n```bash\ndeepseek-build setup\ndeepseek-build setup --provider openrouter --api-key \"$KEY\"   # non-interactive\ndeepseek-build auth status\ndeepseek-build auth logout\n```\n\nOpenRouter keeps prompt caches separate for each upstream provider. DSB sends\n`{\"order\":[\"relace\",\"deepinfra\"],\"allow_fallbacks\":false}` by default, which\ntries Relace first and limits routing to those two providers. Override it per\nmodel with OpenRouter's `provider` object; a configured object replaces the\ndefault entirely. Set it to `false` to disable routing:\n\n```toml\n[model.deepseek-v4-flash]\nopenrouter_provider = { order = [\"relace\", \"deepinfra\"], allow_fallbacks = false }\n# openrouter_provider = { only = [\"deepinfra/fp8\"] }\n# openrouter_provider = false\n```\n\nFor CI or another non-interactive environment, set `DEEPSEEK_API_KEY`; the\nenvironment variable takes precedence over a DeepSeek credentials file.\nLine mode (`run` / `chat`) uses the DeepSeek API only. Product\nconfiguration, credentials, sessions, and user skills live under\n`~/.deepseek-build/` by default.\n\n## Build from source\n\nSource installation is intended for contributors and unsupported release\nplatforms. It requires Rust 1.94 or newer plus `protoc` or DotSlash; the first\nagent build can take several minutes.\n\n```bash\ngit clone https://github.com/innocarpe/deepseek-build.git\ncd deepseek-build\n./scripts/install.sh\n\ndeepseek-build --version\ndsb --version\n```\n\n`npm install` in this checkout does not install `deepseek-build` or `dsb`.\nIt does not download a prebuilt and it does not compile. Use\n`./scripts/install.sh` here, or\n`npm install -g --allow-scripts=@innocarpe/deepseek-build @innocarpe/deepseek-build`\nfor the registry package. npm 12 does not install the agent without that flag.\n\nSee the [installation guide](docs/user-guide/01-install.md) for Cargo and custom\nprefix options.\n\n## How it works\n\n```text\ndeepseek-build | dsb\n        │\n        ▼\nproduct launcher ── auth · config · model routing\n        │\n        ▼\ndeepseek-build-agent ── full-screen TUI · tools · sessions\n        │\n        ▼\nDeepSeek API\n```\n\nThree layers have explicit ownership. Higher-throughput machinery cannot bypass\nthe edit, permission, or cache contracts beneath it.\n\n| Layer | Source | Owns |\n| --- | --- | --- |\n| **L1** | [Deep Code CLI](https://github.com/lessweb/deepcode-cli) | Snippet-safe edits, skills as context, and side-effect permissions. |\n| **L2** | [Reasonix](https://github.com/esengine/DeepSeek-Reasonix) | Stable-prefix economics, Flash/Pro behavior, and tool-call repair. |\n| **L3** | [Grok Build](https://github.com/xai-org/grok-build) | The base runtime, TUI, parallel tools, subagents, background work, and worktrees. |\n\nReading DeepSeek's official harness added no layer to this map: the append\nrule and the request-versus-log check came from that evidence, described in\nthe next section.\n\nThe normative conflict rules live in the\n[harness philosophy](docs/architecture/HARNESS_PHILOSOPHY.md), with the complete\nsystem map in [SYSTEM_ARCHITECTURE.md](docs/architecture/SYSTEM_ARCHITECTURE.md).\n\n## DeepSeek Harness\n\n[dsh](https://github.com/deepseek-ai/deepseek-harness) is DeepSeek's official\nopen-source harness. It is not this product's architecture, and it is not a\nfourth layer: DeepSeek Build stays a Rust full-screen TUI, with edits owned by\nDeep Code, the cache contract owned by Reasonix, and execution owned by Grok\nBuild. dsh is evidence for how one family behaves — a cached prefix survives a\nsession change, and a request that does not match the session log is not sent.\n\n| What changes in a session | What the product does |\n| --- | --- |\n| A later change of the stable system body | Earlier system messages stay byte-for-byte; the new body is appended after them. The model treats the most recent system message as the current body. |\n| tools, skills, environment, or project instructions inside that body | The same append. The wire `tools` array is the full list on every request. There is no tool add/remove history message; Chat Completions has no field for one. |\n| A cache miss | The turn names which assembled document moved, as `prefix_change=`. When the epoch moved and every document hash matches, it says `unattributed` instead of inventing a cause. |\n| The session's cache | Once any response carried cache fields, every turn logs one `cache_session=` line. Hits and misses are token sums; a response without cache fields is `unreported` and is not counted as a miss. `deepseek-build run` and the REPL store the totals with the session, so a resume continues them. The full-screen status chip stays the last turn's ratio, the full-screen counter is not written to the session file, and a new process starts it at zero. |\n| A request that diverges from the log | The turn fails before sampling. An item that cannot be serialized fails closed too. |\n| deny | A later allow does not replace a deny. |\n\nDeliberately not taken: a plugin host, agent teams, sandbox escalation,\nrequest-series bookkeeping (`initial` / `resume` / `change`), and the\nAnthropic Messages transport — this product speaks DeepSeek Chat Completions\n([ADR 0005](docs/adr/0005-deepseek-provider-contract.md)).\n\nAlready present, so not ported again: spill of an oversized tool result (head,\ntail, and a path to the rest), compaction aligned to the warm prefix, and a\nsnippet staleness guard stricter than dsh's path-scoped token. These are not\nnew features taken from dsh.\n\nRead more: [dsh research note](docs/research/dsh-deepseek-harness.md) ·\n[what this work changed](docs/product/CHANGELIST_6_1_0.md) ·\n[design sources](docs/product/SOURCES.md).\n\n## Benchmarks\n\nOn 2026-10-15, **dsb** itself ran two public agent benchmarks — a Linux x64\nsource build driving **DeepSeek V4.1 Flash** (`deepseek-v4-flash`) with\nthinking on, reasoning effort `max`, and one attempt per task (`-k 1`). Both\nwent through their official runners: Harbor for Terminal-Bench 4.0 and Pier\nfor DeepSWE v1.1.\n\n| Model · harness | Terminal-Bench 4.0 | DeepSWE v1.1 |\n| --- | --- | --- |\n| **dsb + DeepSeek V4.1 Flash (max)** — measured here | **33.3%** (2 of 6 tasks) | **63.6%** (7 of 11 tasks) |\n| DeepSeek V4.1 Flash (max) — reported | 26.8% (announced 31.2%) | 74.2% |\n| Claude Haiku 5.5 (max) — reported | 32.8% (announced 39.2%) | not published (83.7% on SWE-bench Multilingual) |\n| GPT-6 Luna (max) — reported | 12.6% (announced 16.4%) | 66.6% |\n\nReported figures are public numbers from the sources linked below; `announced`\nmarks the model vendor's own figure next to the evaluation number. For scale,\nthe same Terminal-Bench 4.0 board carries Claude Sonnet 5.5 at 63.6% and\nClaude Opus 5.5 at 59.6%.\n\nHarness is part of the score. On Terminal-Bench 4.0, Artificial Analysis ran\nboth lightweight models with the same mini-swe-agent harness (DeepSeek V4.1\nFlash 26.8%, GPT-6 Luna 12.6%), and Vals AI measured 19.7% and 13.6% in a\nshared environment. On DeepSWE v1.1, DeepSeek V4.1 Flash is reported at 65.6%\nunder Codex and 69.8% under Claude Code. List prices per 1M tokens\n(input/output): Claude Haiku 5.5 $0.10/$0.50 (5× on prompts above 100k\ntokens), GPT-6 Luna $0.10/$0.50, DeepSeek V4.1 Flash $0.30/$1.20 (half price\nin off-peak hours).\n\nOur row is an early directional signal, not a like-for-like comparison with\nthose boards: it covers a **task subset** (6 of 66 Terminal-Bench 4.0 tasks,\nwith GPU and network-isolated tasks excluded; 11 of 113 DeepSWE v1.1 tasks),\n**one attempt per task**, and an environment that moved mid-run from Modal to\na local Docker Desktop (macOS, amd64 emulation) when Modal's spend limit was\nreached.\n\nSources: [aievals.app — Terminal-Bench 4](https://aievals.app/benchmarks/terminal-bench-4) ·\n[decode.agency — AI model comparison](https://decode.agency/article/ai-model-comparison-software-development/) ·\n[DeepSeek V4.1 Flash model card](https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash)\n\n## Documentation\n\n| Start here | Use it for |\n| --- | --- |\n| [User guide](docs/user-guide/README.md) | Installation, setup, daily use, and the complete feature index. |\n| [First-run setup](docs/user-guide/00-setup.md) | API keys, credential precedence, and headless setup. |\n| [Sessions](docs/user-guide/03-sessions.md) | Full-screen resume and line-mode session storage. |\n| [Permissions](docs/user-guide/08-permissions.md) | Interactive asks, headless denial, and workspace boundaries. |\n| [Subagents](docs/user-guide/11-subagents.md) · [background tasks](docs/user-guide/12-background-tasks.md) · [worktrees](docs/user-guide/13-worktrees.md) | L3 execution surfaces. |\n| [Known limitations](docs/product/KNOWN_LIMITS.md) | Current packaging, live-smoke, and platform boundaries. |\n| [Product SSOT](docs/product/SSOT.md) | Which artifact wins when product documents disagree. |\n\n## Development\n\n```bash\ncargo build -p dsb-cli\ncargo test --workspace\n./scripts/check-semver.sh\n./scripts/test-owner-bar.sh\n```\n\nThe root Rust workspace covers the product crates. Avoid vendor-full Cargo runs\nfor everyday checks; the owner-bar scripts use the bounded product path.\n\nFor the crate map, see [crates/README.md](crates/README.md). For the repository\nmap and documentation ownership, start at [docs/README.md](docs/README.md).\n\n## Contributing\n\nRead [CONTRIBUTING.md](CONTRIBUTING.md) before making changes. All meaningful\nwork lands through a focused PR with an atomic Conventional Commit, an existing\nkind label, honest test evidence, and the review narrative defined in the\n[PR authoring guide](docs/contributing/pr-body-standard.md).\n\n## License\n\nDeepSeek Build is available under the [Apache License 2.0](LICENSE). Vendored\nand third-party code retains its original licensing; see [NOTICE](NOTICE).\n"}