dsh-tianshu-tui README

The project's README from github.com/huiliyi37/dsh-tianshu-tui. As one markdown file: README.md.

dsh-tianshu-tui

把 DeepSeek Harness 变成完整、流畅的终端编程工作区。

npm GitHub release Node License dshfind 官网 上游项目 论坛

中文 · English

dsh-tianshu-tui 终端界面

dsh-tianshu-tui 是官方 DeepSeek Harness 的交互式终端 UI 插件。自研轻量 ANSI 渲染引擎,提供流式 Markdown、工具卡、会话恢复与回退、图片与视觉桥、LSP 诊断、16 个主题,以及完整的 slash 命令和快捷键体系。

它是一个纯展示层插件:agent 状态来自会话事件流,不另建一套 agent 循环,也不向模型偷偷注入 prompt 或工具。

核心体验

能力 你可以做什么
流畅对话与工具视图 流式 Markdown、推理过程折叠、并行工具分组、结构化 diff、回合耗时与 token 指标
完整会话工作区 恢复、切换、分叉、回退、导出会话;运行中排队,或通过 /steer 即时纠偏
高效输入 slash 菜单、@ 路径补全、历史搜索、多行粘贴、外部编辑器,以及可选 Vim 键位
图片与视觉 粘贴并内联预览图片;识图模型直接接收,文本模型可经视觉桥获得图片描述
Agent 控制面板 审批 diff、plan 模式、目标、任务、技能、子代理与 workflow 状态集中呈现
可定制的开发环境 16 个主题、LSP 诊断、项目记忆、MCP 浏览、模型与推理等级热切换

快速开始

环境要求

组件 当前验证版本
Node.js >=24.9.0
包管理器 pnpm,可由 corepack enable 启用
DeepSeek Harness @deepseek-ai/[email protected](npm next 与 latest 均为该版本)
本插件 @huiliyi37/[email protected]

宿主 npm latest 与 next 当前同为 0.2.2-rc.5。本插件用 engines.dsh 声明兼容整条 0.2.2 补丁线(>=0.2.2-rc.3 <0.3.0-0),宿主在同线内再发 rc 不需要本包跟版;安装命令仍显式使用 @next,避免落到旧全局 CLI。

一键安装(推荐)

脚本会检查 Node/pnpm、安装官方 CLI、装配插件并启动:

# macOS / Linux
bash <(curl -fsSL https://raw.githubusercontent.com/huiliyi37/dsh-tianshu-tui/main/scripts/install-tui.sh)
# Windows PowerShell
powershell -ExecutionPolicy Bypass -Command "irm https://raw.githubusercontent.com/huiliyi37/dsh-tianshu-tui/main/scripts/install-tui.ps1 | iex"

只安装、不启动:macOS/Linux 在命令末尾加 --no-launch;Windows 克隆仓库后运行 powershell -ExecutionPolicy Bypass -File scripts\install-tui.ps1 -NoLaunch。

手动安装

# 1. 将插件装入独立的 tui profile
pnpm dlx @deepseek-ai/dsh@next plugin --profile tui add @huiliyi37/dsh-tianshu-tui

# 2. 启动
pnpm dlx @deepseek-ai/dsh@next --profile tui

首次启动后按引导配置 API Key,或输入 /key。看到 dsh-tianshu-tui 欢迎页即安装成功;按 Ctrl+Q 或输入 /exit 退出。

如果旧全局 dsh 导致 ERR_FS_EISDIR,或 npm 11 安装大型依赖树时发生 OOM,请改用上面的 pnpm dlx 命令。更多安装与排障方式见快速开始文档。

常用操作

常用命令

命令 作用
/session 新建、列出、切换或恢复会话
/fork · /rewind 分叉探索,或回退到历史消息边界
/model · /effort 切换当前会话的模型与推理等级
/preset 查看或切换 standard / PTC / minimal / creative 预设
/status · /tasks · /subagents 查看目标、任务与子代理状态
/theme · /density 切换主题与紧凑渲染
/scroll · /export 浏览完整转录,或导出 Markdown

快捷键

按键 作用
Enter 发送
Shift+Enter 换行(或 \+Enter 续行)
Ctrl+N 新会话
Ctrl+S 恢复最近会话
Ctrl+Q 退出(同 /exit)
Ctrl+P 命令面板
Ctrl+. 完整键位表
Ctrl+F / Ctrl+R 历史搜索;n/N 下一个,p/P 上一个
Ctrl+O 展开/收起最近推理块
Ctrl+E 用 $EDITOR 编辑输入行
Ctrl+T 中轮转向
Ctrl+Enter 打断当前回合并立即发送草稿(需 kitty 键盘协议)
Ctrl+C 打断在途回合;空闲空输入时双击退出
Ctrl+V 粘贴剪贴板图片,无图时粘贴文本
Alt+W 经 OSC52 把选区复制到系统剪贴板
Shift+Tab 循环 normal → plan → always-approve
Tab @ 路径补全;接受 slash 菜单选中项
Ctrl+U 删除到行首
↑/↓ 输入历史;菜单打开时为选择;空输入 ↑ 取回排队消息
PageUp/PageDown slash 菜单翻页
Esc 关闭面板或取消提问;空闲双击打开 rewind
t 审批卡:本会话内记住此工具
a 审批卡:本会话放行

完整命令、审批操作、Vim 键位和终端协议说明见交互手册。

更新

从 npm 安装的插件会在启动时检查更新;也可以在 TUI 中输入 /update 手动检查。设置 DSH_TUI_SKIP_UPDATE=1 可关闭启动检查。

pnpm dlx @deepseek-ai/dsh@next plugin --profile tui add @huiliyi37/dsh-tianshu-tui

当前版本:1.0.0-rc.10,适配宿主 0.2.2-rc.5。本版优化流式首字延迟:首个文本 delta 同步穿透渲染,首字可见延迟从「最多等一个 120ms ticker」降到 ≤16ms 帧合并(每步只触发一次,稳态帧率不变);ticker 去掉每帧重复的活动项 fold;补齐 --debug-perf 的 delta / flush 采样点。

升级到本版可在 TUI 中执行 /update 后重启,或重跑上方的 plugin add 命令。完整版本历史见 CHANGELOG.md,TUI 内可输入 /changelog 查看。

文档

文档 内容
快速开始 安装、启动、干净环境安装与故障排查
交互手册 全部命令、快捷键、面板与输入方式
配置 装配选项、环境变量、预设与运行时配置
主题 内置主题、自定义配色与终端降级
插件生态 伴生插件与扩展点
架构 · 适配契约 分层、事件流、服务依赖与展示层边界
VS Code 在 VS Code 终端中使用
贡献指南 · 开发说明 本地开发、构建、测试与发布流程

设计原则

实现细节与边界约束见架构文档和 ADAPTER.md。

已知限制

参与贡献

欢迎提交 Issue 和 PR。开始前请阅读贡献指南,改动后运行:

npm run typecheck
npm test
npm run build

官网与社区

入口 说明
天枢 Harness 官网 官方网站与项目介绍
Tianshu-harness 上游项目 上游源码、Issue 与版本动态
天枢论坛 使用交流、经验分享与问题讨论

社区生态

项目 简介
dshfind DeepSeek Harness 中文学习与插件社区
dsh-web-ui DSH Web UI 插件与皮肤合集
dsh-TUI Claude Code 风格全屏终端插件
deepseek-harness-ux 长任务进度聚焦与历史自动折叠
DSH-better-sidebar 文件、终端、Git 与子代理侧边栏工作台
DSH Desktop 社区桌面端与远程任务控制
dsh-whale-report 会话、成本、工具调用与风险报告

许可与来源

基于 Apache-2.0 开源。终端渲染核心源自作者的 Tianshu-harness 项目并持续演进,文件级来源与修改说明见 SOURCE-MAP.md 和 NOTICE。

dsh-tianshu-tui (huiliyi37/dsh-tianshu-tui)

Searching Database…

What is this?dsh-tianshu-tui is an interactive terminal UI (TUI) plugin for the official DeepSeek Harness CLI (@deepseek-ai/dsh). It uses a self-built minimal ANSI rendering engine to show streaming Markdown and tool cards, 16+ themes, slash commands, memory, and LSP diagnostics inside your terminal.
Is this a standalone app or a plugin I add to something else?It's a plugin, not a standalone program — you need the official DeepSeek Harness CLI (@deepseek-ai/dsh) already installed, then mount this plugin into its tui profile.
How do I install and start it?Use the repo's cross-platform one-click script, or run 'pnpm dlx @deepseek-ai/dsh plugin --profile tui add @huiliyi37/dsh-tianshu-tui' to add it to the official CLI's tui profile, then launch with dsh (or the pnpm dlx form if the CLI isn't global).
What do I need before installing this?Node.js ^22.19 or >=24, and pnpm (enable it via corepack if missing); the official DeepSeek Harness CLI @deepseek-ai/dsh (>= 0.1.2-rc.1) is a required peer dependency the plugin mounts onto.
Any install pitfalls I should know about?Installing the official CLI with npm 11 (bundled with Node 24) can hang and run out of heap memory because of its large dependency tree, so pnpm is required instead. A stale old 'dsh' binary on PATH can also trigger ERRFSEISDIR errors, so always use the pnpm dlx command shown in the docs.
Is this the same thing as oh-my-tianshu?No — this plugin only works inside the official DeepSeek Harness ecosystem (@deepseek-ai/), while oh-my-tianshu (@huiliyi37/dsh-tianshu) is a separate standalone distribution with its own CLI and its own data directory (~/.dsh-tianshu); mixing the two creates fragile cross-ecosystem coupling.
Can I use vim-style keybindings for editing input?Yes, Vim keybindings modeled on Claude Code are built in (motions, text objects, dd/cc/yy, visual mode) and can be toggled at runtime with /vim or set as the default.
What happens if the active model can't see images?A vision bridge automatically routes image attachments to a separate vision-capable model to generate a description, which gets injected as a message so a text-only model can still 'see' the image content.
What memory and session-recovery features does it have?/memory and /remember give cross-session recall via a Markdown-backed memory service, while /fork, /rewind, and /export let you branch sessions, roll back to a prior message with optional file rollback, or export the transcript to Markdown.
How many themes does it ship with?16+ built-in themes are included, selectable and customizable from within the TUI.
Creator
huiliyi37
Size
7.4 MB
Stars
313
Age
3mo
Commits · 90 Days