packages/cli/src/commands/extensions/examples/policies/README.md
This extension demonstrates how to contribute security rules and safety checkers to the Gemini CLI Policy Engine.
The extension uses a policies/ directory containing .toml files to define:
rm -rf commands..env) using grep.gemini-extension.json: The manifest file.policies/: Contains the .toml policy files.Link this extension to your local Gemini CLI installation:
gemini extensions link packages/cli/src/commands/extensions/examples/policies
Restart your Gemini CLI session.
Observe the policies:
rm -rf rule.grep rule will deny the
request and display the custom deny message.allowed-path
safety checker.For security, Gemini CLI ignores any allow decisions or yolo mode
configurations contributed by extensions. This ensures that extensions can
strengthen security but cannot bypass user confirmation.