Steven-Qiang/dsh-pwsh-guard ↗★ 0

dsh-pwsh-guard

拦截并拒绝终端中的 Shell 文本读写命令 适合需要限制智能体执行危险或低效 Shell 命令的场景。

套件
dsh-pwsh-guard
相容性
待驗證
版本
0.1.0
授權
MIT
最近更新
2026年10月20日

安裝

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Steven-Qiang/dsh-pwsh-guard

Configuration

All fields are optional.

- id: pwsh-guard
  name: 'dsh-pwsh-guard'
  config:
    enabled: true
    language: auto          # zh | en | auto
    tools: [pwsh, bash, ops_bash]
    disabledGroups: []      # textSearch | textRead | runtimeBypass | sleep | stderrMerge
    allowPatterns: []       # regexes matched against the raw command; a match allows the call
    rules: []               # extra rules, evaluated before the built-ins

language: auto follows DSH_LOCALE, then the host locale, then LANG / LC_ALL.

    rules:
      - id: no-force-push
        pattern: 'git\s+push\s+--force'
        title: 'Force push is blocked'
        hint: 'Use --force-with-lease instead'