Anymotion
Open-source AI motion agent

Turn product stories into motion in minutes.

Anymotion writes the code, checks the render itself, and exports a 1080p MP4.

Terminal

$ 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

Anthropic· OpenRouter· AgentRouter· OpenCode Zen· Groq· DeepSeek· Together· OpenAI· TokenRouter·
The difference

A coding agent writing an animation is working blind.

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 composition
0.0s
6.5s overlap
13.0s
19.5s

Both tools drive the same Puppeteer and window.seek(t) contract the renderer uses — so anything that passes the audit also renders correctly.

Install

Two commands, and it is yours.

Anymotion ships with no credentials. anymotion setup reads your key without echoing it and stores it outside the repo. Everyone brings their own.

Quick install

Recommended

$ npm install -g @anymotion-agent/anymotion

$ anymotion setup

Prefer not to install globally? Run npx @anymotion-agent/anymotion@latest init instead.

From source

$ git clone https://github.com/anymotion-agent/anymotion.git
$ cd anymotion && npm install && npm link
$ anymotion install
$ anymotion doctor

FFmpeg, for export only

Windows
winget install Gyan.FFmpeg
macOS
brew install ffmpeg
Linux
sudo apt install ffmpeg

Only anymotion render needs it. Everything else works without it.

Or use the environment

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.

The animation contract

It does not screen-record. It seeks.

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.

script.js required
// seconds
window.DURATION = 20;

// t in seconds — must be pure
window.seek = function (t) {
  // position everything for exactly time t
};

stage: #stage · 1920×1080

One folder per generation

~/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.

Paths cannot escape

Every path resolves against the project root. Absolute paths are refused outright, not silently re-rooted.

project.json is ours

Managed by the CLI. The model can read it and cannot write it.

Blocked before the prompt

Recursive deletes, disk formats, pipe-to-shell installs, git push, npm publish — a mis-keyed y cannot authorise them.

Writes ask first

File approval defaults to manual. Loosen it to auto when you trust the loop.

The surface

Nine commands. No dashboard to learn.

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

Defaults

model
claude-opus-5
provider
anthropic
thinking
high
defaultResolution
1080p
fps
60
fileApprovalMode
manual

Resolved from ANYMOTION_CONFIG, then ./motion.config.json, then ~/.anymotion/.