Isanti2016/dsh-console
dsh 控制台命令:/web 启动/停止/重启/状态、/tunnel SSH 隧道管理、/ask 一次性问答、/console 启动控制台 TUI。
已收录
0
Tools
Bundle 已验证
预览
功能介绍
dsh 控制台命令:/web 启动/停止/重启/状态、/tunnel SSH 隧道管理、/ask 一次性问答、/console 启动控制台 TUI。
适合
- 适合希望通过斜杠命令启动、停止、重启和检查 Web 服务的 DSH 运维者。
- 适合管理通往远程 DSH Web 端点的 SSH 本地转发的用户。
- 适合通过 headless profile 执行带超时限制的一次性问答的终端工作流。
- 适合已有控制台 TUI、并希望从 DSH 命令层启动它的用户。
不适合
- 不适合只使用常规 DSH Web UI、无需管理服务、隧道或独立 TUI 的用户。
- 不适合未配置 SSH 主机的隧道流程,或未配置启动命令的控制台流程。
- 不适合在当前 Web Profile 中不加判断地使用;/web stop 与 /web restart 可能终止正在提供当前 UI 的进程。
- 不适合期望 /ask 结果进入模型历史的工作流;结果只由命令层呈现。
README
dsh-console
Console commands for DeepSeek Harness: manage the web service, the SSH tunnel, one-shot questions, and an optional console TUI — straight from the slash-command plane.
Quick start
# 1. install the bundle
dsh plugin --profile web add dsh-console
# 2. restart dsh web, then use the commands
/web status
/tunnel status
Out of the box, /web and /tunnel status work with zero config (the plugin auto-detects the running dsh entry). Configure the tunnel host and the console TUI path in the profile’s cordis.patch.yml:
- id: dsh-console
config:
tunnelHost: '192.168.1.100' # your SSH server
tunnelUser: 'root'
tunnelKey: 'C:\\Users\\you\\.ssh\\id_rsa'
consoleCommand: 'python C:\\tools\\dsh-tui\\main.py'
Then dsh plugin --profile web again + restart, and /tunnel start / /console are live.
Commands
| Command | Description |
|---|---|
/web status |
Is the web UI up? (port + PID) |
/web start |
Background-start the web UI (node <dshBin> web --port <webPort>) |
/web stop |
Stop the web UI process |
/web restart |
Restart it |
/tunnel status |
Is the SSH tunnel up? |
/tunnel start |
Start the SSH tunnel (needs tunnelHost) |
/tunnel stop |
Stop the tunnel |
/ask <问题> |
One-shot question through the headless profile (timeout-bounded) |
/console |
Launch the console TUI (needs consoleCommand) |
Configuration
All keys carry sensible defaults; set them in the profile’s cordis.patch.yml (or a --patch overlay), overriding the row this bundle adds:
- id: dsh-console
config:
webPort: 3080 # dsh web UI port
dshBin: '' # path to apps/cli/lib/bin.js; empty = auto-detect
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'
| Key | Default | Meaning |
|---|---|---|
webPort |
3080 |
The dsh web UI listens on 127.0.0.1:3080 by default; /web start spawns it there. |
dshBin |
auto | Absolute path to your checkout’s apps/cli/lib/bin.js. Empty = detected from the running process (process.argv[1]), so a from-source dsh usually needs no config. |
tunnelHost |
'' |
SSH server host. Empty disables /tunnel start. |
tunnelUser |
root |
SSH user on the server. |
tunnelKey |
'' |
Absolute path to your SSH private key (-i). Omit for agent/other auth. |
tunnelLocalPort |
3081 |
Local listen port of the tunnel (127.0.0.1:3081). |
tunnelRemotePort |
3080 |
Remote port the tunnel forwards to (127.0.0.1:3080 on the server). |
askTimeout |
150 |
Seconds before /ask is killed. |
consoleCommand |
'' |
Shell command launching your console TUI. |
How the tunnel is wired
your machine SSH server (tunnelHost)
127.0.0.1:3081 ──ssh -L──▶ 127.0.0.1:3080
▲ ▲
│ /tunnel start binds here │ dsh web runs here (or any service)
/tunnel start runs ssh -N -L <tunnelLocalPort>:127.0.0.1:<tunnelRemotePort> <tunnelUser>@<tunnelHost> (with -i <tunnelKey> when set) as a detached process. /tunnel stop finds and kills the listener on tunnelLocalPort.
Typical setups
-
Local launcher (CLI/headless profile) — manage the web UI from a terminal:
/web start→ openhttp://127.0.0.1:3080;/web stop→ stop it. -
Remote web (this machine reaches another host) — point
tunnelHostat the remote, browsehttp://127.0.0.1:<tunnelLocalPort>. -
In the web profile itself —
/web statusand/tunnel statusare safe;/web stop|restartkill the process serving the current UI — manage deliberately.
Security notes
-
/web stop//web restartkill the process serving the current UI when run from the web profile. -
/tunnel startrunssshwith your configured key — only configure keys from sources you trust. -
/askruns the headless profile and consumes model quota; results are rendered by the command plane and never enter model history.
Development
npm test # node test of the backend primitives (read-only)
pnpm pack # build the installable tarball
The bundle has no build step: plain ESM, ships index.js + lib/ + cordis.patch.yml.
常见问题常见问题
在启用了 DSH 的终端中执行已验证命令 dsh plugin --profile default add github:Isanti2016/dsh-console。命令会解析公开 package 元数据,并保持插件与本页展示的目录身份一致。
兼容性以页面上展示的 bundle 与 profile 状态为准。如果某个 profile 尚未检测到,请先保持禁用,并在生产启用前阅读仓库文档。
GitHub 链接和 activity 元数据是 release 与维护状态的来源。新版本发布后重新查看本页,确认目录已经观察到最新版本。