
DeepSeek TUI (CodeWhale): A Free, Open-Source Claude Code Alternative Built in Rust
What if you could have a terminal coding agent like Claude Code, but open source, self-hostable, and potentially free to run? That’s what DeepSeek TUI is. The project has since been renamed CodeWhale, but the tool, the commands, and the idea are the same. In this guide I’ll walk through what it is, why it being built in Rust matters, how to install it, and how I actually use it on real projects.
If you’ve used Claude Code or Codex CLI, you already know the concept: an AI agent that lives in your terminal, reads your files, edits code, runs shell commands, and works through multi-step tasks on its own. DeepSeek TUI does all of that, built from the ground up in Rust.
What is DeepSeek TUI?
DeepSeek TUI is an open-source terminal coding agent built on top of DeepSeek’s V4 family of models. The codebase is about 95% Rust and MIT licensed. It runs the same agentic loop as Claude Code or Codex: read the project, plan, call tools, edit files, run commands, check the result, repeat. The difference is that you control the model, you control the API key, and the whole tool is open source.
By default it runs DeepSeek V4 Pro, which has a 1 million token context window and a built-in thinking mode. DeepSeek’s API pricing is a small fraction of what you’d pay per token for the big closed models.
Why being built in Rust actually matters
This isn’t just a bragging point. Tools like Claude Code run on Node.js, so every launch loads a pile of npm packages and uses a noticeable amount of memory before you’ve typed anything. DeepSeek TUI compiles to a single native binary: no runtime, no node_modules folder eating disk space. The interface is built with Rust’s terminal UI tooling, which is why it feels as snappy as tools like lazygit.
There’s a security benefit too. It uses each operating system’s native sandbox:
- Linux: Landlock, a kernel-level sandboxing mechanism
- macOS: Seatbelt, Apple’s sandbox profiles
- Windows: AppContainer and restricted tokens
So when the agent runs a shell command, it doesn’t get your full user permissions by default. When you’re letting an AI execute code on its own, that matters.
The three modes: Plan, Agent, and YOLO
Before installing, understand the modes, because they decide how much freedom the agent has. You switch between them with Tab and Shift+Tab.
- Plan mode: the agent reads your codebase and drafts a plan before touching anything. You review it, then approve. Best for big refactors.
- Agent mode (default): the agent asks for approval before each significant action, like writing a file or running a command. You stay in control at every step.
- YOLO mode: the agent approves everything itself. Fast, but only use it in a trusted environment. The name is a warning.
How to install DeepSeek TUI
The quickest route is npm. You need Node.js 18 or newer. This command downloads the pre-built Rust binary for your platform:
npm install -g deepseek-tuiThen launch it:
deepseek-tuiOn first launch it asks for an API key. You can also run deepseek-tui login to set it up front, or export the key as an environment variable. To get a key, create an account at platform.deepseek.com and generate one.
Once you’re set up, run the built-in health check. It verifies your API key, config path, sandbox settings, and model availability:
deepseek-tui doctorRunning it for free with NVIDIA NIM
This is the part most people don’t know about. NVIDIA hosts both DeepSeek V4 Pro and V4 Flash on its NIM platform, and the developer tier is free, with no credit card and no expiry, just rate limits. DeepSeek TUI has an NVIDIA NIM provider built in, so you only need to add your NVIDIA key and pick the model. I cover the full setup step by step in How to Run DeepSeek TUI for Free with NVIDIA NIM.
Configuration settings worth getting right
The config file lives at ~/.deepseek/config.toml, and the project repo includes a fully commented example. Three settings matter most:
- Default model: V4 Pro for heavy reasoning, V4 Flash for speed.
- Sandbox mode: workspace-write. The agent can only read and write inside your current project folder, nothing outside it.
- Approval policy: on-request. It asks before any risky action.
If you only change one thing, make it the sandbox mode. That’s what keeps an AI agent from wandering around the rest of your machine.
Using it on a real project
The first thing I use it for is getting oriented in a codebase. I open the project folder, launch deepseek-tui, and ask:
Explain the overall architecture of this project. What does each major directory do?You can watch it make file-read and grep tool calls against your actual source files and then put together a clear explanation. No uploading files and no copy-pasting code. It reads the project the way a new developer would on day one, just in seconds.
Shortcuts you’ll use every day
F1: help overlayCtrl+K: command palette (shows everything the agent can do)Esc: cancel the current actionTab/Shift+Tab: cycle Plan, Agent, and YOLO@path/to/file: attach a file to your message/models: switch models on the fly/compact: summarize and compress the context on long sessions
DeepSeek TUI vs Claude Code
- Cost: DeepSeek TUI is very cheap, or free through NVIDIA NIM. Claude Code uses Anthropic’s API pricing or a subscription.
- License: DeepSeek TUI is fully open source (MIT). Claude Code is not.
- Runtime: a native Rust binary versus Node.js.
- MCP: both support it.
- Context: 1 million tokens with V4 Pro versus 200,000 with Claude Sonnet.
To be fair, Claude Code still has the more mature ecosystem and tighter IDE integration. But DeepSeek TUI is genuinely capable and actively developed, and once you factor in the free NVIDIA tier, the cost argument is hard to ignore. Because it’s open source, you can also fork it or point it at a different provider. You’re not locked in.
FAQ
Is DeepSeek TUI free?
The tool itself is free and open source. You pay for the model API, which is very cheap with DeepSeek, or nothing at all if you use NVIDIA NIM’s free developer tier.
Is DeepSeek TUI the same as CodeWhale?
Yes. The project was renamed CodeWhale after launch. The install command and workflow covered here are the same.
Can it run models other than DeepSeek?
No. It’s built specifically for DeepSeek models. Alternative endpoints like NVIDIA NIM let you reach the same DeepSeek models through different infrastructure.