第 2026-05-07 期
API · 在线
DeepSeek TUI
深度求索 · 终端智能体
Section 01 · 安装

安装 Install

选择下方适合你平台的安装方式——首次加载时会自动检测。所有方式安装的都是同一个二进制文件: 一个静态链接的 deepseek 可执行文件,交互使用时调用 TUI,同时暴露doctormcpserveeval 等子命令。

RecommendedMethod 01

Cargo (recommended)

Cargo · 推荐
Prereq: Rust 1.88+ — install via rustup.rs if needed
# Install the dispatcher (provides `deepseek`)
cargo install deepseek-tui-cli --locked

# Optional: also install the raw TUI binary (`deepseek-tui`)
cargo install deepseek-tui --locked

# Set your API key (one-time)
export DEEPSEEK_API_KEY=sk-...
echo 'export DEEPSEEK_API_KEY=sk-...' >> ~/.zshrc

# Run it
deepseek
Method 02

npm wrapper

npm 包
Prereq: Node.js 18+
npm install -g deepseek-tui

# Provides both binaries on PATH:
deepseek          # canonical dispatcher
deepseek-tui      # raw TUI binary
Method 03

Pre-built binary

二进制
Prereq: Apple Silicon (arm64) or Intel (x64). Releases ship raw binaries — no archive to extract.
# Apple Silicon
curl -fsSL -o deepseek \
  https://github.com/Hmbown/deepseek-tui/releases/latest/download/deepseek-macos-arm64
chmod +x deepseek
xattr -d com.apple.quarantine deepseek 2>/dev/null || true
sudo mv deepseek /usr/local/bin/

# Intel
curl -fsSL -o deepseek \
  https://github.com/Hmbown/deepseek-tui/releases/latest/download/deepseek-macos-x64
chmod +x deepseek
xattr -d com.apple.quarantine deepseek 2>/dev/null || true
sudo mv deepseek /usr/local/bin/

# Verify checksum (optional but recommended)
curl -fsSL -O https://github.com/Hmbown/deepseek-tui/releases/latest/download/deepseek-artifacts-sha256.txt
shasum -a 256 -c deepseek-artifacts-sha256.txt --ignore-missing

deepseek
Method 04

Homebrew

Homebrew
Prereq: Homebrew on macOS or Linux; installs the dispatcher and companion TUI from the official Hmbown tap.
brew tap Hmbown/deepseek-tui
brew install deepseek-tui

deepseek --version
deepseek
Method 05

Docker

Docker
Prereq: Dockerfile ships with the repo (multi-arch buildx). No prebuilt image is published to a registry yet.
git clone https://github.com/Hmbown/deepseek-tui
cd deepseek-tui

# Build for your local arch
docker build -t deepseek-tui .

# Or multi-arch via buildx
docker buildx build --platform linux/amd64,linux/arm64 -t deepseek-tui .

# Run interactively, mounting your config + a project
docker run --rm -it \
  -e DEEPSEEK_API_KEY=$DEEPSEEK_API_KEY \
  -v ~/.deepseek:/home/deepseek/.deepseek \
  -v "$PWD:/work" -w /work \
  deepseek-tui
Method 06

Build from source

源码编译
Prereq: Rust 1.88+ and a git checkout — useful for hacking on the workspace itself.
git clone https://github.com/Hmbown/deepseek-tui
cd deepseek-tui

# Builds both `deepseek` and `deepseek-tui` into ./target/release/
cargo build --release --locked

# Run without installing
./target/release/deepseek

# Or install both binaries from your local checkout
cargo install --path crates/cli --locked   # provides `deepseek`
cargo install --path crates/tui --locked   # provides `deepseek-tui`

国内镜像安装 中国大陆专用

npmmirror 镜像

将 npm 注册表切换至国内镜像,然后全局安装:

npm config set registry https://registry.npmmirror.com
npm install -g deepseek-tui

Tuna Cargo 镜像

~/.cargo/config.toml 中添加以下配置,即可使用清华 Tuna 源:

[source.crates-io]
replace-with = "tuna"

[source.tuna]
registry = "sparse+https://mirrors.tuna.tsinghua.edu.cn/crates.io-index/"

配置完成后运行 cargo install deepseek-tui-cli --locked 即可(提供 deepseek 命令)。

国内 API 访问

默认 https://api.deepseek.com 在国内通常可直连。 网络不通时,可通过 deepseek-cn provider 或自定义 base_url 切换至替代节点:

# ~/.deepseek/config.toml
[api]
provider = "deepseek-cn"
# 或:
# base_url = "https://<你的节点>"

也可通过环境变量 DEEPSEEK_BASE_URL 设置。

安装之后 下一步

  1. 获取密钥

    在 platform.deepseek.com 注册

    注册后会获得一个 sk-... 格式的 API 密钥。粘贴一次后, deepseek auth 会将其存储在 ~/.deepseek/config.toml

  2. 运行诊断

    验证环境

    deepseek doctor 会检查密钥、网络连通性、沙箱可用性、 MCP 服务器,并将报告写入 ~/.deepseek/doctor.log

  3. 试一试

    第一个提示

    cd 到某个项目目录,运行 deepseek, 然后提问:"这个代码库是做什么的?" Plan 模式默认只读——按Tab 切换到 Agent 模式。

配置文件 · Config

文件存放位置

所有配置存放在 ~/.deepseek/ 目录下。项目级别的覆盖通过仓库根目录的.deepseek/ 等项目级配置实现。

~/.deepseek/
├── config.toml          # API 密钥、模型、钩子、配置集
├── mcp.json             # MCP 服务器定义
├── skills/              # 用户技能(每个含 SKILL.md)
├── sessions/            # 检查点 + 离线队列
├── tasks/               # 后台任务存储
└── audit.log            # 凭证 / 审批 / 提权审计日志

# 项目级别
./.deepseek/             # 项目级配置(可选)