DeepSeek Harness (DSH) uses a plugin-based architecture. Traditional CLI plugins (such as dsh-plugin-cli-session) typically drive a single-turn conversation and immediately exit. dsh-plugin-tui keeps the terminal session continuously open, providing streaming token deltas, tool-call line rendering, and real-time approval requests, building a Claude Code-style REPL.
Plugin Overview¶
- Name:
dsh-plugin-tui - Maintainer:
ghbhiee - Category: Client
- License: MIT
- Core Value: Provides a persistent, streaming interactive AI programming environment inside the terminal, supporting session management, model switching, history replay, and permission approvals.
Core Features¶
The plugin provides DSH with an interactive terminal user interface. Its main capabilities include:
- Claude Code-style REPL: Keeps the terminal active and supports streaming output.
- Streaming interaction: Displays token deltas, tool-call line rendering, and error messages in real time.
- Session management: Supports interactive session/model selectors, history replay, and session resumption/switching.
- Permission control: Provides two approval modes,
askandauto, and allows approval requests to be responded to directly in the terminal. - Status feedback: The bottom status bar displays the current model, reasoning effort, approval mode, session title, and working directory in real time.
- Thinking folding: Reasoning output is collapsed by default and can be expanded with a shortcut to view details.
- Markdown rendering: Supports rendering Markdown-formatted text.
- MCP server connection: Connects to MCP servers in the background.
Installation and Configuration¶
Installing the plugin requires specifying the tui profile. The installation command is as follows:
dsh plugin --profile tui add github:ghbhiee/dsh-plugin-tui
After installation, the bundle must be specified in the configuration file. This plugin requires only two bundle layers (it restates some lines from dsh-headless); do not add the headless bundle.
Edit ~/.dsh/profiles/tui/package.json:
{
"dsh": {
"profile": {
"bundles": ["@deepseek-ai/dsh-base", "dsh-plugin-tui"]
}
}
}
Typical Usage¶
Startup and Basic Commands¶
dsh --profile tui # enter interactive mode
dsh --profile tui "explain this file" # send an initial message and enter interactive mode
dsh --profile tui -r # resume the latest tui session
dsh --profile tui -s <id> # resume a specific session ID
dsh --profile tui -w ./scratch # start a new session in the specified directory
dsh --profile tui -l # list sessions under the current profile
dsh --profile tui -p danger-full-access # grant full access at startup (no sandbox, no prompts)
dsh --profile tui -p workspace-write -y # grant workspace write access at startup and automatically allow all approvals
REPL Internal Commands¶
In the interactive interface, the following built-in commands are supported:
| Input | Meaning |
|---|---|
/exit, /quit, Ctrl-D |
Exit the REPL (flushes the session first) |
/session |
Display the current session ID |
/sessions |
Interactively select a session (↑/↓ to move, Enter to switch, Esc to cancel) |
/sessions list |
Show a static list of all sessions |
/resume <n\|id> |
Switch to the specified session in the current REPL (index or ID prefix) |
/history [n] |
Display the n earlier exchanges in the current session |
/new |
Start a new session and release the current session |
/title [text] |
Display or rename the session title (renaming pins the title) |
/model [id] |
Interactively select a model or hot-switch by name (provider/id) |
/effort [id] |
Interactively select a reasoning effort or set it by name |
/effort default |
Restore the provider’s default settings |
/help |
Display built-in commands and all registered Harness commands |
/approvals [ask\|auto] |
Set approval mode (auto allows all requests, ask restores prompts) |
y / N |
Allow or reject a gated tool call when prompted for approval |
Ctrl-C (running) |
Cancel the current turn and remain in the REPL |
Ctrl-C (idle) |
Exit the REPL |
number or text |
Select an option or provide an answer at a ⁇ prompt |
Notes and Known Limitations¶
- Bundle layers: The TUI profile requires only two bundle layers. This plugin restates some lines from
dsh-headless; do not add thedsh-headlessbundle. - Approval mode limitations: Currently, only one-shot approvals are supported; there is no per-command allowlist.
- Plan review rendering: Rendering of the
/plancommand is handled through the generic question-answer flow rather than a dedicated diff-style view. - Token deltas: Token deltas are not batch-written; high-load streams may require manual optimization.
- Sibling plugin logs: Any sibling plugin logs in the same profile that print to stdout will overwrite the REPL display. It is recommended to silence the MCP proxy in the global configuration
~/.dsh/cordis.patch.yml. - Type signature drift: There are type signature differences for
ctx.commands.executebetween the installed version (0.1.1-rc.2) and the released version (rc.6); the plugin dispatches by checking the number of arguments. - MCP connection: MCP servers connect in the background, and tools may be added later.
Summary¶
dsh-plugin-tui is a plugin that provides a persistent interactive terminal experience for DeepSeek Harness. Through streaming output and session management, it addresses the limitations of traditional single-turn plugins, which cannot handle long-running, multi-step programming collaboration. For more details, visit the plugin directory or view the source repository.