LoserFox/marisa-distro--plugins-dsh-bash-terminal ↗★ 7
dsh-bash-terminal
DSH plugin (Marisa fork of MAXeaglet/dsh-bash-terminal 0.3.14): one shell tool that runs commands through PowerShell, MSYS2, Git Bash, or WSL on Windows. Default terminal chosen by the user in Web UI settings; the model may switch per call via the shell argument when the user asks.
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:LoserFox/marisa-distro#4aa96256d0af09fa65e64679a1c7826342e9ded2&path:plugins/dsh-bash-terminal说明文档
阅读完整 README ↗使用
用户在 Web UI 设置默认终端:打开设置(齿轮)→ 通用 →「默认终端」下拉,选择 PowerShell / MSYS2 / 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")→ 记下sessionId→terminal(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 基准):
| 键 | 默认 | 说明 |
|---|---|---|
defaultShell | powershell | 设置未覆盖时的后端 |
timeoutMs | 120000 | 默认超时 |
maxTimeoutMs | 600000 | 调用方 timeoutMs 上限 |
pwshPath | 自动探测 | 固定 pwsh.exe 路径 |
gitBashPath | 自动探测 | 固定 git bash.exe 路径 |
wslPath | 自动探测 | 固定 wsl.exe 路径 |