Skip to content

CC Switch 通用 permisions 配置

mac

JSON
"permissions": {
    "allow": [
      "Bash(git status)",
      "Bash(git log:*)",
      "Bash(git diff:*)",
      "Bash(git add:*)",
      "Bash(git stash:*)",
      "Bash(git branch:*)",
      "Bash(git switch:*)",
      "Bash(git checkout:*)",
      "Bash(npm test:*)",
      "Bash(npm run lint:*)",
      "Bash(npm run dev:*)",
      "Bash(npm run typecheck:*)",
      "Bash(npx tsc:*)",
      "Bash(bun run:*)",
      "Bash(bun test:*)",
      "Bash(node:*)",
      "Bash(python3:*)",
      "Bash(mkdir -p:*)",
      "Bash(cp:*)",
      "Bash(mv:*)",
      "Bash(cat:*)",
      "Bash(echo:*)",
      "Bash(ls:*)",
      "Bash(find:*)",
      "Bash(grep:*)",
      "Bash(wc:*)",
      "Bash(which:*)",
      "Bash(gh api:*)",
      "Bash(gh repo:*)",
      "WebSearch",
      "Read(**)",
      "Edit(src/**)",
      "Edit(Sources/**)",
      "Edit(Tests/**)",
      "Edit(tests/**)",
      "Write(src/**)",
      "Write(Sources/**)",
      "Write(Tests/**)"
    ],
    "deny": [
      "Bash(rm -rf:*)",
      "Bash(sudo:*)",
      "Bash(curl * | *)",
      "Bash(wget * | *)",
      "Write(/Users/zhangyuming/.ssh/*)",
      "Edit(.env.production)",
      "Edit(.env.prod)",
      "Read(.env.production)"
    ],
    "ask": [
      "Bash(git commit:*)",
      "Bash(git push:*)",
      "Bash(git merge:*)",
      "Bash(git rebase:*)",
      "Bash(npm install:*)",
      "Bash(npm run build:*)",
      "Bash(brew install:*)",
      "Edit(package.json)",
      "Edit(Podfile)",
      "Edit(tsconfig.*)",
      "Edit(vite.config.*)",
      "Write(**)"
    ]
  },

windows

待补充

JSON