
{"id":8356,"date":"2026-05-10T09:09:00","date_gmt":"2026-05-10T01:09:00","guid":{"rendered":"https:\/\/meta-quantum.today\/?p=8356"},"modified":"2026-05-10T08:11:59","modified_gmt":"2026-05-10T00:11:59","slug":"deepseek-tui-an-open-source-terminal-native-ai-coding-agent","status":"publish","type":"post","link":"https:\/\/meta-quantum.today\/?p=8356","title":{"rendered":"DeepSeek TUI: An open-source terminal-native AI coding agent"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p><a href=\"#video\" title=\"\">Unpacks one of the strangest developer stories of the year<\/a>: <strong>DeepSeek TUI<\/strong>, an open-source terminal-native AI coding agent built around DeepSeek V4 that exploded onto GitHub in early May. According to the video, on May 6th the project reached the top of GitHub trending, gained 2,434 stars in a single day, and pushed past 10,200 total stars \u2014 having sat around 8,700 earlier the same morning. What started looking like &#8220;another DeepSeek wrapper&#8221; suddenly had developers on GitHub, Reddit, X, and Chinese tech communities all talking at once.<\/p>\n\n\n\n<p>The premise is simple. Instead of opening a browser, copy-pasting code into a chatbot, and manually applying suggestions, DeepSeek TUI lets developers talk to DeepSeek directly inside the terminal \u2014 reading and editing files, running shell commands, searching the web, managing Git, applying patches, and coordinating sub-agents from a keyboard-driven interface. It sits in the same category as Claude Code, Aider, Klein, and OpenCode, except it&#8217;s heavily designed around DeepSeek V4 rather than trying to be a generic multi-model tool.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Story Behind the Project<\/h2>\n\n\n\n<p>Part of the viral pull is the unlikely creator. The project is <strong>not<\/strong> an official DeepSeek product \u2014 it was built by <strong>Hunter Bound<\/strong> (GitHub handle: Bound), an independent American developer with a background in music education (B.M.E. from University of North Texas, 2015; M.M.E. from Southern Methodist University, 2019) who is now a second-year patent law student at SMU&#8217;s Dedman School of Law. He built DeepSeek TUI using AI-assisted coding \u2014 describing the workflow as an early version of AI self-iteration, where AI helps build the tool that later helps other people code with AI.<\/p>\n\n\n\n<p>The project launched January 19, 2026 and by early May had already gone through dozens of releases \u2014 v0.8.13 landing on the morning of May 6th. Bound himself wrote on May 3rd that &#8220;two days earlier he was nobody&#8221; and that the previous two days had been the craziest of his life. He posted that he wanted to connect with Chinese developers, calling them &#8220;whale brothers&#8221; \u2014 which immediately became a small meme. He got a WeChat account, started learning Chinese, and the repo even ships a <code>readme.zh-cn.md<\/code>. The contributor list quietly includes Claude and Gemini \u2014 likely AI-assisted contribution traces.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">DeepSeek TUI \u2014 Complete Setup &amp; Showcase Guide<\/h2>\n\n\n\n<p>Comprehensive walkthrough: installation paths, API setup, config file, modes, key commands, skills\/MCP wiring, and an end-to-end example session.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. What You&#8217;re Installing<\/h3>\n\n\n\n<p>DeepSeek TUI is two binaries that work together:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Binary<\/th><th>Role<\/th><\/tr><\/thead><tbody><tr><td><code>deepseek<\/code><\/td><td>Dispatcher CLI \u2014 auth, config, model selection, session management<\/td><\/tr><tr><td><code>deepseek-tui<\/code><\/td><td>Runtime \u2014 agent loop, Ratatui terminal interface, streaming client<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>If only one is on your <code>PATH<\/code>, you&#8217;ll get a <code>MISSING_COMPANION_BINARY<\/code> error. All install methods below place both correctly.<\/p>\n\n\n\n<p><strong>Official sources:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>GitHub: <code>github.com\/Hmbown\/DeepSeek-TUI<\/code> (canonical, MIT-licensed)<\/li>\n\n\n\n<li>npm: <code>deepseek-tui<\/code><\/li>\n\n\n\n<li><a href=\"http:\/\/crates.io\">crates.io<\/a>: <code>deepseek-tui<\/code> and <code>deepseek-tui-cli<\/code><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">2. Prerequisites<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A DeepSeek API key from <code>platform.deepseek.com<\/code><\/li>\n\n\n\n<li>One of: Node.js (for npm), Rust 1.85+ (for Cargo), Homebrew (macOS), or Docker<\/li>\n\n\n\n<li>Linux (x64 \/ arm64), macOS (Apple Silicon \/ Intel), or Windows x64<\/li>\n\n\n\n<li>For Cargo from source: working C toolchain (<code>build-essential<\/code> on Linux, Xcode CLT on macOS, MSVC on Windows)<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">3. Installation Methods<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Method A \u2014 npm (easiest, recommended)<\/h4>\n\n\n\n<p>The npm package is a thin installer that pulls down the matching prebuilt binary; it does <strong>not<\/strong> add a Node runtime dependency to the tool itself.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>npm install -g deepseek-tui\n<\/code><\/pre>\n\n\n\n<p>This installs both <code>deepseek<\/code> and <code>deepseek-tui<\/code> binaries.<\/p>\n\n\n\n<p><strong>For mainland China users<\/strong> \u2014 set a release mirror to avoid GitHub download issues:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>export DEEPSEEK_TUI_RELEASE_BASE_URL=\"&lt;https:\/\/mirror.example.com\/deepseek-tui-releases&gt;\"\nnpm install -g deepseek-tui\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Method B \u2014 Cargo (build from source, most flexible)<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code># Both crates are required\ncargo install deepseek-tui-cli --locked   # produces `deepseek`\ncargo install deepseek-tui --locked       # produces `deepseek-tui`\n<\/code><\/pre>\n\n\n\n<p>For China users, point Cargo at TUNA mirror in <code>~\/.cargo\/config.toml<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;source.crates-io]\nreplace-with = 'tuna'<\/code><\/pre>\n\n\n<p>[source.tuna]<\/p>\n\n\n\n<p>registry = &#8220;&lt;https:\/\/mirrors.tuna.tsinghua.edu.cn\/git\/crates.io-index.git&gt;&#8221;<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Method C \u2014 Homebrew (macOS)<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>brew tap Hmbown\/deepseek-tui\nbrew install deepseek-tui\n<\/code><\/pre>\n\n\n\n<p>If you hit <code>Your Command Line Tools are too outdated<\/code>, update Xcode CLT from the Apple Developer site, then re-run <code>brew install<\/code>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Method D \u2014 Docker<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>docker run --rm -it \\\\\n  -e DEEPSEEK_API_KEY=\"$DEEPSEEK_API_KEY\" \\\\\n  -v ~\/.deepseek:\/home\/deepseek\/.deepseek \\\\\n  -v \"$PWD\":\/workspace \\\\\n  -w \/workspace \\\\\n  ghcr.io\/hmbown\/deepseek-tui:latest\n<\/code><\/pre>\n\n\n\n<p>The image is published for both <code>linux\/amd64<\/code> and <code>linux\/arm64<\/code>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Method E \u2014 Direct binary download<\/h4>\n\n\n\n<p>Grab <code>deepseek<\/code> and <code>deepseek-tui<\/code> from the GitHub Releases page for your platform, drop both into the same directory (e.g., <code>~\/.local\/bin\/<\/code>), then:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>chmod +x ~\/.local\/bin\/deepseek ~\/.local\/bin\/deepseek-tui\n# Verify checksums\nshasum -a 256 -c deepseek-artifacts-sha256.txt\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Sanity check<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>deepseek doctor      # checks PATH, both binaries, API connectivity\ndeepseek --version\ndeepseek models      # lists available models\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">4. First-Run Setup (API Key)<\/h3>\n\n\n\n<p>On first launch, the TUI prompts for your DeepSeek API key. You can also set it ahead of time:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Option 1: interactive login (saves to config)\ndeepseek login\n\n# Option 2: environment variable (one-shot or persistent)\nexport DEEPSEEK_API_KEY=\"sk-...\"\ndeepseek-tui\n<\/code><\/pre>\n\n\n\n<p>The key is saved to <code>~\/.deepseek\/config.toml<\/code> so it works from any directory without re-prompting or OS keychain dialogs.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">5. Configuration (<code>~\/.deepseek\/config.toml<\/code>)<\/h3>\n\n\n\n<p>A practical starting <code>config.toml<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># --- Auth ---\napi_key       = \"sk-...\"                       # or use DEEPSEEK_API_KEY\nbase_url      = \"&lt;https:\/\/api.deepseek.com&gt;\"     # override for NIM \/ Fireworks \/ SGLang\n\n# --- Model defaults ---\ndefault_model      = \"auto\"                    # auto | deepseek-v4-pro | deepseek-v4-flash\ndefault_thinking   = \"high\"                    # off | low | high | max\ndefault_mode       = \"agent\"                   # plan | agent | yolo\n\n# --- Cost guardrails ---<\/code><\/pre>\n\n\n<p>[cost]<\/p>\n\n\n\n<p>warn_at_usd = 1.00 hard_cap_usd = 5.00 show_cache_stats = true # display cache hit\/miss per turn # &#8212; Sub-agents (RLM) &#8212;<\/p>\n\n\n<p>[rlm]<\/p>\n\n\n\n<p>max_parallel = 8 # 1\u201316 default_child_model = &#8220;deepseek-v4-flash&#8221; escalate_to_pro_on_fail = true # &#8212; Tooling &#8212;<\/p>\n\n\n<p>[tools]<\/p>\n\n\n\n<p>allow_shell = true allow_git = true allow_web = true require_approval = [&#8220;shell&#8221;, &#8220;git_push&#8221;, &#8220;file_write&#8221;] # ignored in YOLO # &#8212; LSP diagnostics &#8212;<\/p>\n\n\n<p>[lsp]<\/p>\n\n\n\n<p>enabled = true servers = [&#8220;rust-analyzer&#8221;, &#8220;pyright&#8221;, &#8220;typescript-language-server&#8221;, &#8220;gopls&#8221;, &#8220;clangd&#8221;] # &#8212; Locale &#8212; language = &#8220;auto&#8221; # en | ja | zh-Hans | pt-BR | auto<\/p>\n\n\n\n<p><strong>Environment overrides<\/strong> that take precedence over the file:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>DEEPSEEK_API_KEY<\/code><\/li>\n\n\n\n<li><code>DEEPSEEK_BASE_URL<\/code><\/li>\n\n\n\n<li><code>DEEPSEEK_PROFILE<\/code> (lets you swap between named profile blocks in the TOML)<\/li>\n<\/ul>\n\n\n\n<p><strong>Alternate providers<\/strong> (still serving DeepSeek models, just different infra):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># NVIDIA NIM\nbase_url = \"&lt;https:\/\/integrate.api.nvidia.com\/v1&gt;\"\n\n# Fireworks AI\nbase_url = \"&lt;https:\/\/api.fireworks.ai\/inference\/v1&gt;\"\n\n# Self-hosted SGLang\nbase_url = \"&lt;http:\/\/localhost:30000\/v1&gt;\"\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">6. The Three Modes<\/h3>\n\n\n\n<p>Cycle with <code>Tab<\/code> \/ <code>Shift+Tab<\/code>. Pick the right mode for the task:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Mode<\/th><th>What it does<\/th><th>When to use<\/th><\/tr><\/thead><tbody><tr><td><strong>Plan<\/strong><\/td><td>Read-only inspection. Reads files, searches code, drafts a plan, but won&#8217;t edit or run anything.<\/td><td>Onboarding to a new repo, scoping a refactor, reviewing diffs<\/td><\/tr><tr><td><strong>Agent<\/strong><\/td><td>Default. Full toolset, but asks for approval on edits, shell commands, and git changes.<\/td><td>Daily coding work \u2014 the safe default<\/td><\/tr><tr><td><strong>YOLO<\/strong><\/td><td>Auto-approves tools inside a trusted workspace.<\/td><td>Greenfield projects, sandboxes, throwaway repos<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><code>Shift+Tab<\/code> (in addition to mode cycling) toggles reasoning depth: <strong>off \u2192 low \u2192 high \u2192 max<\/strong>. Type <code>model auto<\/code> or <code>\/model auto<\/code> to let DeepSeek TUI pick model + thinking level per turn via a small <code>deepseek-v4-flash<\/code> routing call before each real turn.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">7. Daily Commands &amp; Keyboard Shortcuts<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>deepseek-tui                                   # interactive TUI in current dir\ndeepseek-tui -p \"explain this in 2 sentences\"  # one-shot prompt, no UI\ndeepseek-tui --yolo                            # start in YOLO mode\ndeepseek-tui --continue                        # resume the last interrupted session\ndeepseek-tui doctor                            # diagnose setup\ndeepseek-tui serve --http                      # HTTP\/SSE server for automation\n<\/code><\/pre>\n\n\n\n<p><strong>In-TUI keys:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Key<\/th><th>Action<\/th><\/tr><\/thead><tbody><tr><td><code>F1<\/code><\/td><td>Help overlay<\/td><\/tr><tr><td><code>Esc<\/code><\/td><td>Back out of the current action<\/td><\/tr><tr><td><code>Ctrl+K<\/code><\/td><td>Command palette<\/td><\/tr><tr><td><code>Tab<\/code> \/ <code>Shift+Tab<\/code><\/td><td>Cycle mode \/ cycle reasoning level<\/td><\/tr><tr><td><code>Ctrl+C<\/code><\/td><td>Cancel current turn (twice to quit)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Slash commands inside the TUI:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Command<\/th><th>Purpose<\/th><\/tr><\/thead><tbody><tr><td><code>\/model auto<\/code> or <code>\/model deepseek-v4-pro<\/code><\/td><td>Switch model<\/td><\/tr><tr><td><code>\/skills<\/code><\/td><td>List available skills<\/td><\/tr><tr><td><code>\/skill &lt;name&gt;<\/code><\/td><td>Activate a skill<\/td><\/tr><tr><td><code>\/skill new<\/code><\/td><td>Scaffold a new skill<\/td><\/tr><tr><td><code>\/skill install github:&lt;owner&gt;\/&lt;repo&gt;<\/code><\/td><td>Install a community skill<\/td><\/tr><tr><td><code>\/rlm &lt;query&gt;<\/code><\/td><td>Fan out to parallel sub-agents<\/td><\/tr><tr><td><code>\/restore<\/code><\/td><td>Roll back to last checkpoint<\/td><\/tr><tr><td><code>\/revert turn<\/code><\/td><td>Undo the last turn&#8217;s changes<\/td><\/tr><tr><td><code>\/theme dark<\/code> \/ <code>\/theme light<\/code><\/td><td>Toggle theme<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">8. Skills &amp; MCP Setup<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Skills (workflow templates)<\/h4>\n\n\n\n<p>DeepSeek TUI discovers skills from these directories (in priority order):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Workspace-local\n.agents\/skills \u2192 skills \u2192 .opencode\/skills \u2192 .claude\/skills \u2192 .cursor\/skills\n\n# Global\n~\/.agents\/skills \u2192 ~\/.claude\/skills \u2192 ~\/.deepseek\/skills\n<\/code><\/pre>\n\n\n\n<p>Existing <strong>Claude Code skills work without modification<\/strong> \u2014 symlink or copy them in.<\/p>\n\n\n\n<p>A skill is just a directory with a <code>SKILL.md<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>---\nname: rust-pr-review\ndescription: Use this when DeepSeek should review a Rust PR for safety, perf, and idioms.\n---\n\n# Rust PR Review Skill\n\nWhen invoked:\n1. Run `cargo clippy -- -D warnings` and report findings\n2. Check `unsafe` blocks for justification\n3. Look for unnecessary `clone()` calls\n4. Verify error handling uses `Result` not `unwrap()`\n5. Summarize in a bullet list grouped by severity\n<\/code><\/pre>\n\n\n\n<p>Install community skills:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Inside the TUI\n\/skill install github:someuser\/rust-skills\n\/skill update rust-pr-review\n\/skill trust rust-pr-review\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">MCP servers<\/h4>\n\n\n\n<p>Bootstrap the MCP directory and edit your config:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>deepseek-tui setup       # creates skills + MCP scaffolding\ndeepseek-tui mcp init\n<\/code><\/pre>\n\n\n\n<p>Then in <code>~\/.deepseek\/config.toml<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;&#91;mcp_servers]]\nname    = \"filesystem\"\ncommand = \"npx\"\nargs    = &#91;\"-y\", \"@modelcontextprotocol\/server-filesystem\", \"\/Users\/coffee\/projects\"]\n\n&#91;&#91;mcp_servers]]\nname    = \"github\"\ncommand = \"npx\"\nargs    = &#91;\"-y\", \"@modelcontextprotocol\/server-github\"]\nenv     = { GITHUB_PERSONAL_ACCESS_TOKEN = \"ghp_...\" }\n\n&#91;&#91;mcp_servers]]\nname    = \"postgres\"\ncommand = \"npx\"\nargs    = &#91;\"-y\", \"@modelcontextprotocol\/server-postgres\", \"postgresql:\/\/localhost\/mydb\"]\n<\/code><\/pre>\n\n\n\n<p>Any MCP server that works with Claude Code or other MCP-capable agents works here \u2014 it&#8217;s standard stdio transport.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">9. Showcase Example \u2014 Adding a Feature to a Real Project<\/h3>\n\n\n\n<p>Walk-through of a realistic workflow: adding PayNow QR generation to a Yii web app (riffing on a stack you already work with).<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Step 1: Open the project<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>cd ~\/projects\/koneindustries-web\ndeepseek-tui\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Step 2: Start in Plan mode (<code>Tab<\/code> until &#8220;Plan&#8221; shows)<\/h4>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><strong>You:<\/strong> I need to add a <code>PayNowQRGenerator<\/code> service that generates EMV-compliant QR strings from amount + merchant UEN + reference number. Look at the existing <code>services\/<\/code> folder, propose where this belongs, and draft a plan.<\/p>\n<\/blockquote>\n\n\n\n<p>DeepSeek TUI streams its reasoning, scans <code>services\/<\/code>, reads <code>composer.json<\/code>, and returns:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>PLAN\n1. Create services\/PayNowQRGenerator.php following the existing service pattern\n   (see services\/PaymentNotifier.php \u2014 uses constructor DI, has interface)\n2. Add IPayNowQRGenerator interface in services\/contracts\/\n3. Implement EMV-Co TLV encoding helper as private method\n4. Add CRC-16\/CCITT-FALSE checksum (last 4 chars of the QR string)\n5. Wire into config\/main.php Yii component map\n6. Unit tests in tests\/unit\/services\/PayNowQRGeneratorTest.php\n   covering: valid UEN, edge amounts, CRC verification\n\nEstimated changes: 3 new files, 1 edit. ~280 LOC.\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Step 3: Switch to Agent mode (<code>Tab<\/code>)<\/h4>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><strong>You:<\/strong> Looks good, proceed.<\/p>\n<\/blockquote>\n\n\n\n<p>The agent now starts requesting tool approvals one at a time:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;approval needed] file_write: services\/contracts\/IPayNowQRGenerator.php\n&gt; Approve? (y\/n\/edit)\n<\/code><\/pre>\n\n\n\n<p>You hit <code>y<\/code> for each step, or <code>edit<\/code> to tweak the diff before applying. Watch the live reasoning stream as it works through the EMV TLV format.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Step 4: Use RLM for the test phase<\/h4>\n\n\n\n<p>When it&#8217;s time to write tests, you fan out:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><strong>You:<\/strong> <code>\/rlm Generate test cases for PayNowQRGenerator covering: valid SG UEN, malformed UEN, amount precision (0.01 vs 0.001), max amount, empty reference, CRC verification, EMV field ordering. Each child writes one test method.<\/code><\/p>\n<\/blockquote>\n\n\n\n<p>DeepSeek TUI dispatches <strong>8 V4-Flash sub-agents<\/strong> in parallel, each producing one test method. Results stream back into the transcript. Cost shows roughly <strong>1\/3 of what V4-Pro would have cost<\/strong> for the same volume of work.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Step 5: LSP-driven fix loop<\/h4>\n\n\n\n<p>After file edits, the integrated <code>pyright<\/code>\/<code>typescript-language-server<\/code>\/etc. (here PHP via a configured LSP) feed diagnostics back into the model&#8217;s context. The agent sees errors and proposes fixes without you re-prompting.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Step 6: Commit via the rollback-aware Git tool<\/h4>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><strong>You:<\/strong> Commit these changes with a message following our conventional-commits style.<\/p>\n<\/blockquote>\n\n\n\n<p>The agent runs <code>git diff<\/code>, drafts the message, asks for approval, then commits. Behind the scenes, <strong>a side-git mechanism<\/strong> has already snapshotted every turn into a separate ledger that doesn&#8217;t touch your project&#8217;s <code>.git\/<\/code> \u2014 so if anything went sideways, <code>\/restore<\/code> rolls back without polluting your real history.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Step 7: Save and resume tomorrow<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>Ctrl+C twice to quit\n<\/code><\/pre>\n\n\n\n<p>Tomorrow:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd ~\/projects\/koneindustries-web\ndeepseek-tui --continue\n<\/code><\/pre>\n\n\n\n<p>The persistent task queue, session transcript, and any unfinished background tasks all come back.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">10. Cost &amp; Economics Tips<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Watch the cache stats panel.<\/strong> DeepSeek V4 prefix caching is real \u2014 if cache hit % drops below 30% on long sessions, run <code>\/compact<\/code> to compress old tool outputs before paying for new turns.<\/li>\n\n\n\n<li><strong>V4-Flash for fan-out, V4-Pro for hard reasoning.<\/strong> Default <code>default_child_model = \"deepseek-v4-flash\"<\/code> for RLM. At ~$0.14\/M input and $0.28\/M output (discounted rate), 16 Flash children typically cost ~1\/3 of one Pro turn doing the same volume of work.<\/li>\n\n\n\n<li><strong>The 75% Pro discount<\/strong> is time-limited \u2014 currently valid until <strong>15:59 UTC on 31 May 2026<\/strong>, after which the cost estimator reverts to base rates. Set <code>[cost] hard_cap_usd<\/code> to fail-stop before bills surprise you.<\/li>\n\n\n\n<li><strong>Use <code>auto<\/code> model selection<\/strong> for mixed workloads \u2014 the cheap router call decides per turn whether Flash or Pro is needed.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">11. Troubleshooting Quick Reference<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Symptom<\/th><th>Fix<\/th><\/tr><\/thead><tbody><tr><td><code>MISSING_COMPANION_BINARY<\/code><\/td><td>Both <code>deepseek<\/code> and <code>deepseek-tui<\/code> must be on PATH; reinstall via npm<\/td><\/tr><tr><td><code>Your Command Line Tools are too outdated<\/code> (macOS Homebrew)<\/td><td>Update Xcode CLT from Apple Developer site, re-run <code>brew install<\/code><\/td><\/tr><tr><td>npm postinstall download fails<\/td><td>Set <code>DEEPSEEK_TUI_RELEASE_BASE_URL<\/code> to a mirror; transient failures are now retried automatically (recent versions)<\/td><\/tr><tr><td><code>glibc version too old<\/code> (Linux)<\/td><td>Use Docker image, or upgrade to Ubuntu 22.04+ \/ Debian 12+<\/td><\/tr><tr><td>Cache hit rate degrading on long sessions<\/td><td>Run <code>\/compact<\/code>; v0.8.13+ shrinks old tool outputs locally before paid summarization<\/td><\/tr><tr><td>Agent stuck in a loop<\/td><td>Fixed: third repeat of same tool+args triggers a correction message; eight failures stop it<\/td><\/tr><tr><td>Can&#8217;t see reasoning stream<\/td><td>Set <code>default_thinking = \"high\"<\/code> and use <code>deepseek-v4-pro<\/code> \u2014 Flash doesn&#8217;t stream reasoning<\/td><\/tr><tr><td>Want HTTP API instead of TUI<\/td><td><code>deepseek-tui serve --http<\/code> then POST to the local SSE endpoint<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"video\">Video about DeepSeek TUI<\/h2>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"DeepSeek\u2019s Claude Code Killer Goes Viral Overnight\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/MWgTWsZjris?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<div class=\"wp-block-group has-pale-cyan-blue-background-color has-background\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<h2 class=\"wp-block-heading\">Architecture &amp; New Features<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Dual-Binary Rust Architecture<\/h3>\n\n\n\n<p>Under the hood, DeepSeek TUI is a native Rust application \u2014 not Electron, not a Python daemon, not a Node process. It splits into two binaries:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>DeepSeek Dispatcher CLI<\/strong> \u2014 handles authentication, configuration, model selection, session management<\/li>\n\n\n\n<li><strong>DeepSeek TUI Runtime<\/strong> \u2014 handles the agent loop and the Ratatui-based terminal interface<\/li>\n<\/ul>\n\n\n\n<p>Both must run together, or you get a &#8220;missing companion binary&#8221; error. Installation works via <code>npm install -g deepseek-tui<\/code>, Cargo (separate installs for <code>deepseek-tui-cli<\/code> and <code>deepseek-tui<\/code>), or Homebrew on macOS \u2014 with recent fixes for Windows path separators and arm64 Linux binaries.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">DeepSeek V4-Native Design<\/h3>\n\n\n\n<p>Most coding apps that &#8220;support DeepSeek&#8221; just point an API client at it. DeepSeek TUI is designed <em>around<\/em> V4&#8217;s specific strengths:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>1M token context window<\/strong> \u2014 enables long working sessions<\/li>\n\n\n\n<li><strong>Cache hit\/miss tracking<\/strong> \u2014 so developers can see when cached input is being used at lower cost<\/li>\n\n\n\n<li><strong>V4 Flash for cheap parallel work<\/strong>, V4 Pro for stronger reasoning<\/li>\n\n\n\n<li><strong>Live reasoning stream<\/strong> \u2014 V4 Pro can send its reasoning separately from the final answer, and DeepSeek TUI displays that reasoning directly in the terminal, so you watch the model think instead of waiting on a final blob<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Context Compression &amp; Loop Protection<\/h3>\n\n\n\n<p>v0.8.13 added a smarter cleanup system: instead of paying the AI to summarize everything, the tool first <em>shrinks<\/em> old tool results itself \u2014 keeping a one-line version of huge command outputs and preserving the newest important data. If that&#8217;s enough, it skips the paid AI summary entirely.<\/p>\n\n\n\n<p>It also watches for the classic stuck-agent failure mode. If the same tool with the same arguments appears for the third time in one user request, it inserts a correction message and stops the repeat. If a tool keeps failing, it warns on the third try and stops on the eighth.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Three Operating Modes<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Plan mode<\/strong> \u2014 read-only inspection, no changes<\/li>\n\n\n\n<li><strong>Agent mode<\/strong> \u2014 full toolset, but asks for approval on edits, commands, Git changes<\/li>\n\n\n\n<li><strong>YOLO mode<\/strong> \u2014 auto-execution inside trusted projects (with recent fixes ensuring Git commands aren&#8217;t approved too easily)<\/li>\n<\/ul>\n\n\n\n<p>Users can also type <code>model auto<\/code> for automatic model selection, and use <code>Shift+Tab<\/code> to cycle between no reasoning, high reasoning, and maximum reasoning.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">RLM and the Sub-Agent Economics<\/h3>\n\n\n\n<p>The feature that makes DeepSeek TUI feel less like a Claude Code clone and more like its own thing is <strong>RLM<\/strong> (<code>\/rlm query<\/code>). Instead of routing everything to one main model, it splits work across <strong>1 to 16 smaller sub-agents<\/strong>, usually running on the cheaper V4 Flash model \u2014 one inspecting a file, another checking a different approach, another researching, another bug-hunting. Subtasks needing stronger reasoning get escalated to V4 Pro. The idea is inspired by Alex Jiang&#8217;s RLM work and Sakana AI&#8217;s novelty search research, repurposed into something practical for coding.<\/p>\n\n\n\n<p>The cost angle is the real selling point. V4 Flash runs around <strong>$0.14\/M input<\/strong> and <strong>$0.28\/M output<\/strong> at the discounted rate, and running up to 16 V4 Flash subtasks costs roughly <strong>1\/3 of using Pro<\/strong> for similar work. For developers watching API bills, that&#8217;s serious.<\/p>\n\n\n\n<p>This sub-agent approach mirrors a broader shift across agentic coding tools \u2014 developers building features in existing codebases are increasingly running 5-10 sub-agents in parallel inside Claude Code to ship faster, and understanding how sub-agents work and running specialized agents in the background is becoming a critical skill whether you&#8217;re vibe-coding or doing experienced agentic development. DeepSeek TUI is essentially porting that pattern onto a much cheaper inference substrate.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The Surrounding Ecosystem Features<\/h3>\n\n\n\n<p>Beyond the core agent loop, DeepSeek TUI ships features built for serious daily use:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>MCP (Model Context Protocol)<\/strong> support \u2014 plugs into outside tools and services<\/li>\n\n\n\n<li><strong>Skills<\/strong> \u2014 small instruction packages teaching the agent how to handle specific tasks; community skills installable straight from GitHub without a separate backend<\/li>\n\n\n\n<li><strong>Session save &amp; resume<\/strong>, <strong>checkpoints<\/strong>, <strong>rollback<\/strong> \u2014 <code>restore<\/code> and <code>revert turn<\/code> create project snapshots independent of normal Git<\/li>\n\n\n\n<li><strong>Persistent task queue<\/strong> \u2014 unfinished background tasks survive restarts<\/li>\n\n\n\n<li><strong>Code diagnostics integration<\/strong> \u2014 Rust Analyzer, Pyright, TypeScript Language Server, gopls, clangd<\/li>\n\n\n\n<li><strong>Persistent personal notes<\/strong> \u2014 preferences carry across sessions<\/li>\n\n\n\n<li><strong>Localization<\/strong> \u2014 English, Japanese, Simplified Chinese, Brazilian Portuguese, with system-language auto-adapt<\/li>\n\n\n\n<li><strong>HTTP\/SSE serving<\/strong> \u2014 <code>deepseek serve-http<\/code> for automated workflows without the full TUI<\/li>\n<\/ul>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion &amp; Key Takeaways<\/h2>\n\n\n\n<p>DeepSeek TUI is more than a viral GitHub moment \u2014 it&#8217;s a serious attempt to turn DeepSeek V4&#8217;s specific strengths (huge context, cheap cached tokens, V4 Flash pricing, V4 Pro reasoning) into a coherent terminal coding workflow, built by an unlikely solo creator using AI-assisted coding. Whether it stays a flash-in-the-pan or grows into something developers use daily is the open question.<\/p>\n\n\n\n<p><strong>Key takeaways:<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Model-native design beats generic wrappers.<\/strong> Building around V4&#8217;s cache pricing, reasoning stream, and Flash\/Pro split produces a tool that feels purpose-built rather than retrofit.<\/li>\n\n\n\n<li><strong>Sub-agent fanout is becoming table stakes.<\/strong> RLM&#8217;s 1-16 V4 Flash workers at ~1\/3 the cost of equivalent Pro work shows the economic case for parallel cheap agents over single expensive calls.<\/li>\n\n\n\n<li><strong>Loop protection and context compression matter more than features.<\/strong> The unglamorous work \u2014 stopping the agent at the third repeat, shrinking tool outputs before paying for summarization \u2014 is what separates a usable tool from an expensive toy.<\/li>\n\n\n\n<li><strong>Solo developers + AI-assisted coding can ship category-relevant tools fast.<\/strong> A patent law student with a music degree shipping a Rust-based Claude Code competitor in months is the more interesting story than the stars themselves.<\/li>\n\n\n\n<li><strong>The Plan \/ Agent \/ YOLO mode hierarchy<\/strong> with explicit approval gates is becoming the standard safety pattern for terminal coding agents \u2014 and the recent YOLO Git fix shows why permission rigor still requires active maintenance.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Related References<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>GitHub:<\/strong> <a href=\"https:\/\/github.com\/Hmbown\/DeepSeek-TUI\" target=\"_blank\" rel=\"noopener\" title=\"\">Hunter Bound&#8217;s DeepSeek TUI repository (handle: Bound)<\/a><\/li>\n\n\n\n<li><strong>Ratatui<\/strong> \u2014 <a href=\"https:\/\/ratatui.rs\/\" target=\"_blank\" rel=\"noopener\" title=\"\">the Rust TUI library powering the interface<\/a><\/li>\n\n\n\n<li><strong>Related Glasp readings on agentic coding patterns<\/strong>: <a href=\"https:\/\/glasp.co\/youtube\/c68Rqn8PriE\">How I Use 10 AI Agents in Claude Code to Build Features Faster<\/a> and <a href=\"https:\/\/glasp.co\/youtube\/P60LqQg1RH8\">Stop Using Claude Code Like This (Use Sub-Agents Instead)<\/a><\/li>\n\n\n\n<li><strong>DeepSeek API platform<\/strong>: <code><a href=\"https:\/\/platform.deepseek.com\/sign_in\" target=\"_blank\" rel=\"noopener\" title=\"\">platform.deepseek.com<\/a><\/code><\/li>\n\n\n\n<li><strong>MCP spec<\/strong>: <code><a href=\"https:\/\/github.com\/modelcontextprotocol\/modelcontextprotocol\" target=\"_blank\" rel=\"noopener\" title=\"\">modelcontextprotocol.io<\/a><\/code><\/li>\n\n\n\n<li><strong>Related Glasp reading on agentic coding patterns<\/strong>: <a href=\"https:\/\/glasp.co\/youtube\/c68Rqn8PriE\">How I Use 10 AI Agents in Claude Code<\/a> \u2014 the RLM sub-agent fan-out pattern in DeepSeek TUI maps directly onto what&#8217;s described here for Claude Code.<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>DeepSeek TUI is an open-source terminal coding agent built around DeepSeek V4, created by patent law student Hunter Bound. It hit GitHub trending with 10K+ stars overnight, offering Claude Code-style functionality at a fraction of the cost. With dual-binary Rust architecture, RLM parallel sub-agents, MCP support, and three safety modes, it&#8217;s a serious model-native alternative.<\/p>\n","protected":false},"author":1,"featured_media":8357,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,18,13,7],"tags":[],"class_list":["post-8356","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai","category-education","category-quantum-and-u","category-quantum-mindset-programme"],"aioseo_notices":[],"featured_image_src":"https:\/\/meta-quantum.today\/wp-content\/uploads\/2026\/05\/DeepSeek-TUI-The-Definitive-Setup-and-Agent-Workflow-Guide-scaled.jpg","featured_image_src_square":"https:\/\/meta-quantum.today\/wp-content\/uploads\/2026\/05\/DeepSeek-TUI-The-Definitive-Setup-and-Agent-Workflow-Guide-scaled.jpg","author_info":{"display_name":"coffee","author_link":"https:\/\/meta-quantum.today\/?author=1"},"rbea_author_info":{"display_name":"coffee","author_link":"https:\/\/meta-quantum.today\/?author=1"},"rbea_excerpt_info":"DeepSeek TUI is an open-source terminal coding agent built around DeepSeek V4, created by patent law student Hunter Bound. It hit GitHub trending with 10K+ stars overnight, offering Claude Code-style functionality at a fraction of the cost. With dual-binary Rust architecture, RLM parallel sub-agents, MCP support, and three safety modes, it's a serious model-native alternative.","category_list":"<a href=\"https:\/\/meta-quantum.today\/?cat=15\" rel=\"category\">AI<\/a>, <a href=\"https:\/\/meta-quantum.today\/?cat=18\" rel=\"category\">Education<\/a>, <a href=\"https:\/\/meta-quantum.today\/?cat=13\" rel=\"category\">Quantum and U<\/a>, <a href=\"https:\/\/meta-quantum.today\/?cat=7\" rel=\"category\">Quantum Mindset Programme<\/a>","comments_num":"0 comments","_links":{"self":[{"href":"https:\/\/meta-quantum.today\/index.php?rest_route=\/wp\/v2\/posts\/8356","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/meta-quantum.today\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meta-quantum.today\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meta-quantum.today\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/meta-quantum.today\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8356"}],"version-history":[{"count":5,"href":"https:\/\/meta-quantum.today\/index.php?rest_route=\/wp\/v2\/posts\/8356\/revisions"}],"predecessor-version":[{"id":8362,"href":"https:\/\/meta-quantum.today\/index.php?rest_route=\/wp\/v2\/posts\/8356\/revisions\/8362"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/meta-quantum.today\/index.php?rest_route=\/wp\/v2\/media\/8357"}],"wp:attachment":[{"href":"https:\/\/meta-quantum.today\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8356"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meta-quantum.today\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8356"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meta-quantum.today\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8356"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}