hooks/hermes/README.md
Rewrites Hermes terminal tool commands to RTK equivalents before execution, so Hermes receives compact command output without changing your workflow.
rtk init --agent hermes
The installer writes the plugin to ~/.hermes/plugins/rtk-rewrite/ and enables it through plugins.enabled in the Hermes config. The repository copy lives in hooks/hermes/; don't use that repo path as the runtime install path.
Run the Hermes plugin tests from the repository root:
python3 -m unittest discover -s hooks/hermes
Hermes loads plugins from Python, so the plugin entrypoint is Python. The Python code is only a thin Hermes adapter. It reads the Hermes terminal tool payload, calls rtk rewrite for the actual command decision, then mutates the terminal tool command before Hermes executes it.
All rewrite rules stay in Rust inside rtk rewrite. When RTK adds or changes command rewrite behavior, the Hermes plugin picks up that behavior by delegating to the RTK binary.
The plugin does not block command execution. If anything goes wrong, Hermes runs the original command unchanged.
If rtk is not available in PATH when Hermes loads the plugin, the plugin prints a warning and skips hook registration.
rtk is missing from PATHrtk rewrite exits with an errorcommandterminal tool calls are rewritten.rtk rewrite stay unchanged, including commands already prefixed with rtk, compound shell commands, heredocs, and commands without an RTK filter.