Skip to main content
Every Herm plugin exports a HermPlugin object. Herm calls tui(api) when the plugin activates and cleans up registered resources when it deactivates.

HermPlugin

Use a stable, globally unique id, such as acme.hello.

Slots

The type surface defines these slots: app_bottom currently uses single_winner composition. Lower order values win.

Routes

Routes append top-level tabs after Herm’s built-in tabs. navigate() also understands built-in slash route names such as memory and marketplace.

Commands

Commands appear in the Ctrl+K command palette. Use stable value strings so command identity survives title changes.

Events

The return value is a disposer. Herm also scope-tracks it, so plugin deactivation removes the listener.

UI helpers

Use these helpers instead of building ad hoc dialogs when a standard prompt, alert, confirmation, toast, or select list is enough.

KV state

KV data persists in Herm preferences. Runtime wrapping prefixes keys with the plugin id, so plugin code should pass local key names.

Theme

Read colors from api.theme.current. Raw hex values do not update when the user changes theme.

Keybindings

api.keys is read-only. Plugins cannot register new keybindings today.

Gateway client

api.client is Herm’s gateway client. Use it for request/response calls that must go through the live Hermes gateway. Keep method names aligned with gateway source. Do not invent RPC names in plugins or docs.

Eikon rasterizers

A rasterizer contributes an image-to-text backend to Eikon Studio. The Studio handles spatial preprocessing and passes a prepared render window to the rasterizer.

Lifecycle

Use the abort signal for long-running async work. Use onDispose() for intervals, file watchers, subprocesses, or other resources not registered through Herm’s scoped APIs.

Rendering constraints

  • Return OpenTUI React nodes.
  • Use current theme tokens for colors.
  • Keep slot renderers small. Heavy work should happen outside render.
  • Do not assume type-defined slots are mounted. Check current host support first.

Current limitations

  • Plugins are bundled at build time.
  • User-installed plugin directories are not loaded yet.
  • Plugin keybinding registration is not available yet.
  • app_bottom is the current mounted slot. Other slots are type-defined for host growth.