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.
Install
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:liuxin4566-web/dsh-autoconfigREADME
Read the full README ↗安装到 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 的每条输入与设备输出,日志自动落盘。