YMRwithNoworry/dsh-nushell-only ↗★ 0
dsh-nushell-only
将 shell 执行统一为 Nushell,并在模型提示中注入 Nushell 语法指引 适合统一命令风格的团队环境,需保证仅有一个 shell 提供器并安装可用 Nushell。
安裝
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:YMRwithNoworry/dsh-nushell-only說明文件
閱讀完整 README ↗配置
补丁层默认配置(cordis.patch.yml):
- id: nushell-executor
name: dsh-nushell-only/executor
config:
timeoutMs: 60000
maxTimeoutMs: 600000
maxOutputBytes: 64000
graceMs: 3000
enforceNushellOnly: true # 拒绝把命令交给别的 shell
requireNu: true # 找不到 nu 就启动失败(而不是每次调用都失败)
verifyNu: true # 启动时跑一次 `nu --version`
- id: nushell-teaching
name: dsh-nushell-only/teaching
config:
guide: full # full | compact | off
rules: true
rewriteToolDescriptions: true
执行器可选项:
| 字段 | 默认 | 含义 |
|---|---|---|
nuPath | $DSH_NU_PATH → nu | Nushell 可执行文件;优先级:本字段 > 环境变量 > PATH |
nuArgs | ['--no-config-file','-c'] | argv 前缀,命令追加在最后 |
enforceNushellOnly | true | 守卫开关 |
foreignShellAllowlist | [] | 整条命令匹配的正则(字符串),命中则放行 |
requireNu | true | 无法解析 nu 时启动即失败 |
verifyNu / verifyTimeoutMs | true / 10000 | 启动探测 nu --version 及其超时 |
cwd、timeoutMs、maxTimeoutMs、maxOutputBytes、maxSpillBytes、graceMs 沿用 dsh 自己的 shell 设置命名空间,settings.yaml 的 shell: 段仍然可以热改预算。
在本 profile 的 cordis.patch.yml 里按 id 覆盖即可,例如:
- id: nushell-executor
config:
nuPath: 'C:\Users\me\AppData\Local\Programs\nu\bin\nu.exe'
enforceNushellOnly: false