Skip to main content
S

dsh-shell-picker

schllor/dsh-shell-picker

Lets Windows users choose which shell the Agent's command tool runs in, detecting installed PowerShell 7, Windows PowerShell 5.1 and Git Bash from a picker panel.

Install

dsh plugin --profile web add github:schllor/dsh-shell-picker

README

dsh-shell-picker

Choose the shell interpreter the Agent's command tool runs commands in — PowerShell 7, Windows PowerShell 5.1, Git Bash, or another installed bash. The picker detects what is installed when it opens; the choice applies to the Agent's next command in every session.

Windows only.

Repository: https://github.com/schllor/dsh-shell-picker

Features

  • Automatic detection on open. The panel probes known install locations, the Microsoft Store pwsh.exe app alias, PATH, and a Git install found through git.exe, then reports versions.
  • One click to switch. Choose a row and the Agent's next shell command runs in that interpreter. Automatic restores the harness default.
  • Two entry points. A Shell · … chip below the composer in a conversation, and a terminal icon beside Settings at the sidebar foot, which works before a conversation exists.
  • The shipped executor is kept. The plugin does not replace the pwsh-sandbox row: it waits for that executor and dispatches its argv, so sandbox modes, approval flow, timeouts, output caps, background jobs, and the built-in Plugins → Shell settings keep working.
  • Bash-aware prompting. When a bash interpreter is selected, a runtime prompt section tells the model to write POSIX syntax and that the tool's PowerShell wording no longer applies.

Requirements

  • Windows (the plugin dispatches the Windows PowerShell executor; other platforms serve no UI).
  • DeepSeek Harness — developed and tested against 0.2.2-rc.5.

Install

Once listed in the awesome-dsh-plugin catalog, install it from the market/storefront. Before listing, or from a checkout:

  1. Open Plugins in the DSH Web or Desktop app.
  2. Choose Add plugin and select this directory — package.json declares dsh.bundle.patch, which is what makes it installable.
  3. Restart or reload the page if the app asks you to.

No build step is needed: the browser half is a plain module and the host half has no runtime dependencies.

Usage

  1. Open a conversation and click the shell chip below the composer, or click the terminal icon beside Settings in the sidebar.
  2. The panel scans for installed shells each time it opens. Pick one, or pick Automatic.
  3. The next command the Agent runs uses the selected interpreter. The choice is saved in shell-picker.json in the profile directory and survives restarts.

Detection is read-only: it checks known paths and PATH, then runs <shell> --version or the PowerShell version expression with a five-second bound. It does not read shell history or start a shell session.

Limits

  • The model-facing tool keeps the name pwsh; in bash mode the runtime prompt corrects the dialect. Switching dialects changes the prompt and invalidates the cached request prefix once.
  • In confined sandbox modes the chosen interpreter is wrapped exactly like any other command; a shell that needs locations outside the writable roots fails the same way.
  • The selection is per profile, not per session. Removing the bundle leaves shell-picker.json behind; delete it to reset.
  • The Microsoft Store pwsh.exe alias cannot be stat-ed by Node (the alias returns EACCES) but spawns normally; detection accounts for that.

中文说明

让 Windows 上的 DeepSeek Harness 用户在 Agent 执行命令时选择 shell 解释器:PowerShell 7、Windows PowerShell 5.1、Git Bash 或其他已安装的 bash。打开选择面板时会自动探测本机已安装的 shell 并显示版本,选中后对之后所有会话中 Agent 执行的下一条命令生效,选“自动”则恢复默认行为。

  • 入口:会话输入框下方的 Shell · … 胶囊,以及侧栏底部 Settings 旁的终端图标(没有会话时也能打开)。
  • 不替换 pwsh-sandbox 组成行,只接管它的 argv 构造,因此沙箱、审批、超时、输出上限、后台任务和 Plugins → Shell 设置页都保持原样。
  • 选择 bash 时会注入一段运行时提示,告诉模型改用 POSIX 语法(工具名仍为 pwsh)。
  • 仅 Windows;已在 DeepSeek Harness 0.2.2-rc.5 上开发和测试。
  • 选择保存在 profile 目录的 shell-picker.json,重启后仍在。探测只读取已知安装路径和 PATH,并带超时执行版本查询,不读取 shell 历史或用户文件。

安装:在 DSH 的 Plugins → Add plugin 中选择本目录(package.json 声明的 dsh.bundle.patch 使其可安装);收录进市场后也可直接从市场安装。无需构建。

License

MIT — see LICENSE.

Related plugins