dsh 控制台命令:/web 启动/停止/重启/状态、/tunnel SSH 隧道管理、/ask 一次性问答、/console 启动控制台 TUI。
安装
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:Isanti2016/dsh-console
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
DeepSeek Harness 的控制台命令插件:网页服务管理、SSH 隧道管理、一次性问答、可选的控制台 TUI 启动——全部在斜杠命令里完成。
快速接入
# 1. 安装 bundle
dsh plugin --profile web add dsh-console
# 2. 重启 dsh web,然后直接用命令
/web status
/tunnel status
开箱即用:/web 和 /tunnel status 零配置可用(插件自动探测运行中的 dsh 入口)。隧道主机和控制台 TUI 路径在 profile 的 cordis.patch.yml 里配置:
- id: dsh-console
config:
tunnelHost: '192.168.1.100' # 你的 SSH 服务器
tunnelUser: 'root'
tunnelKey: 'C:\\Users\\you\\.ssh\\id_rsa'
consoleCommand: 'python C:\\tools\\dsh-tui\\main.py'
再次 dsh plugin --profile web 并重启后,/tunnel start、/console 即可用。
命令
| 命令 | 说明 |
|---|---|
/web status |
网页界面是否在运行(端口 + PID) |
/web start |
后台启动网页界面(node <dshBin> web --port <webPort>) |
/web stop |
停止网页界面进程 |
/web restart |
重启 |
/tunnel status |
隧道是否在运行 |
/tunnel start |
启动 SSH 隧道(需配置 tunnelHost) |
/tunnel stop |
停止隧道 |
/ask <问题> |
走 headless 的一次性问答(有超时保护) |
/console |
启动控制台 TUI(需配置 consoleCommand) |
配置
所有键都有合理默认值;在 profile 的 cordis.patch.yml(或 --patch 覆盖)里修改本 bundle 添加的行的 config:
- id: dsh-console
config:
webPort: 3080 # dsh 网页界面端口
dshBin: '' # apps/cli/lib/bin.js 路径;为空时自动探测
tunnelHost: '192.168.1.100'
tunnelUser: 'root'
tunnelKey: 'C:\\Users\\you\\.ssh\\id_rsa'
tunnelLocalPort: 3081
tunnelRemotePort: 3080
askTimeout: 150
consoleCommand: 'python C:\\tools\\dsh-tui\\main.py'
| 键 | 默认 | 含义 |
|---|---|---|
webPort |
3080 |
dsh 网页界面默认监听 127.0.0.1:3080;/web start 在此启动。 |
dshBin |
自动 | 你代码仓库里 apps/cli/lib/bin.js 的绝对路径。为空时从运行进程探测(process.argv[1]),源码方式跑的 dsh 一般无需配置。 |
tunnelHost |
'' |
SSH 服务器地址。为空禁用 /tunnel start。 |
tunnelUser |
root |
服务器上的 SSH 用户。 |
tunnelKey |
'' |
SSH 私钥绝对路径(-i)。用 agent/其他认证时可省略。 |
tunnelLocalPort |
3081 |
隧道本地监听端口(127.0.0.1:3081)。 |
tunnelRemotePort |
3080 |
隧道转发到的远程端口(服务器上的 127.0.0.1:3080)。 |
askTimeout |
150 |
/ask 超时秒数,超时自动终止。 |
consoleCommand |
'' |
启动你的控制台 TUI 的 shell 命令。 |
隧道接线方式
你的机器 SSH 服务器 (tunnelHost)
127.0.0.1:3081 ──ssh -L──▶ 127.0.0.1:3080
▲ ▲
│ /tunnel start 在此监听 │ dsh web 或其他服务跑在这里
/tunnel start 会执行 ssh -N -L <tunnelLocalPort>:127.0.0.1:<tunnelRemotePort> <tunnelUser>@<tunnelHost>(配置了 tunnelKey 时加 -i)作为后台进程。/tunnel stop 找到并杀掉监听 tunnelLocalPort 的进程。
典型场景
- 本机启动器(CLI/headless profile)——终端里管理网页:
/web start→ 打开http://127.0.0.1:3080;/web stop停止。 - 远程网页(本机要访问另一台机器)——把
tunnelHost指向远程,浏览器访问http://127.0.0.1:<tunnelLocalPort>。 - 在 web profile 自身里——
/web status、/tunnel status安全;/web stop|restart会杀掉正在服务当前界面的进程,请谨慎。
安全提示
/web stop//web restart在 web profile 里执行会杀掉正在服务当前界面的进程。/tunnel start会用你配置的密钥执行ssh——只配置可信来源的密钥。/ask会跑 headless 并消耗模型额度;结果由命令平面渲染,不进入模型历史。
开发
npm test # 后端原语 node 测试(只读)
pnpm pack # 打出可安装的 tarball
本 bundle 无构建步骤:纯 ESM,发布 index.js + lib/ + cordis.patch.yml。
链接
同类插件
Tencent/WeKnora#dsh-weknora★ 31292
把 WeKnora 知识库接入 dsh 的四个只读工具:列出知识库、混合检索原文片段、按顺序还原单篇文档,以及直接取用 WeKnora 自己带引用的 RAG 或 ReAct agent 回答(含可续聊的 session id)。
superdesigndev/treg★ 3854
给 Agent 的工具目录:按「要做的事」检索约 2,600 个外部接口(SEO 与 SERP、外链、社交、人物与公司信息补全、广告库、抓取),查看参数与单次调用价格后直接调用,凭据由服务端注入。附带技能,MCP 行在未设置 TREG_TOKEN 前保持禁用。
TencentCloudBase/CloudBase-AI-Toolkit#dsh-plugin★ 1128
把腾讯云 CloudBase 后端接入 DeepSeek Harness——在对话里搭好并部署全栈应用,查询结果渲染为表格卡片(分页、排序、导出 CSV),部署后可预览真实域名,并提供 CloudBase MCP 工具集(`mcp__cloudbase__*`),登录走 device-code 流程。
gitroomhq/postiz-agent#dsh-postiz★ 499
通过 MCP 将 DeepSeek Harness 连接到 Postiz:列出已连接的社交媒体渠道、获取各平台发帖规则,并向 X、LinkedIn、Instagram、Facebook、Threads、TikTok、YouTube、Reddit、Bluesky、Mastodon、Discord、Slack、Telegram 等平台排期、存草稿或发布帖子;附带 postiz 工作流技能。
EthanYoQ/Invoice-Downloader#dsh-invoice-downloader★ 474
面向 DeepSeek Harness 的本地 IMAP 发票下载、OCR 识别、归档与 Excel 报销汇总。
anysearch-team/anysearch-dsh★ 438
基于 AnySearch 的实时网页与垂直搜索插件,为 DeepSeek Harness 提供搜索工具。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。