feat: user defined auto approve commands
Resolved 💬 1 comment Opened Apr 19, 2025 by autotaker Closed Apr 19, 2025
Summary
Allow users to specify additional auto-approved commands via a safeCommands array in the config file.
- If a command starts with an entry in
safeCommands(i.e., all elements match as a prefix), it is auto-approved. - Example:
"npm test"insafeCommandswill auto-approve bothnpm testandnpm test --watch, but notnpm install.
Example
{
"safeCommands": ["npm test", "yarn build"]
}
["npm", "test"]→ auto-approved["npm", "test", "--watch"]→ auto-approved["npm", "install"]→ not auto-approved
Related
codex-cli/src/utils/config.tscodex-cli/src/approvals.tscodex-cli/tests/approvals.test.ts
PR
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗