📌 Quick Summary: DeepSeek TUI is an open‑source terminal coding agent written in 95% Rust. It gives you an AI assistant inside your terminal – can read/edit files, run shell commands, search the web, manage Git, and coordinate sub‑agents. With a 1M token context window and support for NVIDIA NIM’s free tier, you can run it completely for free. This guide covers installation, configuration, plan/agent/YOLO modes, sandboxing, shortcuts, and a live demo.
🤖 DeepSeek TUI – Open‑Source Terminal Coding Agent (Rust, 1M Context, Free via NVIDIA NIM)
What if you could have a terminal coding agent – something like Claude Code – but completely free to self‑host, open‑source, and built in Rust for maximum performance? That’s exactly what DeepSeek TUI is.
If you’ve used Claude Code or Codex CLI, you already understand the concept: an AI agent that lives inside your terminal, reads your files, edits code, runs shell commands, and works through multi‑step tasks autonomously. DeepSeek TUI does all of that – and it’s built from the ground up in Rust, which means it’s fast, lightweight, and has no heavy Node.js runtime dragging it down.
🎯 What is DeepSeek TUI? An open‑source terminal coding agent built on DeepSeek’s V4 family of models. 1M token context window, built‑in thinking mode, and API costs are a fraction of GPT‑4 or Claude Sonnet. MIT licensed – you can self‑host, fork, or point it at any OpenAI‑compatible API.
✨ Why Rust? (It Actually Matters)
Tools like Claude Code are built on Node.js. That means when you run them, you’re loading a bunch of npm packages and consuming significant memory just to get the process started. DeepSeek TUI compiles to a single native binary. No runtime, no node_modules folder eating your disk. The TUI itself is built using Rust’s terminal UI framework, which gives you that polished, responsive feel you see in tools like Lazy Git. The UI renders fast because Rust is fast.
There’s also a serious security angle. It uses OS‑native sandboxing:
- Linux – Landlock (kernel‑level sandboxing).
- macOS – Seatbelt (Apple’s sandbox profiles).
- Windows – AppContainer + restricted tokens.
When the agent runs a shell command, it’s not running with your full permissions by default. The sandbox restricts what it can touch. That’s a meaningful safety feature when you’re letting an AI execute code autonomously.
🎛️ Three Modes: Plan, Agent, YOLO
Before you start, understand the three modes – they determine how much autonomy the agent has.
- Plan mode (🔍) – The agent reads your codebase and drafts a plan before it does anything. You review it, then approve. Great for big refactors or anything you want to sanity check first.
- Agent mode (🤖) – Default mode. The agent asks for your approval before each significant action (writing to a file, running a shell command). You stay in control at each step.
- YOLO mode (⚡) – The agent auto‑approves everything. No prompts, no confirmations. Use this in a trusted environment when you want maximum speed. The name is intentional.
You cycle between modes with Tab and Shift+Tab inside the TUI.
📦 Installation – One Command (npm)
The quickest way is through npm. One command and you’re done:
npm install -g deepseek-tui
This ships the pre‑built Rust binary for your platform. You need Node 18 or newer – most developers already have this. Once installed, run:
deepseek-tui
On first launch, it’ll prompt for your API key. You can also run deepseek-tui login to set it up front, or export it as an environment variable. To get your API key, head to platform.deepseek.com (link in resources), create an account, and generate a key.
Other installation methods (if you don’t use npm):
- Cargo:
cargo install deepseek-tui-cli --lockedandcargo install deepseek-tui --locked(no Node needed). - Homebrew (macOS):
brew tap Hmbown/deepseek-tui && brew install deepseek-tui - Direct download: Prebuilt binaries from GitHub Releases (Linux x64/ARM64, macOS x64/ARM64, Windows x64).
- Docker:
docker run --rm -it -e DEEPSEEK_API_KEY="$DEEPSEEK_API_KEY" -v "$PWD:/workspace" -w /workspace ghcr.io/hmbown/deepseek-tui:latest
🆓 Run Completely Free with NVIDIA NIM (No API Bill)
Here’s something most people don’t know – and it might be the most exciting part of this guide. You can run DeepSeek TUI completely free, zero cost, no API bill at all. NVIDIA offers free hosted inference through their NIM platform, and both DeepSeek V4 Pro and V4 Flash are available there.
Steps:
- Sign up for the NVIDIA developer program at build.nvidia.com – it’s free, no credit card required.
- Generate an API key from the NVIDIA NIM portal.
- Point DeepSeek TUI at NVIDIA’s endpoint instead of DeepSeek’s. DeepSeek TUI has this provider built in natively – there’s a dedicated NVIDIA NIM profile right in the config.
- Set the provider, drop in your key, choose your model, and launch with the NVIDIA NIM profile.
The free tier has no expiry – only rate limits (40 requests per minute, which is generous for normal coding). Same DeepSeek V4 models, same terminal agent, completely free.
⚙️ Configuration – Key Settings
The config file lives at ~/.deepseek/config.toml. You can also create a project‑specific overlay at <workspace>/.deepseek/config.toml. The companion GitHub repo has a fully commented example. The settings that matter most:
- Default model – either
deepseek-v4-proordeepseek-v4-flash. - Sandbox mode – set to
workspace_write. The agent can only read and write inside your current project directory, nothing outside it. - Approval policy – set to
on_request(asks before any risky action). That sandbox mode setting is the one you want to get right when you’re letting an AI run shell commands on your machine. - You can also set environment variables like
DEEPSEEK_API_KEY,DEEPSEEK_BASE_URL,DEEPSEEK_PROVIDER(e.g.,nvidia-nim), etc.
🔍 Live Demo – Explaining a Codebase
I navigated into my project and launched deepseek-tui. Then I typed a prompt: “Explain the overall architecture of this project. What does each major directory do?”
Watch what happens – the agent makes read_file and glob tool calls, reading your actual source files on disk, and synthesizes a clear explanation. No file upload, no copy‑pasting code. It reads the project the same way a new developer would on day one – just in seconds.
⌨️ Keyboard Shortcuts You’ll Actually Use
- F1 – Opens the help overlay.
- Ctrl+K – Opens the command palette (surfaces everything the agent can do).
- Escape – Cancels the current action.
- Tab / Shift+Tab – Cycles between Plan / Agent / YOLO modes.
- @path – Attach a file or directory context in the composer.
- /models – Switch models on the fly.
- /compact – A lifesaver on longer sessions; summarizes and compresses your context when things get long.
- /restore – Rollback to a previous turn using side‑git snapshots (without touching your repo’s .git).
📊 DeepSeek TUI vs. Claude Code – Honest Comparison
| Feature | DeepSeek TUI | Claude Code |
|---|---|---|
| Cost (with NVIDIA NIM) | Free | Anthropic API pricing |
| Open source | ✅ MIT license | ❌ Proprietary |
| Runtime | Native Rust binary | Node.js |
| Context window | 1M tokens | 200K tokens |
| Sandboxing | OS‑native (Landlock/Seatbelt/AppContainer) | Limited |
| Self‑hostable | ✅ Yes | ❌ No |
Claude Code has a more mature ecosystem and tighter IDE integration right now – I won’t pretend otherwise. But DeepSeek TUI is genuinely capable, actively developed, and when you factor in the NVIDIA NIM free tier, the cost argument is pretty hard to ignore. And because it’s open‑source, you can contribute, fork it, or point it at a completely different model provider. You’re not locked into anything.
❓ Frequently Asked Questions
Q1: Do I need a powerful PC to run this?
A: No. The model runs in the cloud (via API). Your laptop just needs to run a terminal – even an old machine works fine.
Q2: Is NVIDIA NIM really free? Any hidden costs?
A: Yes, genuinely free. No credit card required. The free tier has no expiry – just rate limits (40 requests per minute). It’s a promotional free tier from NVIDIA.
Q3: Can I use DeepSeek TUI with other API providers?
A: Absolutely. It supports NVIDIA NIM, OpenRouter, AtlasCloud, Novita, Fireworks, generic OpenAI‑compatible endpoints, self‑hosted vLLM/SGLang, and even Ollama. Just set the provider and API key.
Q4: How do I enable sandbox mode?
A: In the config file (~/.deepseek/config.toml), set sandbox_mode = "workspace_write". The agent will then be restricted to your current project directory.
Q5: What’s the difference between Plan, Agent, and YOLO modes?
A: Plan reads and drafts a plan without changes; Agent asks for approval before each action; YOLO auto‑approves everything. Cycle with Tab / Shift+Tab.
Q6: Can I resume a session later?
A: Yes. Use deepseek resume --last to resume the most recent session, or deepseek resume <SESSION_ID> for a specific session. Sessions are saved automatically.
Q7: Where can I find the full documentation?
A: The GitHub repo (github.com/Hmbown/DeepSeek-TUI) has extensive docs – architecture, MCP, sub‑agents, skills, and more.
💡 My final advice: Install it with that one npm command. Run deepseek doctor to check your setup. Then try it on a real project. I think you’ll be surprised. Whether you’re a student, freelancer, or full‑time developer, having a terminal AI agent that costs essentially zero (or literally zero with NVIDIA NIM) is a game changer.
🔗 Resources (Plain Text – Copy Manually)
- GitHub Repo → https://github.com/Hmbown/DeepSeek-TUI
- Community Site → https://deepseek-tui.com/en
- DeepSeek API Platform → https://platform.deepseek.com/usage
- NVIDIA NIM Free Tier → https://build.nvidia.com/deepseek-ai/...
⚠️ Disclaimer: This guide is for educational purposes. Always respect API terms of service. The code you generate is yours. DeepSeek TUI is MIT licensed – use it freely.
