-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
hermes plugins install scross01/hermes-custom-dangerous-patterns-plugin
hermes plugins enable custom-dangerous-patternsThe install command clones the repo into ~/.hermes/plugins/custom-dangerous-patterns/
and prompts to enable it. Use --enable to skip the prompt:
hermes plugins install scross01/hermes-custom-dangerous-patterns-plugin --enablehermes plugins update custom-dangerous-patternsThen restart Hermes for the changes to take effect.
git clone https://github.com/scross01/hermes-custom-dangerous-patterns-plugin.git \
~/.hermes/plugins/custom-dangerous-patternsOr if you already have the source elsewhere:
ln -s /path/to/hermes-custom-dangerous-patterns-plugin \
~/.hermes/plugins/custom-dangerous-patternsImportant: The directory inside ~/.hermes/plugins/ must be named custom-dangerous-patterns
(with the trailing s).
Then enable:
hermes plugins enable custom-dangerous-patternsEasiest — use the interactive bootstrap:
hermes custom-dangerous-patterns init --with-examplesThis creates ~/.hermes/custom-dangerous-patterns/ (a directory) with:
-
00-test.yaml— safe[TEST]patterns (all disabled) - All bundled example files copied individually (
01-cloud.yaml,02-infra.yaml, etc.) — fully-enabled example patterns (only with--with-examples)
Without --with-examples, creates a minimal config directory with safe test patterns (all disabled).
Or create ~/.hermes/custom-dangerous-patterns/ manually — see Configuration.
Note: Directory mode is the preferred configuration setup. The plugin also supports a single
custom-dangerous-patterns.yamlfile or combined mode where both the directory and sibling.yamlfile are loaded and merged together.
The plugin loads at startup. Restart the gateway or start a new CLI session:
hermes gateway restart # if using the gateway
# or just start a new `hermes` CLI sessionTest your patterns without running real commands:
hermes custom-dangerous-patterns test "vultr instance delete --instance-id cb670a12"Then try it live:
> vultr instance delete --instance-id cb670a12-e4f5-6d78-ab90-1234567890ab
⚠️ Dangerous command detected: Vultr destructive instance/snapshot command
vultr instance delete --instance-id cb670a12-e4f5-6d78-ab90-1234567890ab
[o]nce — allow this one time
[s]ession — allow for this session
[a]lways — always allow this pattern
[d]eny — block (default)
Check that the plugin is enabled:
hermes plugins list | grep custom-dangerous-patternsIf not listed, enable it:
hermes plugins enable custom-dangerous-patterns-
Verify the plugin loaded and see active patterns:
hermes custom-dangerous-patterns list
-
Test a command against your patterns:
hermes custom-dangerous-patterns test "vultr instance delete"
-
Check the plugin logs for errors:
hermes custom-dangerous-patterns logs
-
Ensure you restarted Hermes after enabling the plugin or changing config.
-
Validate your config syntax:
hermes custom-dangerous-patterns validate
Allow patterns are checked before block patterns. If a command matches both, the allow wins. Test your pattern matching:
hermes custom-dangerous-patterns test "vultr account info" --verboseThe --verbose output shows which patterns matched and the result.
The plugin looks for ~/.hermes/custom-dangerous-patterns.yaml (single file)
or ~/.hermes/custom-dangerous-patterns/ (directory). Override with:
export HERMES_CUSTOM_PATTERNS_PATH=/path/to/config.yaml
# Or point to a directory:
export HERMES_CUSTOM_PATTERNS_PATH=/path/to/config-directory/