Skip to content

feat: add theme-lab — turn any image into a Hermes Desktop theme - #9

Open
0-CYBERDYNE-SYSTEMS-0 wants to merge 1 commit into
NousResearch:mainfrom
0-CYBERDYNE-SYSTEMS-0:feat/theme-lab
Open

feat: add theme-lab — turn any image into a Hermes Desktop theme#9
0-CYBERDYNE-SYSTEMS-0 wants to merge 1 commit into
NousResearch:mainfrom
0-CYBERDYNE-SYSTEMS-0:feat/theme-lab

Conversation

@0-CYBERDYNE-SYSTEMS-0

Copy link
Copy Markdown

What

Adds theme-lab — the first desktop-surface example in this repo. A Hermes Desktop plugin that turns any image into a full DesktopTheme (light + dark palettes, 16-color ANSI terminal palette), registered via THEMES_AREA so it appears live in Settings → Appearance, ⌘K, and /skin.

Why this belongs here

Per the repo README: "Reference plugins live here so plugin authors can read them, copy them, install them as user plugins" — and "These are not bundled with hermes-agent." This is exactly that: a focused, self-contained desktop plugin referencing the Desktop Plugin SDK. It is the first THEMES_AREA example in the repo (the existing examples are Python gateway/dashboard plugins that install to ~/.hermes/plugins/; a desktop plugin lives in ~/.hermes/desktop-plugins/ — a different SDK surface, documented in the README).

SDK surfaces it demonstrates

  • THEMES_AREA — register a DesktopTheme (colors + darkColors + ANSI terminal/darkTerminal).
  • PANES_AREA + PALETTE_AREA — the forge pane and a ⌘K command.
  • ctx.storage — persistence with a v1 → v2 schema migration.
  • Live apply without Settings — the app has no SDK API to set the active skin, but the gateway config.set display.skin=<name> RPC broadcasts skin.changed, which the desktop drains into a live repaint. The plugin writes the forged theme as a backend skin (~/.hermes/skins/<slug>.yaml) so the gateway can resolve it, then applies it live — no Settings visit.
  • Boot persistence — re-applies the saved appearance once the gateway is ready (the desktop hydrates the saved skin before plugin/backend themes exist, so it would otherwise snap to default).

How to install / test

cp -r theme-lab ~/.hermes/desktop-plugins/

The app hot-loads within seconds; ⌘K → Reload desktop plugins if it doesn't appear. Open the Theme Lab pane, drop an image, hit Apply — the theme applies live.

Notes

  • Standalone distribution (full history + issues): 0-CYBERDYNE-SYSTEMS-0/theme-lab. This example is pinned to that work.
  • Zero dependencies — pure-ESM plugin.js, only imports @hermes/plugin-sdk + react. Color math validated by a standalone Node harness (forge-math-test.cjs, no build).
  • Size note: at ~1690 LOC this is a complete, production-shaped plugin rather than a stripped ~200-LOC stub — it demonstrates the SDK end to end with real error handling, persistence, and migration. If reviewers would prefer a minimal single-surface version, I'm happy to trim.
  • Known limitation (documented in README + code): the live-apply backdoor writes to ~/.hermes/skins/ and requires the gateway; if unavailable it falls back to the honest Settings deep-link.

License

MIT (same as this repo).

First desktop-surface example in this repo. theme-lab is a Hermes Desktop
plugin that turns any image into a full DesktopTheme (light + dark palettes,
16-color ANSI terminal palette) registered via THEMES_AREA, live in settings,
Cmd-K, and /skin.

Demonstrates the Desktop Plugin SDK end to end:
- THEMES_AREA (DesktopTheme registration)
- PANES_AREA + PALETTE_AREA (forge pane + Cmd-K command)
- ctx.storage with v1->v2 schema migration
- Live apply without Settings via the gateway config.set display.skin RPC
  (writes a backend skin YAML the gateway can resolve, then applies live)
- Boot persistence (re-applies the saved appearance once the gateway is ready)

Install: cp -r theme-lab ~/.hermes/desktop-plugins/
Standalone distribution: github.com/0-CYBERDYNE-SYSTEMS-0/theme-lab
@0-CYBERDYNE-SYSTEMS-0 0-CYBERDYNE-SYSTEMS-0 changed the title feat: add theme-lab as desktop THEMES_AREA reference example feat: add theme-lab — turn any image into a Hermes Desktop theme Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant