Video as code: canvas scenes rendered with WebCodecs in headless Chrome, a review viewer, and agent skills that build the video from your references.
Setup: --skill hermes, and --skill muse for Muse Code (#4)
Stanyslaus Haryd468929d5172
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex b605c34..bc45515 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -4,6 +4,10 @@ Changes are listed by release, newest first. The sections dated before 0.1.0 rec## Unreleased+### Added++- `--skill hermes` for setup and the installer puts the skills where Hermes Agent reads them: `skills/` in its home, which is `HERMES_HOME` when that is set, else `~/.hermes`, or `%LOCALAPPDATA%\hermes` on Windows. Hermes does not read `~/.agents/skills` unless it is added to its config. `--skill muse` is another name for `agents`, because Muse Code reads `~/.agents/skills`. The README and the install docs list both agents. Checked on the Windows laptop with a test home: setup copied both skills to the two folders, and `motlab uninstall` removed them again. Neither agent was installed here, so neither has loaded the skills yet.+### Fixed- Running motlab as root, as in a container or on a VPS logged in as root, failed at the first scene with "Chrome exited early (code 1): Running as root without --no-sandbox is not supported", because Chrome refuses to start as root and motlab passed no such flag. Chrome now gets `--no-sandbox` when motlab runs as root, and only then; motlab only opens the user's own pages. Checked on Ubuntu 24.04 as root, no GPU, Google Chrome 157: `motlab render example --scale 1` went from failing at once to a 9 s, 1080p render in 13.6 s (8.5 s on a repeat run, with the encoder probe cached), and `npm test` passed 34/34. Not tried: a non-root user in a container where Chrome's sandbox still fails.@@ -12,7 +16,7 @@ Changes are listed by release, newest first. The sections dated before 0.1.0 rec### Changed- The copyright line in `LICENSE` names Stanyslaus Hary (motlab) instead of "motlab contributors". The licence is still MIT.-- The repository has a sponsor button (`.github/FUNDING.yml`, Ko-fi and Saweria), and the README has a star history chart above the licence.+- The repository has a sponsor button (`.github/FUNDING.yml`, GitHub Sponsors, Ko-fi and Saweria), and the README has a star history chart above the licence.## 0.2.2 (2026-11-17)diff --git a/README.md b/README.mdindex da91b17..a6a3023 100644--- a/README.md+++ b/README.md@@ -56,8 +56,9 @@ Setup installs the skills for Claude Code unless you name another agent:| Your agent | Setup command ||---|---|| Claude Code | `npx @motlab/cli setup` |-| Codex, Cursor, OpenCode, GitHub Copilot, Gemini CLI, Amp, Windsurf | `npx @motlab/cli setup --skill agents` |+| Codex, Cursor, OpenCode, GitHub Copilot, Gemini CLI, Amp, Windsurf, Muse Code | `npx @motlab/cli setup --skill agents` || Antigravity (App and CLI) | `npx @motlab/cli setup --skill antigravity` |+| Hermes Agent | `npx @motlab/cli setup --skill hermes` || Several of them | `npx @motlab/cli setup --skill claude,agents,antigravity` || Any other agent | `npx @motlab/cli setup --skill-dir <its skill folder>` |@@ -161,7 +162,7 @@ Footage is decoded inside the page with Mediabunny, so a scene can cut and trim<br>-> `motlab setup` and the installer copy it for Claude Code by default. `--skill agents` covers Codex, Cursor, OpenCode, GitHub Copilot, Gemini CLI, Amp and Windsurf, and `--skill antigravity` the Antigravity App and CLI. `--skill-dir` takes any other agent's skill folder.+> `motlab setup` and the installer copy it for Claude Code by default. `--skill agents` covers Codex, Cursor, OpenCode, GitHub Copilot, Gemini CLI, Amp, Windsurf and Muse Code, `--skill antigravity` the Antigravity App and CLI, and `--skill hermes` Hermes Agent. `--skill-dir` takes any other agent's skill folder.</details>diff --git a/ROADMAP.md b/ROADMAP.mdindex 571f29b..59dd2aa 100644--- a/ROADMAP.md+++ b/ROADMAP.md@@ -30,7 +30,7 @@ What is not built, what has not been tested, and ideas that came up while using- The asset skill's FBX and OBJ files in programs other than Blender (Unity, Unreal, Maya, Cinema 4D).- `svgparts.js` and `transition.js` in the viewer. They were checked with stills and a video render.- Notes on a real touch screen. Touch was emulated in Chrome over the DevTools protocol.-- The skills in agents other than Claude Code. The installer was run with `--dry-run` for every target, and the folders come from each agent's docs, but no other agent has loaded the skills or made a video with them yet.+- The skills in agents other than Claude Code. The installer was run with `--dry-run` for every target, and the folders come from each agent's docs, but no other agent has loaded the skills or made a video with them yet. That includes Muse Code and Hermes Agent, added from their docs in November 2026.## Questions about speeddiff --git a/docs/install-for-agents.md b/docs/install-for-agents.mdindex 4663152..7dc1dd0 100644--- a/docs/install-for-agents.md+++ b/docs/install-for-agents.md@@ -38,7 +38,7 @@ If they already have a clone and only want the newest version, run `motlab updat## 3. Run the installer-Pick the skill target for the agent you are, from the table in [install.md](install.md#with-the-installer): `claude` for Claude Code, `agents` for Codex, Cursor, OpenCode, GitHub Copilot, Gemini CLI, Amp and Windsurf, `antigravity` for the Antigravity App and CLI. If the user also works in other agents, ask which, and join the targets with commas. For an agent not in the table, look up its user skill folder in its own docs and pass `--skill-dir <folder>` instead. Run a dry run first and show the user where files will go:+Pick the skill target for the agent you are, from the table in [install.md](install.md#with-the-installer): `claude` for Claude Code, `agents` for Codex, Cursor, OpenCode, GitHub Copilot, Gemini CLI, Amp, Windsurf and Muse Code, `antigravity` for the Antigravity App and CLI, `hermes` for Hermes Agent. If the user also works in other agents, ask which, and join the targets with commas. For an agent not in the table, look up its user skill folder in its own docs and pass `--skill-dir <folder>` instead. Run a dry run first and show the user where files will go:```bashnode install.js --skill <target> --dry-rundiff --git a/docs/install.md b/docs/install.mdindex 51350a1..ef3e1bb 100644--- a/docs/install.md+++ b/docs/install.md@@ -90,13 +90,14 @@ Skill targets. Each one is the agent's user skill folder, as its docs gave it in| Target | Folder | Read by ||---|---|---|| `claude` | `~/.claude/skills/` | Claude Code. Cursor, OpenCode and Amp read it too |-| `agents` (or `codex`) | `~/.agents/skills/` | Codex, Cursor, OpenCode, GitHub Copilot, Gemini CLI, Amp, Windsurf |+| `agents` (or `codex`, `muse`) | `~/.agents/skills/` | Codex, Cursor, OpenCode, GitHub Copilot, Gemini CLI, Amp, Windsurf, Muse Code || `antigravity` | `~/.gemini/config/skills/` | Antigravity, the App and the CLI |+| `hermes` | `skills/` in Hermes's home: `HERMES_HOME` if set, else `~/.hermes/` (`%LOCALAPPDATA%\hermes\` on Windows) | Hermes Agent || `opencode` | `~/.config/opencode/skills/` | OpenCode || `cursor` | `~/.cursor/skills/` | Cursor || `copilot` | `~/.copilot/skills/` | GitHub Copilot |-`claude,agents,antigravity` covers every agent in the table. An agent that reads two of these folders finds the skill in both; OpenCode and Amp keep one, and the others may list it twice. For any other agent, find its user skill folder in its docs and pass it with `--skill-dir`, for example Windsurf's own `~/.config/devin/skills`. The Antigravity CLI also reads `~/.gemini/antigravity-cli/skills/` and `~/.gemini/skills/`, and the App reads neither, so the installer uses the folder they share. A copy in one of the CLI's own folders wins over it in the CLI, so delete an old one there. Codex used `~/.codex/skills/` before; a copy left there by an older installer can be deleted.+`claude,agents,antigravity,hermes` covers every agent in the table. An agent that reads two of these folders finds the skill in both; OpenCode and Amp keep one, and the others may list it twice. Muse Code also reads `~/.claude/skills/`, so after `claude,agents` it may list motlab twice. Hermes reads `~/.agents/skills/` only when it is listed under `skills.external_dirs` in its `config.yaml`; `--skill hermes` copies the skills into its own folder instead. A Hermes profile has its own home, so run setup with that profile's `HERMES_HOME` set to put the skills there. For any other agent, find its user skill folder in its docs and pass it with `--skill-dir`, for example Windsurf's own `~/.config/devin/skills`. The Antigravity CLI also reads `~/.gemini/antigravity-cli/skills/` and `~/.gemini/skills/`, and the App reads neither, so the installer uses the folder they share. A copy in one of the CLI's own folders wins over it in the CLI, so delete an old one there. Codex used `~/.codex/skills/` before; a copy left there by an older installer can be deleted.The installer never installs Chrome, ffmpeg or Python. An existing link at a skill path is removed as a link, so the folder it pointed at is not touched. A folder there that has no `SKILL.md` is left alone unless you pass `--force`.diff --git a/install.js b/install.jsindex 90a8e6c..e058bb0 100644--- a/install.js+++ b/install.js@@ -2,7 +2,9 @@// Installs motlab from this folder: npm packages, a `motlab` command on PATH and the agent skills (motlab, motlab-assets).//// node install.js engine, command and the skills for Claude Code-// node install.js --skill agents the skills in ~/.agents/skills (Codex, Cursor, OpenCode, Copilot, Gemini CLI, Amp, Windsurf)+// node install.js --skill agents the skills in ~/.agents/skills (Codex, Cursor, OpenCode, Copilot, Gemini CLI, Amp,+// Windsurf, Muse Code)+// node install.js --skill hermes the skills in Hermes Agent's own folder// node install.js --skill claude,antigravity several agents at once (see SKILL_DIRS; none for no skills)// node install.js --skill-dir <dir> the skills in any other agent's skill folder// node install.js --link link the skills to this folder instead of copying them (for working on a skill)@@ -24,12 +26,17 @@ import { onUserPath } from './src/userpath.js';const HERE = dirname(fileURLToPath(import.meta.url)), WIN = process.platform === 'win32', HOME = homedir();// Each agent's user skill folder, from its docs (November 2026). ~/.agents/skills is the shared one: Codex reads only that,-// and Cursor, OpenCode, Copilot, Gemini CLI, Amp and Windsurf read it too. Claude Code and Antigravity do not.+// and Cursor, OpenCode, Copilot, Gemini CLI, Amp, Windsurf and Muse Code read it too. Claude Code, Antigravity and+// Hermes do not. Hermes reads the skills folder in its home: HERMES_HOME, else ~/.hermes, or %LOCALAPPDATA%\hermes on Windows.const AGENTS = join(HOME, '.agents', 'skills');+const HERMES = process.env.HERMES_HOME ? resolve(process.env.HERMES_HOME.replace(/^~(?=$|[\\/])/, HOME))+ : WIN ? join(process.env.LOCALAPPDATA || join(HOME, 'AppData', 'Local'), 'hermes') : join(HOME, '.hermes');const SKILL_DIRS = {claude: join(HOME, '.claude', 'skills'),agents: AGENTS,codex: AGENTS,+ muse: AGENTS,+ hermes: join(HERMES, 'skills'),antigravity: join(HOME, '.gemini', 'config', 'skills'), // the one folder both the Antigravity App and the CLI (agy) readopencode: join(HOME, '.config', 'opencode', 'skills'),cursor: join(HOME, '.cursor', 'skills'),@@ -50,7 +57,7 @@ const found = o.update ? Object.values(SKILL_DIRS).filter(d => existsSync(join(dconst targets = (o.skill ?? (o.update ? 'none' : 'claude')).split(',').map(t => t.trim()).filter(t => t && t !== 'none');const bad = targets.filter(t => !SKILL_DIRS[t]);if (bad.length) { console.error(`unknown --skill ${bad.join(', ')}; use ${Object.keys(SKILL_DIRS).join(', ')}, none, or --skill-dir <dir>`); process.exit(1); }-const skillDirs = [...new Set([...targets.map(t => SKILL_DIRS[t]), // codex and agents are one folder+const skillDirs = [...new Set([...targets.map(t => SKILL_DIRS[t]), // codex, muse and agents are one folder...(o['skill-dir'] || []).map(d => resolve(d.replace(/^~(?=$|[\\/])/, HOME))), ...(last.skillDirs || []), ...found])];const link = o.link ?? !!last.link;const dry = o['dry-run'], say = s => console.log(dry ? `[dry run] ${s}` : s);diff --git a/src/cli.js b/src/cli.jsindex 369e36b..9157eb8 100644--- a/src/cli.js+++ b/src/cli.js@@ -22,7 +22,7 @@ const USAGE = `motlab: render a canvas page (canvas #c, renderAt(t), TOTAL, readmotlab video <page.html> <out.mp4> [--fps 24] [--scale 2] [--audio file] [--encoder auto|hw|sw] [--workers N]motlab events <page.html> <out.json>motlab doctor check Node, Chrome, ffmpeg and the skill's Python packages- motlab setup [--skill claude|agents|antigravity|...] [--skill-dir <dir>] [--link] [--update] [--dry-run]+ motlab setup [--skill claude|agents|antigravity|hermes|...] [--skill-dir <dir>] [--link] [--update] [--dry-run]copy the skills to agent folders (after npm install -g; defaultClaude Code), and add the command when npm's folder is not onPATH. --update copies them again where they went beforediff --git a/test/install.test.js b/test/install.test.jsindex a7d719f..ae49eb8 100644--- a/test/install.test.js+++ b/test/install.test.js@@ -65,6 +65,23 @@ test('motlab setup copies the skills and nothing else', () => {} finally { rmSync(home, { recursive: true, force: true }); }});+// Muse Code reads ~/.agents/skills. Hermes reads only the skills folder in its home: HERMES_HOME when it is set, else+// ~/.hermes, or %LOCALAPPDATA%\hermes on Windows.+test('setup --skill muse,hermes puts the skills where Muse Code and Hermes read them', () => {+ const home = mkdtempSync(join(tmpdir(), 'motlab-home-'));+ try {+ const run = extra => spawnSync(process.execPath, ['bin/motlab.js', 'setup', '--skill', 'muse,hermes', '--dry-run'],+ { encoding: 'utf8', env: { ...process.env, HOME: home, USERPROFILE: home, LOCALAPPDATA: join(home, 'local'), HERMES_HOME: '', ...extra } });+ const hermes = process.platform === 'win32' ? join(home, 'local', 'hermes') : join(home, '.hermes');+ for (const [extra, dir] of [[{}, hermes], [{ HERMES_HOME: join(home, 'profile') }, join(home, 'profile')]]) {+ const r = run(extra);+ assert.equal(r.status, 0, r.stdout + r.stderr);+ for (const want of [join(home, '.agents', 'skills', 'motlab'), join(dir, 'skills', 'motlab'), join(dir, 'skills', 'motlab-assets')])+ assert.ok(r.stdout.includes(`-> ${want}`), `${want} missing from:\n${r.stdout}`);+ }+ } finally { rmSync(home, { recursive: true, force: true }); }+});+// After `npm install -g`, setup writes its own launcher only when npm's command folder is not on PATH (nvm for// Windows 2.0 keeps it off). The package is laid out as npm lays out a global install: <prefix>\node_modules\@motlab\cli// on Windows, <prefix>/lib/node_modules/@motlab/cli with the command in <prefix>/bin elsewhere.