Install in Hermes Agent
Have Hermes install and connect LeoPrevent for you, or copy the local plugin package and add its hooks yourself.
LeoPrevent works with Hermes Agent on your machine. It installs as a local package plus three hooks in your Hermes config. Have Hermes do it for you, or run the commands yourself.
Before you start#
- Hermes Agent is installed.
gitis installed.- You have a LeoPrevent account, and you work in a git repository.
Set it up with your agent#
Hermes copies the package, adds the hooks and opens your browser to connect it. The same prompt is in the dashboard under Plugin setup, with Copy.
Start Hermes and send this prompt:
Install LeoPrevent for Hermes from https://github.com/leotrace-hq/leoprevent-plugin, copying hermes/leoprevent into ~/.hermes/leoprevent. Copy the contents of ~/.hermes/leoprevent/commands-plugin/. into ~/.hermes/plugins/leoprevent/ and run hermes plugins enable leoprevent for the /leoprevent: commands. If ~/.hermes/config.yaml has an active hooks: block, merge the three entries from ~/.hermes/leoprevent/hooks.yaml into it, keeping existing hooks. Otherwise append hooks.yaml to config.yaml; a commented-out example is not an active block. Then run ~/.hermes/leoprevent/bin/leoprevent-plugin login --agent=hermes. Keep login running until it prints "LeoPrevent · Connected". Afterwards, ask me to restart Hermes, start a new hermes chat and approve the three LeoPrevent hooks. Browser login saves the credential locally, so no licence key needs to be copied. Do not ask for, paste, or print one; keep credentials out of this transcript. Tell me what I need to approve or restart myself. Verify with a real turn, not by running the hook by hand: LeoPrevent fails open, so a successful manual run does not prove your coding agent invokes it. Confirm that turn appears in the LeoPrevent dashboard; report verification as pending if you cannot check it.Approve what it asks for and choose Link installation when the browser opens. Then restart Hermes, start a new chat and approve the three LeoPrevent hooks.
Manual setup#
- 1Download the plugin
git clone --depth 1 https://github.com/leotrace-hq/leoprevent-plugin ~/.hermes/leoprevent-source - 2Install the local package
mkdir -p ~/.hermes/leoprevent cp -R ~/.hermes/leoprevent-source/hermes/leoprevent/. ~/.hermes/leoprevent/ - 3Enable the commands
mkdir -p ~/.hermes/plugins/leoprevent cp -R ~/.hermes/leoprevent/commands-plugin/. ~/.hermes/plugins/leoprevent/ hermes plugins enable leopreventRestart Hermes and start a new session. Type
/leoprevent:to see the commands in the CLI, TUI and desktop app. Messaging menus do not show them. - 4Add the hooks
This adds the hooks when your config has no
hooks:block. If it has one, add the three entries from~/.hermes/leoprevent/hooks.yamlto it instead.grep -q '^hooks:' ~/.hermes/config.yaml || cat ~/.hermes/leoprevent/hooks.yaml >> ~/.hermes/config.yaml - 5Approve the hooks
Start a new Hermes chat and approve the three LeoPrevent hooks when it asks. To check they are there, run:
hermes hooks list - 6Connect to LeoPrevent
Run this in a terminal, then choose Link installation on the page it opens in your browser. Keep it running until it prints LeoPrevent · Connected.
~/.hermes/leoprevent/bin/leoprevent-plugin login --agent=hermes
Check it worked#
Paste this into your agent and let it reply. The finished turn is what checks in.
Hello! I just installed LeoPrevent. Say hi back so this turn finishes.The installation then shows as Live in Plugin setup. See Check it's working.
Already installed this before?#
Copy the package and commands plugin again, then restart Hermes and start a new session. Your LeoPrevent connection survives.
Update#
See Update the plugin.
Remove#
Delete the ~/.hermes/leoprevent and ~/.hermes/plugins/leoprevent folders, remove the three LeoPrevent entries from the hooks: block in ~/.hermes/config.yaml, then restart Hermes. You can also delete ~/.hermes/leoprevent-source.