Foreword¶
DSH can extend different profiles through plugins. The existing dsh --profile headless is suitable for pipelines and unattended workflows; but when direct session operations in the terminal are needed—such as viewing states, approving tool calls, switching permissions, managing plans and goals—a closer interactive layer is required. tomowang/dsh-tui provides this terminal entry point.
Positioning¶
- npm package:
@tomowang/dsh-tui - Maintainer:
tomowang - License:
MIT - Goal: Serve as the open-source terminal frontend for DeepSeek Harness (
dsh) - The
dsh.bundle.patchin the package points to./cordis.patch.yml
Core Capabilities¶
Session State¶
The status bar displays session id, active LLM provider/model, current agent preset, live run state with spinner, queued-message count, and logged event count.
The statistics line shows turn/step counts, LLM/tool wall time, TTFT and decode tok/s, cache-hit %, billed tokens, and context-usage summary.
Models and Presets¶
/model can switch the active model and add, edit, delete custom LLM providers.
--agent-preset is used to specify an agent preset in new sessions; /presets is for browsing and switching presets.
Session Inspection¶
/trajectory, /context, /plugins are used to view session trajectory, context, and plugin information.
Tool Calls and Reasoning¶
Running tool calls are displayed as live spinners; after completion, they collapse into a single-line result.
/tools or Ctrl+O opens the Tool Cards overlay to browse tool calls/results; Enter/Space can collapse the cards back to titles.
Reasoning shows an animated thinking line during streaming output and collapses to a one-line summary afterward; the full text can be viewed via /trajectory.
If assistant text contains clear Markdown signals, it will be rendered as Markdown in the terminal.
Permissions and Approvals¶
Shift+Tab cycles through permission presets: read-only, workspace-write, danger-full-access, custom.
Approvals and questions can be handled within the terminal: allow once/reject; ask_user_question and plan review support multi-select and Other; when supported, OSC 9 desktop notifications are sent.
Plans and Goals¶
/plan [message] enters plan mode, /plan off exits; model-proposed plans will go through Approve/Keep-planning review.
/goal <objective> sets a goal; /goal clear|edit <objective>|pause|resume manages goals; when active and armed, automatic continuation rounds can proceed.
Input and Compaction¶
/compact is used to summarize and compact session history.
Prompt history is preserved across processes and /clear, recalled using ↑/↓.
Input supports Readline-style: word/line motion, kill/yank-style deletes, multi-line drafts; double Ctrl+C/Ctrl+D to exit.
Local Commands and File References¶
With an empty prompt, starting with ! switches Enter to a local shell command, the prompt border turns yellow, and output enters the transcript.
Inputting @ opens a fuzzy-filtered dropdown of repo files; Tab/Enter inserts the selected path.
Terminal Experience¶
On startup, it performs a best-effort check against the npm registry; if a newer version is published, it displays the upgrade command.
The terminal window/title shows <session title> — dsh-tui if a session title exists, otherwise dsh-tui.
The full-screen transcript uses an alternate screen buffer and supports mouse wheel/trackpad, PageUp/PageDown, and auto-follow; upon exit, it flattens the last screenful into scrollback.
When the backing service is not mounted, overlays degrade to plain notices rather than causing the TUI to fail directly.
Installation and Activation¶
First, confirm the environment meets requirements: Node ^22.19 || >=24, and set DEEPSEEK_API_KEY.
- Install the DSH launcher:
npm install -g @deepseek-ai/dsh
- Install
dsh-tuiin thetuiprofile:
dsh plugin --profile tui add @tomowang/dsh-tui
- Launch the terminal profile:
dsh --profile tui
If you have an existing session or want to start a new one with a preset, you can also use:
dsh --profile tui --resume <sessionId>
dsh --profile tui --agent-preset <presetId>
dsh --profile tui --dump-config
Note: Both stdin and stdout must be real TTYs. The plugin will directly error in pipelines rather than degrading; continue using dsh --profile headless for pipeline scenarios.
Typical Usage¶
Ctrl+Ccancels the current running turn.Shift+Tabcycles throughread-only/workspace-write/danger-full-access/custom./toolsorCtrl+Oopens the Tool Cards overlay;Enter/Spacecollapses the cards to titles.escskips the approval/question option list in the terminal.- With an empty prompt, input
!and then Enter executes a local shell command. - Input
@opens file reference completion;Tab/Enterinserts the path. /plan [message]enters plan mode,/plan offexits plan mode./goal <objective>sets a goal;/goal clear|edit <objective>|pause|resumemanages goals./compactcompacts session history.↑/↓recalls historical inputs.PageUp/PageDownscrolls the full-screen transcript.
Applicable Scenarios and Notes¶
Suitable for developers who need to operate DSH sessions in the terminal: viewing states, switching models and permissions, approving tool calls, managing plans and goals, compacting history, and referencing repository files.
Since the plugin runs within the DSH host environment and can trigger tool calls, local shell, permission presets, and other capabilities, you should check the source code, license, and dependencies before installation. The license listed in this article is MIT; the plugin directory page is an independent plugin directory link and is not equivalent to an official app store, with no official affiliation with DeepSeek/幻方 (High-Flyer).
Links¶
- Directory page: https://www.skillhub.cn/plugins/tomowang/dsh-tui
- GitHub: https://github.com/tomowang/dsh-tui