| Crates.io | deepseek-tui |
| lib.rs | deepseek-tui |
| version | 0.2.1 |
| created_at | 2026-01-19 18:29:36.850529+00 |
| updated_at | 2026-01-22 04:27:43.38352+00 |
| description | Unofficial DeepSeek CLI - Just run 'deepseek' to start chatting |
| homepage | |
| repository | https://github.com/Hmbown/DeepSeek-TUI |
| max_upload_size | |
| id | 2055077 |
| size | 1,448,467 |
Your AI-powered terminal companion for DeepSeek models
Unofficial terminal UI (TUI) + CLI for the DeepSeek platform — chat with DeepSeek models and collaborate with AI assistants that can read, write, execute, and plan with approval-gated tool access.
Not affiliated with DeepSeek Inc.
AGENTS.mdSKILL.md directories# Install via Cargo
cargo install deepseek-tui --locked
# Set your API key
export DEEPSEEK_API_KEY="YOUR_DEEPSEEK_API_KEY"
# Start chatting
deepseek
F1 or type /help for the in‑app command list.If anything looks off, run deepseek doctor to diagnose configuration issues.
cargo install deepseek-tui --locked
git clone https://github.com/Hmbown/DeepSeek-TUI.git
cd DeepSeek-TUI
cargo build --release
./target/release/deepseek --help
Download a prebuilt binary from GitHub Releases and put it on your PATH as deepseek.
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
api_key = "YOUR_DEEPSEEK_API_KEY" # must be non‑empty
default_text_model = "deepseek-reasoner" # optional
allow_shell = false # optional
max_subagents = 3 # optional (1‑5)
Useful environment variables:
DEEPSEEK_API_KEY (overrides api_key)DEEPSEEK_BASE_URL (default: https://api.deepseek.com; China users may use https://api.deepseeki.com)DEEPSEEK_PROFILE (selects [profiles.<name>] from the config; errors if missing)DEEPSEEK_CONFIG_PATH (override config path)DEEPSEEK_MCP_CONFIG, DEEPSEEK_SKILLS_DIR, DEEPSEEK_NOTES_PATH, DEEPSEEK_MEMORY_PATH, DEEPSEEK_ALLOW_SHELL, DEEPSEEK_MAX_SUBAGENTSSee config.example.toml and docs/CONFIGURATION.md for a full reference.
In the TUI, press Tab to cycle modes: Normal → Plan → Agent → YOLO → RLM → Duo → Normal.
| Mode | Description | Approval Behavior |
|---|---|---|
| Normal | Chat; asks before file writes or shell | Manual approval for writes & shell |
| Plan | Design‑first prompting; same approvals as Normal | Manual approval for writes & shell |
| Agent | Multi‑step tool use; asks before shell | Manual approval for shell, auto‑approve file writes |
| YOLO | Enables shell + trust + auto‑approves all tools (dangerous) | Auto‑approve all tools |
| RLM | Externalized context + REPL helpers; auto‑approves tools (best for large files) | Auto‑approve tools |
| Duo | Player‑coach autocoding with iterative validation (based on g3 paper) | Depends on phase |
Approval behavior is mode‑dependent, but you can also override it at runtime with /set approval_mode auto|suggest|never.
DeepSeek CLI exposes a comprehensive set of tools to the model across 5 categories, with 16+ individual tools available, all with approval gating based on the current mode.
list_dir – List directory contents with file/directory metadataread_file – Read UTF‑8 files from the workspacewrite_file – Create or overwrite filesedit_file – Search and replace text in filesapply_patch – Apply unified diff patches with fuzzy matchinggrep_files – Search files by regex pattern with context linesweb_search – Search the web and return concise resultsexec_shell – Run shell commands with timeout supporttodo_write – Create and update todo lists with status trackingupdate_plan – Manage structured implementation plansnote – Append persistent notes across sessionsagent_spawn – Create background sub‑agents for focused tasksagent_result – Retrieve results from sub‑agentsagent_list – List all active and completed agentsagent_cancel – Cancel running sub‑agents--workspace unless you enable /trust (YOLO enables trust automatically).web_search uses DuckDuckGo HTML results and is auto‑approved.SKILL.md directories (default: ~/.deepseek/skills). Use /skills and /skill <name>.~/.deepseek/mcp.json (supports servers and mcpServers). MCP tools currently execute without TUI approval prompts, so only enable servers you trust. See docs/MCP.md.RLM mode is designed for "too big for context" tasks: large files, whole‑doc sweeps, and big pasted blocks.
/rlm (or /aleph) enters RLM mode directly./load @path loads a file into the external context store (outside RLM mode, /load loads a saved chat JSON)./repl to enter expression mode (e.g. search("pattern"), lines(1, 80)).rlm_load, rlm_exec, rlm_status, rlm_query.rlm_query can be expensive: prefer batching and check /status if you're doing lots of sub‑queries.
Note: Duo mode is experimental and may not work correctly in all cases. Use with caution.
Duo mode implements the player‑coach autocoding paradigm for iterative development with built‑in validation:
duo_init, duo_player, duo_coach, duo_advance, duo_statusWorkflow: init → player → coach → advance → (repeat until approved)
deepseek
deepseek -p "Write a haiku about Rust"
deepseek exec --auto "Fix lint errors in the current directory"
deepseek --continue
deepseek --workspace /path/to/project
deepseek review --staged
deepseek apply patch.diff
deepseek sessions --limit 50
deepseek completions zsh > _deepseek
deepseek completions bash > deepseek.bash
deepseek completions fish > deepseek.fish
Set DEEPSEEK_API_KEY environment variable or run deepseek and complete onboarding.
Check ~/.deepseek/config.toml (or DEEPSEEK_CONFIG_PATH).
Set DEEPSEEK_BASE_URL to https://api.deepseeki.com (China).
Run deepseek sessions and try deepseek --resume latest.
Validate ~/.deepseek/mcp.json (or DEEPSEEK_MCP_CONFIG) and restart.
Ensure /usr/bin/sandbox-exec exists (comes with macOS). For other platforms, sandboxing is limited.
docs/CONFIGURATION.md – Complete configuration referencedocs/MCP.md – Model Context Protocol guidedocs/ARCHITECTURE.md – Project architecturedocs/RLM.md – RLM mode deep‑divedocs/MODES.md – Mode comparison and usageCONTRIBUTING.md – How to contribute to the projectcargo build
cargo test
cargo fmt
cargo clippy
See CONTRIBUTING.md for detailed guidelines.
MIT
DeepSeek is a trademark of DeepSeek Inc. This is an unofficial project.