<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>CLI on KnightLi Blog</title>
        <link>https://knightli.com/en/tags/cli/</link>
        <description>Recent content in CLI on KnightLi Blog</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en</language>
        <lastBuildDate>Sat, 16 May 2026 22:41:41 +0800</lastBuildDate><atom:link href="https://knightli.com/en/tags/cli/index.xml" rel="self" type="application/rss+xml" /><item>
        <title>DeepSeek-TUI: Turning DeepSeek V4 into a Terminal Coding Agent</title>
        <link>https://knightli.com/en/2026/05/16/deepseek-tui-terminal-coding-agent/</link>
        <pubDate>Sat, 16 May 2026 22:41:41 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/05/16/deepseek-tui-terminal-coding-agent/</guid>
        <description>&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/Hmbown/DeepSeek-TUI&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;DeepSeek-TUI&lt;/a&gt; is an open source project that brings DeepSeek V4 into terminal-based development workflows. It is not just a chat wrapper. It is closer to a &amp;ldquo;command-line coding agent&amp;rdquo; like Claude Code or Codex CLI: it can read files, edit code, run commands, call tools, and keep working through tasks in a TUI.&lt;/p&gt;
&lt;p&gt;If you already switch between an editor and a terminal, the value of this kind of tool is straightforward: you do not need to copy code back and forth into a web chat window, and you do not need to manually describe the whole project structure. You give it a task, and it can read context from the current workspace, plan steps, make changes, then return the result for your review.&lt;/p&gt;
&lt;h2 id=&#34;it-solves-the-entry-point-problem-for-deepseek&#34;&gt;It Solves the Entry Point Problem for DeepSeek
&lt;/h2&gt;&lt;p&gt;DeepSeek models already provide strong reasoning and coding capabilities, but model capability needs an engineering layer before it can land in real development workflows.&lt;/p&gt;
&lt;p&gt;Web chat is suitable for asking questions, but not for long-running project edits. APIs are suitable for system integration, but individual developers still need to build tool calling, context management, file operations, and permission control themselves. DeepSeek-TUI tries to fill this layer: it wraps DeepSeek V4 into an Agent that can work inside the terminal.&lt;/p&gt;
&lt;p&gt;According to the project description, its main capabilities include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A terminal TUI;&lt;/li&gt;
&lt;li&gt;Conversation and task execution for DeepSeek V4;&lt;/li&gt;
&lt;li&gt;Tool calling and file operations;&lt;/li&gt;
&lt;li&gt;1M context support;&lt;/li&gt;
&lt;li&gt;Auto mode;&lt;/li&gt;
&lt;li&gt;Sub-agents;&lt;/li&gt;
&lt;li&gt;Sandboxed execution;&lt;/li&gt;
&lt;li&gt;A persistent task queue.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Together, these features are not aimed at making the model sound more human. They are aimed at making the model easier to bring into the development environment.&lt;/p&gt;
&lt;h2 id=&#34;a-tui-fits-long-tasks-better-than-plain-cli-text&#34;&gt;A TUI Fits Long Tasks Better Than Plain CLI Text
&lt;/h2&gt;&lt;p&gt;Many AI CLI tools start with plain text interaction: enter a prompt, wait for output, then copy commands or add more context. This is simple, but longer tasks quickly become messy.&lt;/p&gt;
&lt;p&gt;The advantage of a TUI is that it can place conversations, files, execution results, and task status in a more stable interface. For a coding Agent, that matters. A code task is rarely a single question and answer. It often includes:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Understanding the project structure;&lt;/li&gt;
&lt;li&gt;Finding relevant files;&lt;/li&gt;
&lt;li&gt;Editing code;&lt;/li&gt;
&lt;li&gt;Running tests or commands;&lt;/li&gt;
&lt;li&gt;Fixing issues based on errors;&lt;/li&gt;
&lt;li&gt;Summarizing changes.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If the interface is only a stream of logs, it is hard for the user to see where the Agent is in the process. A TUI at least provides a better place to observe and take over.&lt;/p&gt;
&lt;h2 id=&#34;auto-mode-is-best-for-tasks-with-clear-boundaries&#34;&gt;Auto Mode Is Best for Tasks with Clear Boundaries
&lt;/h2&gt;&lt;p&gt;The Auto mode mentioned by DeepSeek-TUI is best for tasks with clear boundaries. For example: fixing a small bug, adding a script, changing a configuration, organizing a set of documents, or implementing a local feature.&lt;/p&gt;
&lt;p&gt;These tasks have something in common: the goal is clear, the verification method is clear, and the impact scope is controllable. The Agent can inspect files, edit files, run commands, and then hand the result back to the user for confirmation.&lt;/p&gt;
&lt;p&gt;But Auto mode should not mean unlimited permission. In real projects, file deletion, large-scale refactors, database migrations, and deployment commands should all require explicit confirmation. The efficiency of coding Agents comes from automation, but so does the risk. The more a tool can execute commands, the more it needs sandboxing, permission boundaries, and human review.&lt;/p&gt;
&lt;h2 id=&#34;sub-agents-matter-because-they-split-tasks&#34;&gt;Sub-Agents Matter Because They Split Tasks
&lt;/h2&gt;&lt;p&gt;Sub-agents are not a new concept, but they are useful in coding scenarios.&lt;/p&gt;
&lt;p&gt;A moderately complex task usually requires several kinds of work at the same time: someone reads the code, someone changes the implementation, someone checks tests, and someone organizes documentation. Traditional multi-agent systems often feel ornamental because they have no real tools or real workspace; they only discuss inside a conversation.&lt;/p&gt;
&lt;p&gt;If sub-agents can work with the file system, command execution, and task queues, they become more like a task decomposition mechanism. For example, one sub-agent can analyze dependencies, another can modify a specific module, and the main agent can integrate the result. This can reduce the problem of putting too much unrelated information into one context.&lt;/p&gt;
&lt;p&gt;Of course, sub-agents also add cost: more tokens, more complex state, and responsibility boundaries that are harder to track. They are better suited to medium-complexity tasks and above, not necessarily every small edit.&lt;/p&gt;
&lt;h2 id=&#34;1m-context-is-not-magic-but-it-helps-with-projects&#34;&gt;1M Context Is Not Magic, but It Helps with Projects
&lt;/h2&gt;&lt;p&gt;1M context sounds exaggerated, but in coding scenarios it is not just a marketing number.&lt;/p&gt;
&lt;p&gt;The context of a real codebase is fragmented: README files, configuration files, type definitions, tests, call chains, historical conventions, and error logs can all affect one change. Longer context can reduce the problem of editing after seeing only a local fragment, and it can help the model retain more project constraints.&lt;/p&gt;
&lt;p&gt;Still, longer context does not automatically mean better judgment. Code tasks still need retrieval, filtering, and verification. Putting an entire project into context is not necessarily better than reading the relevant files precisely. A good coding Agent should treat long context as a buffer, not as a shortcut that replaces engineering judgment.&lt;/p&gt;
&lt;h2 id=&#34;who-it-is-best-for&#34;&gt;Who It Is Best For
&lt;/h2&gt;&lt;p&gt;DeepSeek-TUI is better suited to several groups:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Developers who want to use DeepSeek for coding tasks in the terminal;&lt;/li&gt;
&lt;li&gt;People who do not want to build tool calling and file operation frameworks themselves;&lt;/li&gt;
&lt;li&gt;Users familiar with Claude Code or Codex CLI who want to try a DeepSeek-based entry point;&lt;/li&gt;
&lt;li&gt;People who need local project context instead of only asking about code snippets in a web page;&lt;/li&gt;
&lt;li&gt;Developers who want to put AI coding workflows into a command-line environment.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you only occasionally ask how to write a function, web chat is enough. If you want the model to participate directly in project edits, a terminal Agent becomes more meaningful.&lt;/p&gt;
&lt;h2 id=&#34;risks-to-watch&#34;&gt;Risks to Watch
&lt;/h2&gt;&lt;p&gt;There are three things to watch most closely with this kind of tool.&lt;/p&gt;
&lt;p&gt;The first is permissions. As long as a tool can read and write files or execute commands, you need to know what it can access by default, whether it can delete files, whether it can access the network, and whether dangerous commands require confirmation.&lt;/p&gt;
&lt;p&gt;The second is rollback. Before using it, it is best to keep the Git working tree clean, so every Agent change can be clearly seen through &lt;code&gt;git diff&lt;/code&gt;. Do not let an Agent automatically edit a project while many unrelated changes are already uncommitted.&lt;/p&gt;
&lt;p&gt;The third is verification. Code written by an Agent does not mean the task is complete. Tests, builds, linting, and human review still need to remain. AI coding tools can speed up progress, but they cannot replace final engineering confirmation.&lt;/p&gt;
&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;The significance of DeepSeek-TUI is not that it adds another chat client. It puts DeepSeek V4 into a terminal environment that is closer to real development work.&lt;/p&gt;
&lt;p&gt;For developers, model capability is only the first step. The real experience depends on whether it can read a project, safely edit files, run verification commands, maintain state in long tasks, and let the user take over at any time.&lt;/p&gt;
&lt;p&gt;If you want to use DeepSeek for daily code changes, project reading, and automated development tasks, DeepSeek-TUI is worth watching. The direction is also clear: AI coding tools are moving from &amp;ldquo;answering code questions&amp;rdquo; to &amp;ldquo;participating in project execution.&amp;rdquo;&lt;/p&gt;
</description>
        </item>
        <item>
        <title>Drop MCP? Why CLI Is Becoming the Default Tool Layer for Agents</title>
        <link>https://knightli.com/en/2026/04/10/mcp-vs-cli-for-agents/</link>
        <pubDate>Fri, 10 Apr 2026 21:55:12 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/04/10/mcp-vs-cli-for-agents/</guid>
        <description>&lt;p&gt;Over the last year, debates about agent toolchains have increasingly centered on one question:&lt;/p&gt;
&lt;p&gt;Does MCP (Model Context Protocol) make tool calling simpler, or does it make simple tasks more complex?&lt;/p&gt;
&lt;p&gt;For most day-to-day engineering tasks, CLI is becoming the more practical default.&lt;/p&gt;
&lt;h2 id=&#34;cost-gap-is-not-a-ux-issue-but-an-order-of-magnitude-issue&#34;&gt;Cost gap is not a UX issue, but an order-of-magnitude issue
&lt;/h2&gt;&lt;p&gt;The biggest practical pressure in MCP is token overhead.&lt;/p&gt;
&lt;p&gt;In common scenarios, MCP often has to load large tool schemas before actual execution. Using a GitHub MCP Server as an example, initialization alone can consume tens of thousands of tokens. For long tasks, this directly squeezes context budget.&lt;/p&gt;
&lt;p&gt;Community benchmarks keep pointing to the same conclusion:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Single MCP calls commonly cost several to dozens of times more than CLI&lt;/li&gt;
&lt;li&gt;Retry recovery is also more expensive (reconnect plus context reload)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is not just &amp;ldquo;a little slower.&amp;rdquo; It scales into API cost, latency, and reliability issues.&lt;/p&gt;
&lt;h2 id=&#34;why-models-are-naturally-better-at-cli&#34;&gt;Why models are naturally better at CLI
&lt;/h2&gt;&lt;p&gt;A frequently overlooked fact is training distribution.&lt;/p&gt;
&lt;p&gt;LLMs have seen massive amounts of terminal text during training: commands, outputs, errors, scripts, and man pages. In other words, CLI interaction is already close to the model&amp;rsquo;s native input pattern.&lt;/p&gt;
&lt;p&gt;By contrast, MCP&amp;rsquo;s JSON-RPC and tool schema style became widespread only in recent years. Models can learn it, but familiarity and compression efficiency are often still weaker than long-established CLI patterns.&lt;/p&gt;
&lt;p&gt;That also explains why, in many cases:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;for the same goal, CLI commands are shorter&lt;/li&gt;
&lt;li&gt;outputs are easier to continue reasoning over&lt;/li&gt;
&lt;li&gt;error recovery paths are more stable&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;security-and-isolation-mcp-still-has-catching-up-to-do&#34;&gt;Security and isolation: MCP still has catching up to do
&lt;/h2&gt;&lt;p&gt;MCP is not incapable of security, but its ecosystem is still early.&lt;/p&gt;
&lt;p&gt;Common concerns today include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Tool Poisoning in descriptions&lt;/li&gt;
&lt;li&gt;behavior drift (Rug Pull)&lt;/li&gt;
&lt;li&gt;same-name tool override (Shadowing)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;CLI also has security risks (injection, privilege misuse, path risks), but its process model, permission boundaries, and audit chain have been validated through decades of engineering practice. In production, that predictability matters.&lt;/p&gt;
&lt;h2 id=&#34;this-does-not-mean-mcp-has-no-value&#34;&gt;This does not mean MCP has no value
&lt;/h2&gt;&lt;p&gt;I do not think MCP should be abandoned.&lt;/p&gt;
&lt;p&gt;A more reasonable positioning is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;CLI handles the execution layer (local, low-latency, high-frequency calls)&lt;/li&gt;
&lt;li&gt;MCP handles the connection layer (remote service discovery, unified auth, audit, and multitenancy)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That is the commonly discussed hybrid architecture: &lt;code&gt;CLI + MCP Gateway&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;When integrating many remote systems and enforcing unified governance and compliance, MCP still has clear value. But for helping agents complete engineering work quickly, CLI-first usually better matches current model capability boundaries.&lt;/p&gt;
&lt;p&gt;In today&amp;rsquo;s engineering reality, CLI is closer to an agent&amp;rsquo;s working native language; MCP is better positioned as a connection protocol rather than the only execution protocol.&lt;/p&gt;
</description>
        </item>
        
    </channel>
</rss>
