MAXeaglet/dsh-bash-terminal10

dsh-bash-terminal

DSH 终端工具插件:支持在 Windows 上通过 PowerShell、Git Bash 或 WSL 执行命令,并可在网页设置中指定默认终端。

AI 分析

核心用途是赋予智能体在用户指定的本地终端环境中执行 Shell 命令的能力。适合需要在 Windows 环境下进行本地自动化运维、代码运行或系统管理的用户。

包名
dsh-bash-terminal
版本
0.3.14
许可证
MIT
最近更新
2026年8月16日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:MAXeaglet/dsh-bash-terminal

使用

用户在 Web UI 设置默认终端:打开设置(齿轮)→ 通用 →「默认终端」下拉,选择 PowerShell / Git Bash / WSL 之一。改动即时生效并持久化。

模型看到 shell 工具后,执行命令时自动使用你选择的终端(工具不暴露终端参数,模型无法更改你的选择):

  • 默认终端 = Git Bash 时:shell(command: "git status") 走 Git Bash
  • 默认终端 = WSL 时:shell(command: "ls -la /mnt/d/WorkSpace") 走 WSL;传 distro: "Ubuntu" 可指定发行版
  • 默认终端 = PowerShell 时:shell(command: "Get-Process node") 走 PowerShell

模型使用示例

  • 一次性命令(默认终端):shell(command: "git status", description: "查看 git 状态")
  • 跨轮保持状态(交互式):terminal(action: "open") → 记下 sessionIdterminal(action: "send", sessionId, input: "cd /d/project\n")terminal(action: "send", sessionId, input: "npm run dev\n")terminal(action: "close", sessionId)
  • 中断正在运行的程序:terminal(action: "signal", sessionId, signal: "SIGINT")
  • 查看活动会话:terminal(action: "list")
  • 沙箱拒绝后升级:shell(command: ..., sandbox_permissions: "workspace-write", justification: "...")

配置

Web UI 设置(推荐):设置 → 通用 →「默认终端」。

插件 row 的 config(覆盖默认,作为设置的 composition 基准):

默认说明
defaultShellpowershell设置未覆盖时的后端
timeoutMs120000默认超时
maxTimeoutMs600000调用方 timeoutMs 上限
pwshPath自动探测固定 pwsh.exe 路径
gitBashPath自动探测固定 git bash.exe 路径
wslPath自动探测固定 wsl.exe 路径