project
DeepSeek-TUI - an open-source terminal programming intelligent agent, adapted for DeepSeek V4.
DeepSeek-TUI is a fully terminal-based programming agent built by Hayden Brown using Rust, specifically designed for native DeepSeek V4 series models (deepseek-v4-pro / deepseek-v4-flash)...
What is DeepSeek-TUI?
DeepSeek-TUI is a programmable intelligent agent that runs entirely in the terminal, built by Hayden Brown in Rust, and specifically designed for the DeepSeek V4 series of models.deepseek-v4-pro / deepseek-v4-flashNative design. The tool directly integrates DeepSeek's 1M token ultra-long context window and Chain-of-Thought mode into the developer workspace, supporting full-stack operations such as file reading and writing, shell command execution, Git management, web page search, and sub-agent scheduling, all through a keyboard-driven TUI interface.
Main functions of DeepSeek-TUI
-
File operations and editingSupports file reading and writing, applying patches, batch modifications, and integrates LSP diagnostics (rust-analyzer, pyright, gopls, clangd, etc.) for real-time error feedback.
-
Shell and Git executionRun shell commands and manage Git repositories directly within the terminal without switching contexts.
-
Web search and browsingBuilt-in web search and page browsing capabilities to assist in research and data collection.
-
Sub-agent schedulingSupports spawning child agents to process complex tasks in parallel, in conjunction with RLM (
rlm_queryIt can fan out 1–16deepseek-v4-flashBatch analysis of instances -
MCP protocol supportsNatively integrates the Model Context Protocol client, enabling connection to external MCP servers to extend the toolchain.
-
Thinking mode streaming output: Real-time display of the model's inference chain (Chain-of-Thought), observing how it analyzes code issues step by step.
-
Session ManagementSupports session saving/restoring (checkpoint), working directory rollback (side-git snapshot, without polluting the main repository).
.gitPersistent task queue (background tasks can survive restarts) -
Skills SystemSupports installing community skill packs from GitHub.
SKILL.mdWorkflows can be scaled without backend services. -
Real-time cost trackingStatistics on token usage, cache hit/miss ratio, and cost estimates by round and session.
-
HTTP/SSE Runtime API:pass
deepseek serve --httpProvides a headless agent workflow interface -
FIM editing toolsvia DeepSeek
/betaFill-in-the-middle endpoints enable precise code modification -
Vim Modal EditingComposer supports normal/insert modes and standard Vim keyboard shortcuts.
-
User MemoryOptional persistent note files are injected with system prompts, and preference settings are retained across sessions.
How to use DeepSeek-TUI
-
Installation tools:pass
npm install -g deepseek-tuiorcargo installOne-click installation. -
Configuration keySet the DeepSeek API Key or select a backend such as NVIDIA NIM / Fireworks.
-
Startup screenEnter in the terminal
deepseek-tuiEnter the interactive programming environment. -
Describe the taskEnter your natural language requirements into Composer, and the Agent will automatically analyze and execute them.
-
Select modeSwitch between Plan (produce a solution first), Agent (confirm step by step), or YOLO (fully automatic) according to the scenario.
-
Monitoring costsThe bottom right corner of the interface displays real-time information on token consumption and estimated costs for each round.
-
Compressed contextManual input during long sessions
/compactOr wait for automatic compression. -
Rollback operationIf the result is not satisfactory, use
/restoreorrevert_turnRevert to the previous snapshot. -
Save SessionSave automatically or manually before exiting, and resume from where you left off the next time you start the app.
Key information and usage requirements for DeepSeek-TUI
-
System RequirementsIt can run on Linux, macOS, and Windows (including ARM64).
-
Model dependencyYou need to provide your own DeepSeek V4 API Key, or connect to NVIDIA NIM / Fireworks / SGLang.
-
Network environmentFor domestic users, it is recommended to configure the TUNA Cargo image to accelerate installation.
-
Fee NoteAfter opening multiple sub-agents, the cache hit rate decreases, and the price of a missed token is 10 times that of a hit token. It is recommended to pay attention to real-time fees.
-
Version StatusThe current version is v0.8.8, which is undergoing frequent iterations. It is recommended to keep it updated.
DeepSeek-TUI's core advantages
-
Single binary zero dependencyIt is compiled into a single binary based on Rust, requires no Node.js or Python environment to run, and has an extremely lightweight deployment.
-
DeepSeek V4 native adaptationFrom the tool calling protocol and prompt word encapsulation to the streaming model, everything is a native DeepSeek design, not a generic OpenAI wrapper.
-
1M Token with Extremely Long Context: Use DeepSeek V4's million-level context windows to process large codebases, and combine them with prefix caching to reduce redundant calculations and API costs.
-
Intelligent Context CompressionWhen the context is close to the limit, it automatically summarizes the history of the conversation, retains the recent original content, and injects the summary as a prefix to avoid information truncation.
-
Three risk control modesPlan (read-only analysis), Agent (interactive with approval required), and YOLO (automatic approval execution) are available to meet the security needs of different scenarios.
-
Reasoning Intensity Grading:pass
Shift+Tabexistoff → high → maxSwitch between model inference depths to flexibly balance speed and quality; v0.8.12 adds:autoThe mode automatically selects the inference intensity based on the task type. -
Multilingual UISupports English, Japanese, Simplified Chinese (zh-Hans), and Brazilian Portuguese; automatically detects system language.
DeepSeek-TUI project address
- GitHub repository: https://github.com/Hmbown/DeepSeek-TUI
Comparison of DeepSeek-TUI with similar competitors
| Comparison Dimensions | DeepSeek-TUI | Claude Code |
|---|---|---|
| Binding Model | DeepSeek V4 (Pro / Flash) | Claude 3.5/3.7 Sonnet |
| Operating environment | Terminal TUI | Terminal TUI |
| Mind Chain Display | Native streaming output, visible in real time | The reasoning process is not displayed natively. |
| Context length | 1M Token (default is full) | 200K Token |
| Parallel Sub Agent | RLM mode, 1–16 Flash memory modules in parallel. | Native parallel sub-agents are not supported. |
| Cost strategy | Proactively reduce costs by leveraging the price difference in Flash memory | Unified billing model, no tiers |
| Cache optimization | Prefix cache-aware compression | No dedicated cache optimization |
| Work area isolation | Side-Git snapshot, press turn to roll back. | Basic Git integration, without isolated snapshots |
| Interaction mode | Plan / Agent / YOLO (three tiers) | Similar to, but without a clear definition, the YOLO fully automatic transmission. |
| Open source license | MIT Open Source | Closed-source commercial products |
| Domestic access | Supports domestic mirrors and Chinese documentation | Requires an international network environment |
Application scenarios of DeepSeek-TUI
-
Large-scale project analysis and restructuring: Load the entire codebase at once with a 1M context for global refactoring or module migration.
-
Automated code review and bug fixingScan for code issues in Plan mode, then switch to Agent/YOLO mode to fix them in batches.
-
Document generation and maintenanceAutomatically update README, API documentation, or comments based on code changes.
-
CI cleanup and dependency updatesSchedule periodic tasks via a durable task queue, such as cleaning up expired CI configurations and upgrading dependency versions.
-
Batch Parallel Inference: Use RLM to analyze multiple files or execute multiple test strategies simultaneously to accelerate decision-making.
-
Headless automated workflow:pass
deepseek serve --httpIntegrate TUI as a backend service into the internal toolchain.