@d0nj/dsh-tui

中文文档
1.2.47发布于 2026/11/09MITES Module零依赖近 30 天下载 5276

Terminal UI for DeepSeek Harness: a full DSH profile in Ink.

原始使用文档
文档目录11 节
  1. Quick start
  2. Why dsh-tui
  3. Install
  4. Requirements
  5. Profile setup
  6. Run
  7. From a checkout
  8. Permission modes
  9. Development
  10. Credits
  11. License

dsh-tui

DeepSeek Harness, in your terminal.

npm license node

dsh-tui is a full terminal front end for DeepSeek Harness, not a shim over one. It installs as an ordinary DSH profile, so it boots the same host as the Web and Desktop surfaces — the same base composition, providers, credentials, plugins, settings, and tools — and draws the whole thing with Ink.

  ██████╗ ███████╗██╗  ██╗
  ██╔══██╗██╔════╝██║  ██║      DSH // CODING HARNESS
  ██║  ██║███████╗███████║
  ██║  ██║╚════██║██╔══██║      ❯ fix the flaky test
  ██████╔╝███████║██║  ██║
  ╚═════╝ ╚══════╝╚═╝  ╚═╝      ◆ the retry wrapper was racing the timeout; patched…

  ╭─ ❯ YOU ─────────────────────────────────────────────╮
  │ fix the flaky test                                  │
  ╰─────────────────────────────────────────────────────╯

  ╭─ 󰒋 larper · 󰚩 deepseek-v4.1-flash · █ max · 󰉋 ~/project · 󰊢 main ↑2 ─── 1.2M ──╮
  │ ❯ ▏                                                                          │
  ╰──────────────────────────────────────────────────────────── ctrl+s tasks ───╯

Quick start

npm install -g @deepseek-ai/dsh@latest   # the Node-hosted harness
npm install -g @d0nj/dsh-tui      # this terminal surface
dsh-tui            # launch it

That is the whole setup. The package is a real DSH plugin plus its dsh-tui/dst launcher. The first run auto-initializes the tui profile (this needs pnpm), then launches your Node-hosted harness. To register it manually in an existing profile instead: dsh plugin --profile tui add @d0nj/dsh-tui; afterwards dsh-tui and dsh --profile tui are equivalent.

Why dsh-tui

  • The real harness. Same host, providers, credentials, MCP plugins, settings, and tools as every other DSH surface. Token accounting, context pressure, and session stats come from the same projections the Web and Desktop clients use.
  • A deck that never floats. The chat owns the alternate screen and lays out as a fixed-height document: the deck is always the terminal's last rows, the transcript scrolls in place, and drag-select keeps the range highlighted for ctrl+c or right-click copy.
  • Smooth where it matters. The boot card is driven by a helper process while the host loads, then hands off to the chat card in the same spot. Full-screen frames are diffed row by row, so animations repaint only the lines that changed.
  • Built for long sessions. Tool cards with syntax-highlighted output and red/green diff bands, Claude Code-style background tasks with one /tasks sheet, live compaction feedback, /shake to prune oversized tool results, steering and message queues, and a waiting dock that keeps you informed with a spinner verb and the elapsed clock.
  • Everything DSH ships. Approvals, questions, slash commands, skills, presets, jobs, schedules, workspaces, and model/theme/effort pickers — in the terminal.
  • Batteries included. Persistent JavaScript and Python eval cells, and a real Chromium browser tool with automation tells suppressed.
  • Your setup sticks. Reasoning visibility, todo HUD, expanded tool output, and theme are remembered across launches in $DSH_HOME/tui/preferences.json.

Install

Requirements

  • Node.js 20+
  • Node.js 20+ and pnpm\n- the Node build of @deepseek-ai/dsh (npm install -g @deepseek-ai/dsh; the Desktop app runtime cannot host the terminal UI)
  • A truecolor terminal: Kitty, iTerm2, Windows Terminal, Ghostty, or WezTerm
  • Python 3.8+ only if you use Python eval cells; Chromium is downloaded on first use of the browser tool

Profile setup

dsh-tui install

This creates a minimal tui profile: the dsh-base and dsh-web-app host bundles plus the terminal surface. Nothing is copied from your other profiles. To add plugins, use the profile like any other:

dsh plugin --profile tui add <package>
# or edit ~/.dsh/profiles/tui/cordis.patch.yml

Run

dsh-tui                    # new session
dsh-tui --continue         # most recent session in this directory
dsh-tui --resume <id>      # a specific saved session
dsh-tui --model deepseek-v4.1-flash --effort max

From a checkout

bun install
bun run build
bun run install:profile
bun run start
All flags
FlagMeaning
--cwd <dir>working directory for a new session
--resume <id>open a saved session
--continueopen the most recent session for the directory
--model <model>model id or provider/model
--effort <level>reasoning effort for the selected model
--theme <name>deepseek (default), basalt, obsidian, dark, limestone, light
--symbols <preset>glyphs: nerd (default), unicode, ascii
--asciishorthand for --symbols ascii
--yoloapprove permission requests automatically
--no-splashboot without the welcome card (the loader still animates)

Permission modes

/mode follows the harness sandbox policy and applies to the current session; before the first message it applies to the next one.

ModeSandboxApprovals
/mode writeworkspace-write (default)ask outside the workspace
/mode readread-onlyask
/mode yolodanger-full-accessauto-approve

/mode without an argument shows the active policy.

Keys
KeyAction
entersend; steer the running turn while one is in flight
shift+enter / ctrl+jnew line
esccancel the turn, close a panel, or clear input
ctrl+ccancel; twice to quit
ctrl+dquit when the input is empty
ctrl+pcommand palette
ctrl+bsession panel
ctrl+s / alt+abackground tasks sheet
ctrl+vattach the clipboard image
ctrl+oexpand tool output
ctrl+tshow or hide reasoning
ctrl+lclear the screen
up / downinput history
PgUp / PgDn, wheelscroll the transcript
ctrl+home / ctrl+endjump to the top / live edge
dragselect transcript text; releasing copies it
Configuration
VariablePurpose
DSH_TUI_RUNTIMEpath to a Node-hosted @deepseek-ai/dsh runtime
DSH_TUI_PYTHONPython interpreter for python eval cells
DSH_TUI_TRACE=1write timings to <tmp>/dsh-tui/trace.log
DSH_TUI_FORCE_TTY=1bypass the interactive-TTY check
DSH_TUI_BROWSER_INSTALL=0skip downloading Chrome for Testing
PUPPETEER_EXECUTABLE_PATHuse a specific Chrome/Chromium binary

Development

AGENTS.md covers the architecture, invariants, and test policy. The short version:

bun install
bun run typecheck
bun run test
bun run build && bun run sync
bun run start

Credits

The interaction design is inspired by oh-my-pi — the bottom-pinned composer, dense status line, and card-style tool output. Background commands and tasks follow Claude Code's model: static tool rows, task notices, and one tasks surface. DSH's rendering, layout, and glyph vocabulary are its own.

Portions of the color math, duration/count formatting, session-accent derivation, and glyph vocabulary are adapted from oh-my-pi, which is MIT licensed.

License

MIT

版本与发布记录

@d0nj/dsh-tui 共发布 29 个版本,首次发布于 2026/11/09;过去 12 个月发布了 29 个版本。

版本发布日期距今
1.2.47latest2026/11/091 天前
1.2.462026/11/091 天前
1.2.202026/11/092 天前
1.2.212026/11/092 天前
1.2.172026/11/092 天前
1.2.152026/11/092 天前

关于 @d0nj/dsh-tui 的常见问题

@d0nj/dsh-tui 是什么?

Terminal UI for DeepSeek Harness: a full DSH profile in Ink.

如何安装 @d0nj/dsh-tui?

在项目目录运行 npm install @d0nj/dsh-tui,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 dst、dstui、dsh-tui,可以用 npx dst 直接运行。

@d0nj/dsh-tui 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/d0nj__dsh-tui 是否存在。

@d0nj/dsh-tui 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@d0nj/dsh-tui 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@d0nj/dsh-tui 可以商用吗?

@d0nj/dsh-tui 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@d0nj/dsh-tui 的下载量有多少?

根据 npm 官方下载统计,@d0nj/dsh-tui 在 2026/10/11 – 2026/11/09 这 30 天内被下载 5,276 次,日均约 176 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@d0nj/dsh-tui 还在维护吗?

最新版本 1.2.47 发布于 2026/11/09(1 天前);至今共发布 29 个版本,其中过去 12 个月发布了 29 个;首次发布于 2026/11/09。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。