liuxin4566-web/dsh-autoconfig ↗★ 0

dsh-autoconfig

Network device auto-configuration terminal for DSH Web UI: connect to routers, switches and firewalls over SSH, Telnet, serial console or SFTP; every agent operation is visible in the right-side terminal and recorded to a per-device log named by hostname, timestamp and IP.

套件
dsh-autoconfig
相容性
待驗證
Harness 依賴範圍
>=0.2.0
版本
0.1.2
授權
MIT
最近更新
2026年11月3日

安裝

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:liuxin4566-web/dsh-autoconfig

安装到 desktop profile(DSH Desktop 使用的 profile 名)

dsh plugin --profile desktop add .\dsh-autoconfig-0.1.2.tgz


若 `dsh` 不在 PATH,请使用 DSH 安装目录中的 `dsh`/`dsh.cmd`,或通过官方 npm 包执行:

```powershell
npx @deepseek-ai/dsh plugin --profile desktop add .\dsh-autoconfig-0.1.2.tgz

dsh plugin add 会把包加入 profile 依赖,并自动把声明了 dsh.bundle 的包加入 dsh.profile.bundles。当前 DSH 桌面版是 live profile,通常会热加载;若没有出现标签页,完全退出并重启 DSH Desktop。

SSH/SFTP 使用的 ssh2 已内联进宿主产物(MIT),因此不依赖 profile 对 ssh2 的模块解析;只有串口需要的 serialport 是运行时依赖。若 profile 暂时无法访问 npm,可先复制 lib、locale、package.json、cordis.patch.yml 到 %USERPROFILE%\.dsh\profiles\desktop\node_modules\dsh-autoconfig,并把 dsh-autoconfig 加入 profile 的 dependencies 与 dsh.profile.bundles(串口功能仍需 serialport 及其预编译绑定)。

串口依赖

serialport 带原生绑定,常见平台会优先使用预编译包。若 profile 的 pnpm 拦截了构建脚本,需要允许:


## 使用

1. 打开右侧边栏,选择「自动配置终端」标签页(或点「+ 连接」)。
2. 选择 SSH / Telnet / 串口 / SFTP,填写地址和凭据。
3. 在终端里直接操作;也可以回到对话让 AI 操作:

```text
连接 10.1.1.1 的 SSH,用户名 admin,密码 ...,设备名 core-sw-1

AI 会调用 device_connect,随后用 device_send / device_read 执行和读取命令。右侧终端会同步显示 AI 的每条输入与设备输出,日志自动落盘。