preview_frames
Seeks to N timestamps, screenshots each one, and hands the images straight back to the model. This is the step a general coding agent does not have.
Anymotion writes the code, checks the render itself, and exports a 1080p MP4.
$ npm install -g @anymotion-agent/anymotion
Node.js 18+ · FFmpeg only for MP4 export · bring your own API key
Bring your own key — nine providers supported
The HTML parses, the CSS is valid, and the result is still a card sitting on top of a headline at 3.2 seconds. Nothing in the source says so. Anymotion gives the model eyes.
preview_frames
Seeks to N timestamps, screenshots each one, and hands the images straight back to the model. This is the step a general coding agent does not have.
check_composition
A headless audit: console errors, element overlap, off-canvas elements, and whether seek(t) is deterministic.
Frames returned to the model
4 frames · 20s compositionBoth tools drive the same Puppeteer and window.seek(t) contract the renderer uses — so anything that passes the audit also renders correctly.
Anymotion ships with no credentials. anymotion setup reads your key without echoing it and stores it outside the repo. Everyone brings their own.
$ npm install -g @anymotion-agent/anymotion
$ anymotion setup
Prefer not to install globally? Run npx @anymotion-agent/anymotion@latest init instead.
$ git clone https://github.com/anymotion-agent/anymotion.git $ cd anymotion && npm install && npm link $ anymotion install $ anymotion doctor
Only anymotion render needs it. Everything else works without it.
export ANTHROPIC_API_KEY=sk-... anymotion
An environment key fills in for a placeholder but never overwrites a real saved one. anymotion config masks secrets on the way back out.
Every composition exposes two globals. Calling seek(5) must produce an identical frame every time, whether it is called first or last — that is what makes a clean 60fps export possible, and what check_composition verifies.
// seconds window.DURATION = 20; // t in seconds — must be pure window.seek = function (t) { // position everything for exactly time t };
stage: #stage · 1920×1080
~/anymotion-projects/
saas-analytics-explainer/
index.html the composition
style.css
script.js
project.json prompt, plan, model
exports/ rendered MP4s
A second request never overwrites the first. The newest project becomes the active one, and render follows it automatically.
Every path resolves against the project root. Absolute paths are refused outright, not silently re-rooted.
Managed by the CLI. The model can read it and cannot write it.
Recursive deletes, disk formats, pipe-to-shell installs, git push, npm publish — a mis-keyed y cannot authorise them.
File approval defaults to manual. Loosen it to auto when you trust the loop.
anymotion on its own opens the conversational REPL. That is the main way to use it — the rest are there when you need them.
anymotion
Conversational agent REPL — the main way to use it
generate "<prompt>"
One-shot generation into a new project folder
render
Export to MP4 — -r 720p|1080p|1440p|4k, -f <fps>
projects
List every generated project, marking the active one
config [key] [value]
View or change settings — secrets shown masked
install
First-run setup — config directory and skills
setup
Provider, key and model wizard
doctor
Health check — Node, key, skills, FFmpeg, Puppeteer
serve
Web Studio Editor Coming soon
Resolved from ANYMOTION_CONFIG, then ./motion.config.json, then ~/.anymotion/.