luozhengswjtu/dsh-cmd-pad

Project Overview项目介绍

This is a native command palette quick reference plugin built exclusively for the DSH Web UI. It lets users organize frequently used commands into custom groups and sort them by project, with core features of one-click copy and one-click execution of commands. All command data is stored in plain text YAML files that can be edited manually and moved between environments, with no build step required and no runtime dependencies. To install the plugin, you can either install via npm with the DSH CLI command, or clone the public Git repository and add it manually to your DSH profile.

This plugin is designed for DSH users who regularly reuse various command line commands, helping them cut down on time spent remembering commands or searching through shell history. It includes a dynamic "recently used" view that automatically saves up to 100 recently used commands, and displays the 20 most recent by default. Users can toggle between viewing recent commands from only the current project or all projects, making it easy to pull up recently used commands quickly. You can press the / key to focus the global search bar, which highlights matching results and shows a count of matches, and press Esc to clear the search query.

The plugin offers two separate display modes, with better-sidebar as an optional peer dependency. If you install better-sidebar, you get access to the full one-click run feature that opens commands in a new dedicated terminal. If you do not install better-sidebar, you can still use all core features except for running commands directly from the panel. After installation, you will need to restart DSH Web and do a hard refresh in your browser to load the plugin. All command data is stored by default in the .dsh\profiles\web\cmd-pad\ directory in your user folder, and the plugin is released under the open source MIT license.

dsh-cmd-pad 是专为 DSH Web UI 开发的命令行速查面板插件,支持将常用命令按照自定义分组和项目维度归档,提供一键复制、一键运行核心功能。插件的命令数据存储为纯文本文件,支持手动修改和跨环境迁移,无需构建流程,也没有运行时依赖。支持按自定义分类(如性能采集、部署等)整理命令,也会自动按当前工作项目路径聚合命令。

这款插件面向经常需要复用各类命令的 DSH 用户,可帮助用户快速整理和查找常用命令,避免重复记忆或反复翻找历史命令。它提供上次使用动态视图,会自动保留最近100条使用过的命令,默认显示20条,支持切换项目/全部范围,能快速找回最近使用的命令。用户按 / 即可唤起全局搜索,命中结果会高亮并显示计数,按 Esc 可清空搜索内容。

插件支持两种形态,better-sidebar(更好侧边栏)是可选依赖,安装后可获得完整的一键运行功能,不安装也能使用除运行外的所有核心功能。安装可通过 npm 或 Git 克隆两种方式完成,安装后需要重启 DSH Web 并在浏览器硬刷新生效。数据默认存储在用户目录下的 .dsh\profiles\web\cmd-pad\,采用 MIT 许可开源。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 3 warnings3 项注意
  • No license declared - all rights reserved by default; ask the author before commercial use or redistribution未声明开源许可证 —— 默认「保留所有权利」,商用或再分发前先问作者
  • Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
  • No DSH plugin manifest detected - it may only carry the dsh-plugin topic, so the install method must be confirmed on the spot未检测到 DSH 插件清单:可能只是打了 dsh-plugin 话题,安装方式要现场确认
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-cmd-pad

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

READMEREADME

dsh-cmd-pad

DSH Web UI 的测试命令行速查面板:把常用命令按自定义分组 + 项目归档,一键复制、一键运行(主形态)。数据是纯文本文件,可手改、可迁移,零构建、零运行时依赖。

✨ 功能特性

  • 分组 + 项目归档:命令归属自定义分组(如「性能采集」「部署」)与项目(工作区路径自动聚合);分组常驻/重命名/删除,命令增删改,分组名即主键、所见即所得;
  • 上次使用视图:复制/运行成功的命令自动进入「上次使用」动态视图(保留 100 条、显示 20 条),可切「项目 / 全部」范围——快速找回最近用过的命令;
  • 全局搜索:/ 聚焦,命中高亮 + 计数,Esc 清空;
  • 一键复制:按钮或命令块点击,Toast 锚定提示;
  • 一键运行(主形态):每次新开专用终端直送执行;危险命令(danger: true)先确认、停在提示符不回车(双人工确认);
  • 主题跟随:全量 --dsw-alias-* 令牌,明暗/皮肤自动跟随宿主;
  • 数据可手改:命令库 = 人可手改的 commands.yml(写操作自动 .bak 备份)。

🏗 双形态(软依赖 better-sidebar)

没装 better-sidebar 装了 better-sidebar
存在方式 独立存在:右下角浮动图标 + 右侧抽屉 注册为侧边栏 Tab「命令」(order 45,终端与浏览器之间)
功能 浏览/搜索/复制/添加/编辑/删除/上次使用 全部 + 一键运行
数据 同一份 commands.yml / state.json,切换形态不丢 同左

better-sidebar 是可选依赖(peerDependencies optional):只装 cmd-pad 也能完整使用除「运行」外的所有功能。

📦 安装

方式 A:npm 安装(推荐)

# 1. 安装(<插件包目录> = node_modules/dsh-cmd-pad)
dsh plugin --profile web add node_modules/dsh-cmd-pad

# 2. 重启 dsh web + 浏览器硬刷新(Ctrl+Shift+R)

方式 B:Git 克隆安装

# 1. 获取插件(本仓库即发布物)
git clone https://github.com/luozhengswjtu/dsh-cmd-pad.git

# 2. 安装(<插件包目录> = 含 package.json 的 dsh-cmd-pad/ 目录)
dsh plugin --profile web add dsh-cmd-pad

# 3. 重启 dsh web + 浏览器硬刷新(Ctrl+Shift+R)
  • 要「运行」功能:另装 better-sidebar(与 cmd-pad 同样方式 dsh plugin --profile web add <目录>);
  • 验证:主形态 = 设置页「侧边卡片」出现「命令」卡片、+ 菜单出现「命令」;降级形态 = 页面右下角浮动图标。

🚀 使用

  • 打开:主形态 + 菜单选「命令」;降级形态点右下角浮动图标;
  • 常用操作:分组条筛选(全部 / 项目:当前工作区 / 上次使用 / 常驻 / 更多箭头)→ 点命令块或「复制」;/ 搜索;搜索框右侧「添加命令」;分组栏右侧「+」新建分组(自动常驻);右键菜单:卡片 = 复制/编辑/删除,分组 = 常驻/重命名/删除;
  • 运行(主形态):卡片「运行」→ 新开专用终端直送执行;危险命令先确认、停在提示符由你回车;
  • 数据位置:%USERPROFILE%\.dsh\profiles\web\cmd-pad\(commands.yml 可手改,重开面板生效;state.json 机器状态)。

🧪 开发与回归

  • 验收 harness 位于插件包 dsh-cmd-pad/test/(工作目录 dsh-cmd-pad/):node test/t0X-*.test.mjs,当前 153 项全过;
  • 升级 better-sidebar 后必须回归:终端直写走的是 better-sidebar 内部 WS 协议(未文档化),升级后跑 test/t07-ws-probe.mjs + test/t07-run.test.mjs;
  • 详细技术文档(数据层 API、主形态接入、视觉规范)见插件包内 dsh-cmd-pad/README.md。

📄 许可

MIT

← 上一个 Prev dsh-lan-access 下一个 Next dsh-cliproxyapi-provider →