AI Command Gatekeeper is a VS Code-family extension (VS Code / Cursor / Antigravity) that acts as a security control layer for shell commands proposed by AI agents such as Kilo, Roo, and Cline.
- Receives command requests through command hooks.
- Analyzes risk using deny-lists, allow-lists, obfuscation signals, and pipe-to-shell detection.
- Makes policy-driven decisions:
allow | ask | deny. - Executes approved commands in a controlled terminal with safe
cwdhandling. - Writes audit logs to the Output channel and JSONL log file.
- Install dependencies:
npm install- Build:
npm run compile- Package VSIX:
npm run package:vsix- Install the VSIX in VS Code/Cursor/Antigravity using
Extensions: Install from VSIX....
aiCommandGatekeeper.submitCommandRequestaiCommandGatekeeper.submitCommandTextaiCommandGatekeeper.evaluateCommandRequestaiCommandGatekeeper.runClipboardCommandaiCommandGatekeeper.applyKnownAgentSettingsaiCommandGatekeeper.cline.submitShellCommandaiCommandGatekeeper.roo.submitShellCommandaiCommandGatekeeper.kilo.submitShellCommand
- Default policy file:
.ai-command-gatekeeper/policy.json - Can be configured via VS Code settings:
aiCommandGatekeeper.* - Strict policy example:
examples/policy.strict.json
critical: always denied (matched blocked patterns)high: default isask(orallowifautoExecute.highRiskis enabled)medium: default isallowlow: default isallow
- Agent integrations:
docs/integration-kilo-roo-cline.md - Security model:
docs/security-model.md - Implementation plan:
docs/plans/2026-02-19-ai-command-gatekeeper-vscode-family.md