DeepSeek CLI
An unofficial terminal UI and CLI for the DeepSeek platform.
Chat with DeepSeek models directly from your terminal. The assistant can read and write files, run shell commands, search the web, manage tasks, and coordinate sub-agents — all with configurable approval gating.
Not affiliated with DeepSeek Inc.
Getting Started
1. Install
Choose one of:
# From crates.io (requires Rust 1.85+)
# Or build from source
# binary is at ./target/release/deepseek
Prebuilt binaries are also available on GitHub Releases.
2. Set your API key
Get a key from platform.deepseek.com, then:
On first run, the TUI can prompt for your API key and save it to ~/.deepseek/config.toml. You can also create the file manually:
# ~/.deepseek/config.toml
= "YOUR_DEEPSEEK_API_KEY" # must be non‑empty
= "deepseek-v3.2" # optional
= false # optional
= 3 # optional (1‑20)
Alternatively, run deepseek and the onboarding wizard will prompt you to enter and save the key.
3. Run
On first launch the TUI opens in Agent mode. Press Tab to switch modes, F1 or type /help to see all commands, and Esc to cancel a running request.
4. Optional setup
# Bootstrap MCP server config and skills templates
# Verify your environment
Keyboard Shortcuts
| Key | Action |
|---|---|
Enter |
Send message |
Alt+Enter / Ctrl+J |
Insert newline |
Tab |
Cycle modes (Plan / Agent / YOLO) |
Esc |
Cancel request / clear input |
Ctrl+C |
Cancel request or exit |
Ctrl+R |
Search past sessions |
F1 or Ctrl+/ |
Toggle help overlay |
PageUp / PageDown |
Scroll transcript |
Alt+Up / Alt+Down |
Scroll transcript (small) |
l (empty input) |
Open last message in pager |
Modes
Press Tab to cycle modes: Plan -> Agent -> YOLO -> Plan.
| Mode | Description | Approvals |
|---|---|---|
| Plan | Design-first prompting; produces a plan before implementing | Manual for writes and shell |
| Agent | Multi-step autonomous tool use | Auto-approve file writes, manual for shell |
| YOLO | Full auto-approve (use with caution) | All tools auto-approved |
Normal mode is also available (chat-only with manual approval for everything) and can be selected via Esc from Agent mode or /set mode normal.
Override approval behavior at runtime: /set approval_mode auto|suggest|never.
Tools
The model has access to 25+ tools across these categories:
File Operations
list_dir/read_file/write_file/edit_file— basic file I/O within the workspaceapply_patch— apply unified diffs with fuzzy matchinggrep_files/file_search— search files by regex or name
Shell Execution
exec_shell— run commands with timeout support and background executionexec_shell_wait/exec_shell_interact— wait on or send input to running commands
Web
web.run— multi-command browser (search / open / click / find / screenshot / image_query) with citation supportweb_search— quick DuckDuckGo search when citations are not needed
Task Management
todo_write— create and track task lists with statusupdate_plan— structured implementation plansnote— persistent cross-session notes
Sub-Agents
agent_spawn/agent_swarm— launch background agents or dependency-aware swarmsagent_result/agent_list/agent_cancel— manage running agents
Structured Data
weather/finance/sports/time/calculator
Interaction
request_user_input— ask the user structured or multiple-choice questionsmulti_tool_use.parallel— execute multiple read-only tools in parallel
All file tools respect the --workspace boundary unless /trust is enabled (YOLO enables trust automatically). MCP tools execute without TUI approval prompts, so only enable servers you trust.
Configuration
The TUI stores its config at ~/.deepseek/config.toml:
= "sk-..."
= "deepseek-reasoner" # optional
= false # optional
= 3 # optional (1-20)
Environment Variables
| Variable | Purpose |
|---|---|
DEEPSEEK_API_KEY |
API key (overrides config file) |
DEEPSEEK_BASE_URL |
API endpoint (default: https://api.deepseek.com) |
DEEPSEEK_PROFILE |
Select a [profiles.<name>] section from config |
DEEPSEEK_CONFIG_PATH |
Override config file location |
Additional overrides: DEEPSEEK_MCP_CONFIG, DEEPSEEK_SKILLS_DIR, DEEPSEEK_NOTES_PATH, DEEPSEEK_MEMORY_PATH, DEEPSEEK_ALLOW_SHELL, DEEPSEEK_MAX_SUBAGENTS.
See config.example.toml and docs/CONFIGURATION.md for the full reference.
Examples
# Interactive chat (default)
# One-shot prompt (non-interactive, prints and exits)
# Agentic execution with auto-approve
# Resume latest session
# Work on a specific project directory
# Review staged git changes
# List saved sessions
# Shell completions
Troubleshooting
| Problem | Fix |
|---|---|
| No API key | Set DEEPSEEK_API_KEY or run deepseek to complete onboarding |
| Config not found | Check ~/.deepseek/config.toml (or DEEPSEEK_CONFIG_PATH) |
| Wrong region | Set DEEPSEEK_BASE_URL to https://api.deepseeki.com (China) |
| Session issues | Run deepseek sessions then deepseek --resume latest |
| Skills missing | Run deepseek setup --skills (add --local for workspace-local) |
| MCP tools missing | Run deepseek mcp init, then restart |
| Sandbox errors (macOS) | Run deepseek doctor to confirm sandbox availability |
Documentation
Development
See CONTRIBUTING.md for detailed guidelines.
License
MIT
DeepSeek is a trademark of DeepSeek Inc. This is an unofficial, community-driven project.