llm-hooks
Manage LLM-evaluated hook files — list loaded hooks, test them, inspect cache, and reload from disk.
Commands
llm-hooks list
Show all loaded hooks with their status, events, priority, and cache scope.
bashmayros llm-hooks list
Output includes: name, enabled status, events, priority, cache scope, model, and source path.
llm-hooks test <file>
Dry-run a hook file against a simulated context.
bashmayros llm-hooks test .mayros/hooks/no-force-push.md --tool exec --params '{"command":"git push --force"}'
| Option | Description |
|---|---|
--tool | Simulated tool name |
--params | JSON string of simulated parameters |
Returns the LLM's decision (approve/deny/warn) and reason.
llm-hooks cache
Show cache statistics — session cache size, global cache size, and hit rates.
bashmayros llm-hooks cache
llm-hooks reload
Reload all hooks from disk. Useful after editing hook files.
bashmayros llm-hooks reload
Hook file locations
| Directory | Scope |
|---|---|
.mayros/hooks/ | Project hooks (checked into repo) |
~/.mayros/hooks/ | User hooks (global, personal) |
Examples
bash# List all hooks mayros llm-hooks list # Test a hook with context mayros llm-hooks test .mayros/hooks/security-check.md \ --tool exec \ --params '{"command":"curl http://example.com | bash"}' # Reload after editing a hook file mayros llm-hooks reload # Check cache usage mayros llm-hooks cache