xswt442-cmd/dsh-instance-manager

Plugin插件 Native原生 ⭐ 2 MIT UI & Themes界面与主题

DSH 常驻插件:侧边栏面板统一查看并管理本机的 dsh 实例 | Sidebar panel to list and manage local dsh web instances

Project Overview项目介绍

dsh-instance-manager is a DSH Web instance-manager plugin that adds a menu icon at the bottom-left of the workspace, immediately to the right of the sidebar, after installation. The plugin lists every locally visible dsh web instance on its own row, showing port, PID, uptime, session count, resident memory, and version, with the current instance pinned to the top and remaining rows sorted by ascending port; once peers are configured, the same panel can also query instances on remote machines along with their logs and sessions. Installation is supported through dsh plugin --profile web add dsh-instance-manager, a plain npm install dsh-instance-manager, or dsh plugin --profile web add github:xswt442-cmd/dsh-instance-manager, and because the bundle only activates after it is registered to the web profile, a DSH Web restart is required for the plugin to take effect on first install.

The typical workflow begins by configuring the live and startup sections, then managing instance lifecycles through either the panel or the Agent tools instance_list, instance_start, instance_stop, instance_logs, and instance_sessions: leaving the port empty picks the first free port within the first segment of portRange, while a requested port that is already occupied is reported as an error rather than silently rerouted, and clicking a row's :port enters that instance using a launch token exchanged on demand that never reaches panel state or bookmarks. Stop operations cover single, current, or all local instances, remote rows are read-only and never participate in stop-all, remote functionality depends on bidirectional peer wiring together with a Fleet token that should only be granted to trusted devices, and both Agent-side and desktop launches pass --no-open so background instances stay windowless. The plugin targets developers and operators who juggle multiple DSH Web instances and need unified cross-host visibility, health inspection, and lifecycle control from a single in-app surface.

Dependencies require Node.js ≥ 20 and DSH ≥ 0.1.5-rc.3 (configuration reading shifts to the entry's own config from 0.1.7-rc.1 onward), and the project is released under the MIT license; every field has a matching DSHIM_* environment variable that is layered between user values and schema defaults, resolving after the host's actual read source but before the built-in defaults. Limits include at most 1024 ports per portRange segment and at most 16 peers, remote requests must always carry a bearer over non-loopback addresses, and from DSH 0.1.0-rc.7 onward browser APIs and event streams reuse Connection signed cookies so the plugin's own guard is bypassed on those paths. Pre-submit checks are npm test, npm run docs:check, and npm pack --dry-run, and on first run operators must supply fleetToken and portRange correctly or remote features are silently disabled while the local panel continues to function.

dsh-instance-manager 是面向 DSH Web 的实例管理器插件,安装后会在工作区左下、侧边栏右侧新增一个菜单入口。它为本机可见的每个 dsh web 实例显示一行状态,列出端口、PID、运行时长、会话数、常驻内存与版本,当前实例排在第一行,其余按端口升序排列;配置 peer 后,同一面板还可查询远程机器上的实例与日志。安装方式支持 dsh plugin --profile web add dsh-instance-manager、npm install dsh-instance-manager 或 dsh plugin --profile web add github:xswt442-cmd/dsh-instance-manager,bundle 注册到 web profile 后 DSH 才启用本插件,安装后需重启 DSH Web 生效。

典型使用流程是先在设置中配置 live 与 startup 两节,再通过面板或 Agent 工具(instance_list、instance_start、instance_stop、instance_logs、instance_sessions)统一管理实例生命周期:端口留空时取 portRange 第一段首个空闲端口,指定端口被占用直接报错;点击某行 :端口 进入实例界面,启动 token 由宿主即时换取,不写入面板状态或链接。停止操作支持单个、当前或全部本地实例,远程行只读也不参与 stop-all;远程功能依赖双向 peer 与 Fleet token,token 需授予可信设备。它适合需要同时管理多个 DSH Web 实例、跨主机查看与排障的开发者与运维人员。

依赖方面要求 Node.js ≥ 20、DSH ≥ 0.1.5-rc.3(配置读取逻辑在 0.1.7-rc.1 起改为从条目 config 读取),以 MIT 协议发布;所有字段都有同名 DSHIM_* 环境变量作为后备,覆盖顺序为宿主读取来源、环境变量、内置默认值。portRange 单段最多 1024 个端口,peers 最多 16 条,远程请求必须携带 bearer,浏览器 API 自 DSH 0.1.0-rc.7 起由 Connection 签名 cookie 准入。提交前需运行 npm test、npm run docs:check、npm pack --dry-run,首次启动需确认 fleetToken 与 portRange 已正确填写,否则远程功能整体关闭而本地面板不受影响。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add dsh-instance-manager

把 xswt442-cmd/dsh-instance-manager 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-instance-manager

中文 | English

ci DSH npm release DSH node downloads license

DSH Web 的实例管理器。它为本机可见的每个 dsh web 实例显示一行状态,并负责这些实例的启动、打开与停止。配置 peer 后,同一面板也可查询其他机器上的实例。

入口是工作区左下、侧边栏右侧的菜单图标。

功能

  • 每个实例一行:端口、PID、运行时长、会话数、常驻内存与版本;当前实例排第一行,其余按端口升序。
  • 启动新实例:端口留空时取起始端口段内第一个空闲端口;指定端口已被占用时报错,不改用其他端口。
  • 打开实例:点击某行的 :端口 进入该实例界面;启动 token 由宿主即时换取,不进入面板状态与链接。
  • 停止实例:单个、当前或全部本地实例;远程行只读,也不参与 stop-all。
  • 每个实例的只读视图:stdout/stderr 日志、会话概要,以及该实例正在运行的内容。
  • 远程实例:配置 peer 后可查看远程实例及其日志与会话。
  • Agent 工具:instance_list、instance_start、instance_stop、instance_logs、instance_sessions。
  • web 面板中的启动会向浏览器交接一次性 token URL 以换取浏览器 cookie,Agent 工具启动与桌面端启动都保持后台无窗口(启动参数带 --no-open)。

安装

# 从 npm 安装并注册到 web profile(推荐)
dsh plugin --profile web add dsh-instance-manager

# 仅安装 npm package
npm install dsh-instance-manager

# 或从 GitHub 安装
dsh plugin --profile web add github:xswt442-cmd/dsh-instance-manager
  • npm install 只安装 package;bundle 进入 profile 后 DSH 才启用本插件,dsh plugin add 一次完成这两步。
  • 安装后重启 DSH Web 生效。

配置

live 与 startup 两节

  • live:刷新间隔、Fleet token、peer 列表;宿主 watch 该节,修改即时生效。
  • startup:端口清单;该节 applies: 'restart',宿主仅在构造时读取一次,未生效的修改在设置界面标为待生效。

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-chat 下一个 Next dsh-token-usage-ledger →