Reading the repo
Opening the box…
Reading the repo
Opening the box…
How to install on macOS
Video as code: canvas scenes rendered with WebCodecs in headless Chrome, a review viewer, and agent skills that build the video from your references.
Saved setup from 6 h ago
Will it work on macOS?
docs/install.mdmotlab has two parts: the engine (the motlab command, the viewer and the renderer) and two agent skills: skills/motlab/ makes videos, and skills/motlab-assets/ makes reusable asset kits for them. There are two ways to install both: from npm, or from a clone with the installer. Take npm to use motlab, and the clone to work on it. If an agent is doing the install for you, point it at install-for-agents.md.
| Tool | Why | Check |
|---|---|---|
| Node.js 24 or newer | runs the engine | node --version |
| Google Chrome or Chromium | draws and encodes the frames | found on its default path or in Playwright's browser folder, or set CHROME to it |
| ffmpeg and ffprobe | join the parts, add audio, check the output | ffmpeg -version |
| Python 3, optional | the skills' helper scripts | python --version |
| Blender 4.2 or newer, optional | the main 3D path of motlab-assets (FBX, baked textures, Cycles stills) | blender --version |
How to get them:
| | Windows | macOS | Debian or Ubuntu |
|---|---|---|---|
| Node 24 | winget install OpenJS.NodeJS | brew install node | nodejs.org or nvm |
| Chrome | winget install Google.Chrome | brew install --cask google-chrome | Google's .deb on x64 (below); on Ubuntu, apt install chromium gives the snap, which can fail headless |
| ffmpeg | winget install Gyan.FFmpeg | brew install ffmpeg | sudo apt install ffmpeg |
| Python 3 | winget install Python.Python.3.12 | brew install python | sudo apt install python3 python3-pip |
Google Chrome on Debian or Ubuntu (x64), the command motlab doctor prints when Chrome is missing:
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && sudo apt install -y ./google-chrome-stable_current_amd64.deb
A machine set up for Playwright needs no other Chrome. When no system Chrome is found, motlab uses the newest Chromium that npx playwright install chromium put in Playwright's folder: ~/.cache/ms-playwright on Linux, ~/Library/Caches/ms-playwright on macOS, %LOCALAPPDATA%\ms-playwright on Windows, or PLAYWRIGHT_BROWSERS_PATH when it is set. For a Chrome anywhere else, set CHROME to it.
The skill's scripts need numpy, scipy and Pillow. From the engine folder (motlab --help prints it; motlab doctor prints this command with the full path when they are missing):
python -m pip install -r skills/motlab/requirements.txt
earshot is optional. With it the agent can listen to sound: pick sound effects, find the best moment in a recording and check a mix. It needs Python with torch and about 1.1 GB of models, so motlab never installs it. motlab doctor shows it as ok with its models downloaded, or as warn with what to do, and it never makes the doctor fail. Install it from its own page, then earshot doctor --fetch downloads the models.
npm install -g @motlab/cli
npx @motlab/cli setup
npm installs the engine and its one dependency and makes the motlab command. Setup copies both skills to an agent skill folder (Claude Code by default) and runs motlab doctor. It takes the skill options of the installer below: --skill, --skill-dir, --link, --update, --force and --dry-run, so npx @motlab/cli setup --skill claude,agents puts the skills in two places. It is run through npx because motlab may not be on PATH yet; npx runs the installed package and downloads nothing. Once the command works, motlab setup is the same. The engine folder is inside npm's global folder; motlab --help prints it, and the example project is in it.
The command only works if npm's global folder is on PATH. npm prefix -g prints that folder (on Windows the command goes in it, elsewhere in its bin). With the Node installer from nodejs.org or Homebrew it is on PATH already. With nvm for Windows 2.0 in its default shim mode it is not: npm puts the command in the Node version's own folder (installs\v24.x), and nvm's .shim folder only holds the shims nvm ships with (node, npm, npx, pnpm, corepack, codex), so motlab is not found. Setup sees this and writes its own motlab launcher to ~/.local/bin, as the clone installer does (--bin <dir> puts it elsewhere), and prints the line that adds that folder to PATH if it is not there. The launcher runs the engine in npm's folder, so npm install -g @motlab/cli@latest updates it, and motlab uninstall removes it. An older launcher there, from a clone, is replaced, and setup says what it ran.
Instead of the launcher, npm's global folder can point at one that is on PATH, once, before installing:
npm config set prefix "%APPDATA%\npm"
In PowerShell write "$env:APPDATA\npm". %APPDATA%\npm is npm's usual global folder on Windows and is often on PATH from an earlier Node install; where npm lists it if so, otherwise add it to PATH. This changes where every global package goes, not only motlab, and the packages there are shared by all Node versions. motlab update keeps working, because its npm install -g follows the same setting. The clone below also works there, since its installer writes its own launcher.
This was tested on Windows 11, from the registry and from a packed tarball, each installed into a separate npm folder: setup, update, uninstall and a render of the example. It was also installed globally with nvm for Windows 2.0: npx @motlab/cli ran the installed package from the nvm folder, setup wrote the launcher when that folder was off PATH and none when it was on PATH, and with the prefix in %APPDATA%\npm the command was found without one. On a Linux VPS (Ubuntu, 2 cores, no GPU, npm's prefix in ~/.npm-global), a packed tarball installed globally ran setup without writing a launcher, which motlab found npm's own command, motlab doctor was ready and the example rendered.
On an Apple M5 running macOS 26.7.4, a local install of @motlab/cli@0.4.0 from the npm registry rendered the bundled example with Node 26.12.1, Google Chrome 158.0.8127.37 and FFmpeg 9.0.1. To repeat in an empty directory:
npm install @motlab/cli@0.4.0
cp -R node_modules/@motlab/cli/example ./example
./node_modules/.bin/motlab render example --scale 1
ffprobe -v error -count_frames -show_entries stream=codec_name,width,height,nb_read_frames,duration example/out/example.mp4
Chrome reported the ANGLE Metal renderer and motlab selected hardware H.264. The output contained 270 frames at 1920×1080 and 30 fps. The video and AAC audio streams each lasted 9.000 s, and FFmpeg decoded the whole file without an error. When the global npm bin directory is on PATH through a symlink, setup now recognizes it and skips the extra launcher. This was checked with a separate npm prefix and setup --dry-run --skill none. A full global setup, update and uninstall remain untested on macOS.
git clone https://github.com/staryone/motlab.git
cd motlab
node install.js
It does four things and prints each one:
npm ci in the engine folder. The only dependency is mediabunny, pinned to an exact version.motlab launcher to ~/.local/bin (on Windows motlab.cmd for cmd and PowerShell, and motlab for Git Bash). The launcher runs bin/motlab.js from the folder you cloned, so keep that folder where it is. If ~/.local/bin is not on PATH, the installer prints the line that adds it.motlab doctor and lists anything still missing.It keeps where the skills, the launcher and --link went in ~/.motlab/install.json, so motlab update can put them back there.
Options:
| Option | Meaning |
|---|---|
| --skill <target> | where the two skills go, from the table below. Several at once with commas: --skill claude,agents,antigravity. The default is claude |
| --skill none | engine and command only |
| --skill-dir <dir> | the skills in any other folder, for an agent not in the table. Can be given more than once, and together with --skill |
| --link | link the skill folders to this checkout instead of copying them, so edits under skills/ apply at once (a junction on Windows) |
| --bin <dir> | put the launcher somewhere else |
| --update | the skills again in every folder from ~/.motlab/install.json, and in any folder from the table below that already has the motlab skill (an install from before that file). --skill and --skill-dir add folders. motlab update runs this |
| --force | replace a folder at a skill path that has no SKILL.md, and copy over a skill that npx skills installed (below) |
| --skills-only | the skills and motlab doctor, no npm ci, and a launcher only for an npm install whose command folder is not on PATH. motlab setup runs this |
| --dry-run | print every step and change nothing |
Skill targets. Each one is the agent's user skill folder, as its docs gave it in November 2026:
| Target | Folder | Read by |
|---|---|---|
| claude | ~/.claude/skills/ | Claude Code. Cursor, OpenCode and Amp read it too |
| 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,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.
git clone https://github.com/staryone/motlab.git
cd motlab
npm ci
node bin/motlab.js doctor
Then either run node /path/to/motlab/bin/motlab.js directly, or make a launcher yourself. On Windows, motlab.cmd containing @node "C:\path\to\motlab\bin\motlab.js" %* in a folder on PATH. On macOS and Linux, a motlab file containing exec node "/path/to/motlab/bin/motlab.js" "$@", marked executable.
npm link and npm install -g . also work where npm's global folder is on PATH, as npm install -g @motlab/cli does. They do not with nvm for Windows 2.0 until npm's prefix is changed (above), which is why the installer writes its own launcher.
To install the skills by hand, copy or link skills/motlab/ and skills/motlab-assets/ to your agent's skill folder (see the table above), side by side. Both call motlab and find the engine folder through motlab --help; motlab-assets also uses scripts from the motlab skill there.
The skills CLI behind skills.sh installs skills from a GitHub repository:
npx skills add staryone/motlab -g
npx skills add staryone/motlab -g --skill motlab
The first line installs both skills and the second only motlab. With -g they go to ~/.agents/skills/, and by default the CLI links them from there into the user skill folder of each agent it finds, such as ~/.claude/skills/. Without -g they go to the current project only (.agents/skills/, .claude/skills/), and an agent that also has a copy from motlab setup in its user folder then finds motlab twice. So use -g.
This installs no engine. The first time the motlab skill runs, it runs motlab --version; when the command is missing, it tells the user what the engine needs and gives them npm install -g @motlab/cli and npx @motlab/cli setup --skill none to run in their own terminal. The skills never install or update the engine themselves, nor set up a server: skills.sh flagged that as an agent changing the system. --skill none makes setup add only the command, because the skills are already there.
The skills CLI lists what it installed with -g in ~/.agents/.skill-lock.json ($XDG_STATE_HOME/skills/.skill-lock.json when that is set). A skill listed there belongs to it: motlab setup, motlab setup --update and node install.js leave that skill where it is and say so, and motlab uninstall leaves it too. Otherwise setup would put its own copy over the link and the two installers would each update a different copy. Update those skills with npx skills update -g and remove them with npx skills remove motlab motlab-assets -g. --force makes setup copy over them anyway.
Tried on Windows 11 with skills 1.9.0: npx skills add <the motlab folder> --list found both skills. Before this, it skipped both, because their description held : without quotes, which its YAML parser reads as a new key; the descriptions are quoted now, and test/skills.test.js checks that. Not tried yet: a real npx skills add staryone/motlab -g followed by the skill installing the engine in a new session.
motlab update
From npm, motlab update asks npm for the newest version. If there is one, it prints the two commands that get it:
npm install -g @motlab/cli@latest
motlab setup --update
The second copies the skills again to every folder they went to before, since npm only replaces the engine. Skills that came from npx skills are left out; npx skills update -g updates them.
From a clone, it works in the clone the motlab command runs from:
origin and lists the new commits. With none it says so and stops.git merge --ff-only), so it never makes a merge commit.install.js --update: npm ci, the launcher, and the skills copied again to every folder they were installed in, then motlab doctor.motlab update --dry-run fetches and lists the new commits, then prints the other steps without doing them. A viewer that is already running keeps the old code until motlab restart, and an agent picks up the new skills in a new session.
By hand, the same is:
cd motlab
git pull
node install.js --update
With --link, the skills update with git pull alone, but run the installer anyway in case the npm packages changed.
motlab uninstall
It stops the viewer and removes the launcher (~/.local/bin/motlab, and motlab.cmd on Windows), the two skill folders in every agent folder they were installed in, ~/.motlab/ (where the installer put things, the viewer's recent projects and its log) and the encoder timings and cached scene parts (%LOCALAPPDATA%\motlab on Windows, ~/.cache/motlab elsewhere; with MOTLAB_CACHE_DIR only the timings file). It lists everything and asks first; --yes skips the question and --dry-run only lists. A skill installed with --link is removed as a link, and what it points to stays. It leaves the clone, because it runs from there: delete that folder afterwards. From npm there is no launcher to remove, and npm uninstall -g @motlab/cli removes the engine and the command afterwards.
motlab doctor
It checks Node, Chrome, ffmpeg, ffprobe, the npm packages, and (as warnings) Python and its packages. For each missing tool it prints a command for your OS. The exit code is 1 when a required check fails. The GPU in use is not checked here: every render prints it on its first line.
Windows
Program Files and Program Files (x86), then in Playwright's folder. Set CHROME for any other path.--force_high_performance_gpu, and each render prints the GPU it got.python, not python3.macOS and Linux
CHROME set to ~/.cache/ms-playwright/chromium-1248/chrome-linux64/chrome), and an install from a clone with install.js worked too (issue #8). An install from the npm registry on Linux has not been tried. For macOS, see the Apple M5 render check.Then run bash setup.sh. It stops at the first error and is safe to run again. Servers and tests aren't started; it lists them at the end. Read it first.
Needs Git: xcode-select --install
git clone https://github.com/staryone/motlab.git cd motlab
Node.js 24.20.0
# needs nvm: brew install nvm (or https://github.com/nvm-sh/nvm) nvm install nvm use
npm ci
npm test
Run motlab edit example in a folder that holds the sample project. In a clone that is the clone itself; after an npm install, copy example/ out of the engine folder that motlab --help prints. It starts the viewer in the background, opens the sample project and prints its address, http://127.0.0.1:4173/p/example/. Space plays, the arrow keys on the timeline step one frame, Ctrl+scroll zooms the timeline, and a drag on the preview marks a box.
To make your own video, put your references in a folder and ask your agent, for example:
Make a 20 second portrait promo for my app with motlab. The references are in ./promo-refs.
The agent plans the shots, writes the scenes and starts the viewer. Click the frame you mean, drag a box over the part, or circle it with the pencil (P), and type a note right on it. Notes can be left all over the video and handed over at once, so "this one" or "all the notes" is enough.
When you are happy, press Export in the top right. The video goes to the project's out/ folder.
The viewer keeps running in the background for every project: motlab stop ends it, motlab restart starts it again, and motlab start starts it without opening a project. motlab help lists every command. Its text is in English or Indonesian, following your browser, and the project menu switches it. You can also render from the command line:
motlab render example --scale 1
No reports for macOS yet.
GitManual AI Agent reads the 5 key files and writes a step-by-step guide for macOS. Once written, it's saved for everyone.