DeepSeek-TUI: The Terminal Coding Agent That Exploded on GitHub (24K+ Stars, Weekly #1)
Hot on GitHub: DeepSeek-TUI is GitHub Weekly Trending #1 with over 24K stars (22K added this week alone). It's a Rust-powered terminal coding agent built around DeepSeek V4 — think Claude Code, but running DeepSeek models with a beautiful TUI, 1M-token context windows, and built-in MCP support.
If you code in a terminal and want an AI coding agent that doesn't require Node.js or Python, this is it. One binary, one command (deepseek), and you're talking to DeepSeek right in your terminal.
What Is DeepSeek-TUI?
DeepSeek-TUI is an open-source terminal user interface (TUI) application written in Rust that acts as a full-featured coding agent for DeepSeek V4 models (deepseek-v4-pro and deepseek-v4-flash). Instead of requiring a GUI or web interface, you interact with it entirely from your terminal — typing natural language requests, viewing streaming reasoning blocks, and having the agent read/edit files, run shell commands, manage git, and even spawn sub-agents.
Think of it as the terminal-native equivalent of Claude Code, but optimized for DeepSeek's model ecosystem. It was created by DeepSeek-TUI (organization on GitHub) and has become the fastest-growing DeepSeek-related open-source project of 2026.
Key Features
DeepSeek-TUI is not just another LLM chat wrapper — it's a purpose-built coding agent with a surprising depth of features:
🧠 DeepSeek V4 Native
- 1M-token context — Native support for DeepSeek V4's massive context window with automatic compaction
- Streaming reasoning blocks — Watch the model "think" in real-time as it reasons through your request
- Prefix-cache cost reporting — See exactly what you're paying per turn, including cache hit/miss breakdown
- Auto mode routing — Let the tool decide whether to use flash or pro, and how much thinking power
🛠️ Full Tool Suite
- File operations — Read, write, edit, diff files in your workspace
- Shell execution — Run commands, compile, test, deploy
- Git integration — Commit, branch, push, PR review — all from the TUI
- Web search & browse — Fetch documentation, search for solutions
- Sub-agents — Spawn parallel child agents for batch analysis
- MCP servers — Connect to Model Context Protocol servers for extended tools
- Apply-patch — Review and apply precise code changes
📋 Workflow Modes
- Plan 🔍 — Read-only investigation. The model explores your codebase and proposes a plan without making changes
- Agent 🤖 — Interactive multi-step tool use with approval gates. The default mode for safe coding assistance
- YOLO ⚡ — Auto-approve all tools in a trusted workspace. For when you're confident and want speed
🔧 Advanced
- Session save/resume — Checkpoint and resume long-running sessions. Sessions survive app restarts
- Workspace rollback — Automatic git snapshots before/after each turn. Use
/restoreorrevert_turnto undo without touching your repo's .git - Durable task queue — Background tasks survive application restarts
- LSP diagnostics — Inline error/warning surfacing after edits via rust-analyzer, pyright, TypeScript language server, gopls, clangd
- User memory — Optional persistent note file injected into the system prompt for cross-session preferences
- Localized UI — en, ja, zh-Hans, pt-BR with auto-detection
Installation Guide
DeepSeek-TUI is distributed as a single binary. No Node.js, no Python, no Docker required.
Option 1: Cargo Install (Recommended for Rust users)
If you have Rust installed:
This compiles from source. Expect a ~5 minute build on first install. The deepseek command will be available globally.
Option 2: Prebuilt Binaries (macOS / Windows)
Download from the Releases page:
- macOS (Apple Silicon):
DeepSeek-TUI_macOS.dmg— drag to Applications - Windows x64:
DeepSeek-TUI_x64.7z— extract and run
Option 3: From Source (Linux)
git clone https://github.com/DeepSeek-TUI/DeepSeek-TUI.git
cd DeepSeek-TUI
cargo build --release
./target/release/deepseek --version
First-Run Setup
On first launch, you'll be prompted for your DeepSeek API key:
Your API key is saved to ~/.deepseek/config.toml. You can also set it via environment variable:
deepseek doctor # Verify your setup
Quick Start: Your First Session
Once installed, jump right in:
deepseek
# One-shot prompt (non-interactive)
deepseek "explain how this Rust project handles error types"
# One-shot with model override
deepseek --model deepseek-v4-flash "summarize the recent commits"
# Auto mode — let the tool choose the best model + thinking level
deepseek --model auto "fix the memory leak in src/allocator.rs"
# YOLO mode — auto-approve all tool calls
deepseek --yolo "refactor this module to use builder pattern"
When you enter the interactive TUI, the interface is keyboard-driven with ratatui rendering. Here's what you'll see:
The Three Modes: Plan, Agent, YOLO
DeepSeek-TUI offers three operational modes that map to different levels of autonomy and safety:
| Mode | Icon | Behavior | Best For |
|---|---|---|---|
| Plan | 🔍 | Read-only investigation. The model explores code, proposes plans (update_plan + checklist_write), but never modifies files or runs commands. Safe for code review and architecture design. |
Code review, architecture exploration, debugging triage |
| Agent | 🤖 | Full interactive mode. Multi-step tool use with approval gates. The model outlines work via checklist_write before acting. Every edit or shell command requires your approval. Default mode. |
Daily coding, refactoring, bug fixing |
| YOLO | ⚡ | Auto-approve everything. Tools execute without confirmation. Still maintains plan and checklist for visibility. Use only in trusted workspaces or CI/CD pipelines. | CI/CD, trusted repos, automated refactoring |
Cycle between modes using Tab (or configure in ~/.deepseek/config.toml). Each mode has its own visual indicator in the TUI title bar.
Auto Mode: Smart Model + Thinking Routing
One of the standout features of DeepSeek-TUI is Auto Mode (deepseek --model auto or /model auto inside the TUI).
Here's how it works:
- Router call — Before sending your actual request, the tool makes a tiny
deepseek-v4-flashcall (no thinking) to analyze the request and context - Smart selection — The router picks a concrete model (
deepseek-v4-flashordeepseek-v4-pro) and a thinking level (off,high, ormax) - Execute — The real request goes out with the selected model and thinking level. The upstream API never sees
model: "auto" - Fallback — If the routing call fails, a local heuristic kicks in
Simple queries → Flash + no thinking (cheap & fast)
Debugging / code review → Flash + high thinking
Architecture / security review → Pro + max thinking
Cost tracking is charged against the model that actually ran. Sub-agents also inherit auto mode unless you assign them an explicit model.
Useful Commands & Shortcuts
Keyboard Shortcuts
| Key | Action |
|---|---|
| Tab | Complete / or @ entries; while running, queue draft as follow-up; otherwise cycle mode |
| Shift + Tab | Cycle reasoning effort: off → high → max |
| F1 | Searchable help overlay |
| Esc | Back / dismiss |
| Ctrl + K | Command palette |
| Ctrl + R | Resume an earlier session |
| Alt + R | Search prompt history and recover cleared drafts |
| Ctrl + S | Stash current draft |
CLI Subcommands
| Command | What It Does |
|---|---|
deepseek | Start interactive TUI session |
deepseek "prompt" | One-shot prompt (non-interactive) |
deepseek --yolo "task" | YOLO mode one-shot |
deepseek --model auto | Auto model + thinking routing |
deepseek doctor | Check setup and connectivity |
deepseek doctor --json | Machine-readable diagnostics |
deepseek models | List live API models |
deepseek sessions | List saved sessions |
deepseek resume --last | Resume most recent session |
deepseek resume <UUID> | Resume a specific session |
deepseek fork <UUID> | Fork a session at a chosen turn |
deepseek serve --http | HTTP/SSE API server for headless usage |
deepseek serve --acp | ACP stdio adapter for editors like Zed |
deepseek mcp list | List configured MCP servers |
deepseek mcp-server | Run dispatcher MCP stdio server |
deepseek pr <N> | Fetch PR and pre-seed review prompt |
DeepSeek-TUI vs Other Coding Agents
How does DeepSeek-TUI stack up against the competition? Here's an honest comparison:
| Feature | DeepSeek-TUI | Claude Code | GitHub Copilot Codex | Cursor CLI |
|---|---|---|---|---|
| Runtime | Rust binary (no runtime needed) | Node.js (npm install) | Node.js (npm install) | Node.js (npm install) |
| Model | DeepSeek V4 (Flash / Pro) | Claude (Sonnet / Opus) | GPT-4o / Claude Sonnet | By subscription |
| Context Window | 1M tokens | 200K tokens | 128K tokens | Dependent on model |
| Auto Model Routing | ✅ Built-in | ❌ | ❌ | ❌ |
| Plan / Agent / YOLO | ✅ Built-in | Limited | Limited | Basic |
| MCP Support | ✅ Native | ❌ (limited via STDIO) | ❌ | ❌ |
| LSP Diagnostics | ✅ Inline | ❌ | ❌ | Via editor |
| Session Save/Resume | ✅ | ✅ | ❌ | Basic |
| Workspace Rollback | ✅ Side-git snapshots | ❌ | ❌ | ❌ |
| Sub-agents (RLM) | ✅ Up to 16 parallel | ❌ | ❌ | ❌ |
| Cost Tracking | ✅ Per-turn breakdown | Basic | ❌ | ❌ |
| Multi-language UI | EN, JA, ZH, PT-BR | EN only | EN only | EN only |
| Price | Free + API costs | $20/mo + API costs | $10/mo included | $20/mo |
Bottom line: DeepSeek-TUI wins on features (1M context, auto routing, Plan/Agent/YOLO, MCP, LSP, sub-agents, rollback) and is completely free beyond API usage costs. The trade-off is that it's specifically for DeepSeek models — you can't use Claude or GPT directly (though you can configure custom providers).
Best Practices & Tips
1. Start in Plan Mode for Unfamiliar Code
When exploring a new codebase, use /mode plan first. Let DeepSeek explore and explain before making changes. This prevents accidental modifications and builds understanding.
2. Use Auto Mode for Daily Work
--model auto saves money and time. Simple questions get cheap Flash answers; complex tasks automatically escalate to Pro with thinking. Let the router do its job.
3. Set Up Project-Specific Config
Create .deepseek/config.toml in your workspace for project-specific settings:
default_model = "auto"
mode = "agent"
# Custom MCP server for this project
[mcp.servers.postgres]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-postgres"]
env = { DATABASE_URL = "postgresql://localhost/mydb" }
4. Master the Keyboard Shortcuts
Ctrl+K for command palette, F1 for help overlay, Tab to cycle modes. Learn these and you'll code faster than with any GUI-based AI tool.
5. Leverage Sub-Agents for Large Tasks
Need to analyze 10+ files across a project? Spawn sub-agents via /agent spawn "analyze this directory". Up to 16 parallel agents can work simultaneously.
6. Use the Durable Task Queue
Long-running tasks survive app restarts. Queue a code review, close the terminal, and pick up results later: /queue add "review all open PRs"
7. Try ACP for Editor Integration
Use DeepSeek as the agent backend in Zed editor:
{
"agent_servers": {
"DeepSeek": {
"type": "custom",
"command": "deepseek",
"args": ["serve", "--acp"],
"env": {}
}
}
}
FAQ
Is DeepSeek-TUI free?
The software itself is free and open source (MIT license). You only pay for DeepSeek API usage, which is very affordable: deepseek-v4-flash is ~$0.15/1M input tokens, deepseek-v4-pro is ~$2/1M input tokens.
Can I use it with other LLM providers?
Yes! DeepSeek-TUI supports multiple providers: DeepSeek (default), NVIDIA NIM, Fireworks AI, SGLang (self-hosted), and vLLM (self-hosted). Configure via environment variables or config file.
Does it work on Windows?
Yes, there are prebuilt binaries for Windows x64 in the Releases section.
How does workspace rollback work without touching my git history?
DeepSeek-TUI creates a side-git repository (outside your project's .git) that snapshots your workspace before and after each turn. /restore reverts to any prior snapshot without affecting your normal git history.
Can I run it headless as an API server?
Yes! deepseek serve --http starts an HTTP/SSE API server that you can integrate into CI/CD pipelines or custom tooling.
Related Articles
- UI-TARS Desktop Complete Guide: ByteDance Open-Source Multimodal AI Agent — Another top GitHub trending AI agent project
- DeepClaude: Running Claude Code on DeepSeek V4 Pro — Want Claude Code's interface with DeepSeek models?
- AgentMemory: AI Coding Agent's Persistent Memory Engine — Add persistent memory to any coding agent
- The Unreasonable Effectiveness of HTML: Why AI Coding Agents Should Output HTML — Formatting tips for AI agent output
- 9Router — Smart AI Routing Proxy — Route between AI providers with cost optimization