Open-source · MIT · for coding agents and the people who direct them

Animations your agent can write, see, and ship.

Motion Forge makes interactive animation plain text: an SVG plus a small JSON state machine. Agents write it, the CLI renders frames and interaction flows, and a 31.1 KB runtime plays it on the web, with springs, morphs, clicks, hovers and live data.

$npx motion-forge init
ScoutMotion Forge mascot robot: breathes, blinks and watches the pointer (lookX/lookY); click or send wave to wave, send celebrate for a hop with sparkles.
idle

Live. Move your pointer, click, and try the controls. This file is 11.0 KB of text.

The loop

Writing motion is only half the job. Make it easy to check.

A model can’t watch a timeline. So every Motion SVG comes with tools that turn motion into things a model can read: structured diagnostics, a map of the artwork, and contact sheets of every state over time.

  1. 1 · write

    Plain SVG, plus intent

    States, keyframes, inputs and interactions in JSON inside the SVG. This complete like button is two states, one input and a click. Click the heart to run this exact file.

    Like button
    idle
    like.svg
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="34 38 132 132">
      <title>Like button</title>
      <path id="heart" d="M100 146 C94 141 60 118 60 88 C60 73 71 63 84 63 C92 63 97 67 100 73 C103 67 108 63 116 63 C129 63 140 73 140 88 C140 118 106 141 100 146 Z" fill="#d8d2c6"/>
      <metadata type="application/motion+json"><![CDATA[
      {
        "inputs": { "liked": false },
        "states": {
          "idle": {
            "animate": { "#heart": { "fill": "#d8d2c6" } },
            "when": { "liked": "liked" }
          },
          "liked": {
            "duration": 600,
            "animate": {
              "#heart": {
                "fill": "#ff4d6d",
                "scale": { "0%": 1, "20%": 0.8, "55%": 1.3, "100%": { "value": 1, "ease": "spring-bouncy" } }
              }
            },
            "emit": "liked",
            "when": { "!liked": "idle" }
          }
        },
        "interactions": [{ "on": "click", "target": "#heart", "toggle": "liked" }]
      }
      ]]></metadata>
    </svg>
  2. 2 · check

    Errors a model can act on

    Paths, “did you mean”, and motion lint: loop seams, clipping, dead states, no-op tracks.

    real output
    $ npx motion-forge check like.svg
      viewBox 34 38 132 132 · 3 elements · 1 animated
      states:
        idle (initial)  0ms  1 channels  when liked → liked
        liked  600ms  2 channels  when !liked → idle
      inputs: liked:boolean=false
      interactions: click #heart → toggle liked
    
    0 errors, 0 warnings, 0 notes
  3. 3 · see

    Every state, frame by frame

    The same two clicks, at real speed and 4× slower. An agent can’t watch that, so preview renders the frame grid below, which it reads as an image. record plays scripted clicks and data into a GIF or MP4.

    The like button clicked twice at real speed and 4 times slower: it squashes to 0.8, turns pink and overshoots to 1.3, springs back to 1, then blends back to grey.Contact sheet generated by motion-forge preview for like.svg
  4. 4 · ship

    Drop it in

    One tag or one component. Events and inputs are the API.

    anywhere
    <script type="module" src="https://cdn.jsdelivr.net/npm/motion-forge/dist/element.js"></script>
    <motion-forge src="/like.svg"></motion-forge>
    
    // React
    <MotionForge svg={like} inputs={{ liked }} />

One prompt, no presets

What a fresh agent made with just the skill and the CLI.

We gave new agents a user’s request and nothing else: no presets to copy, only SKILL.md, the reference and the CLI. These are their files, unedited, running live. Each agent checked, previewed and recorded its way to done.

Sync cloudA cloud character that floats, blinks and watches the pointer. It holds a spinning sync badge while syncing, a progress ring fills around it, and it bounces with a checkmark when sync finishes.
idle

The prompt

“Our file-sync app needs a hero animation for the empty dashboard: a little cloud character that floats and blinks, looks toward the mouse, and when sync starts it holds a spinning sync arrow; when sync finishes it does a happy bounce with a checkmark. Sync progress (0-100) should show as a ring around it. Make it on-brand.”

5 visual iterations · ~6 minutes · 0 errors, 0 warnings

Watering streak plantA potted plant that grows from a seed to a flower as the watering streak goes from 0 to 30 days.
idle

The prompt

“A watering-streak widget: a plant in a pot whose growth reflects the streak days (0-30): at 0 it’s a seed, it sprouts, gets leaves, and at 30 it blooms with a flower. When the user waters, a watering can tilts in, water drops fall, and the plant does a happy wiggle.”

4 checks, 2 previews, 2 records · 0 errors, 0 warnings

Add to gardenA round plus button that morphs into a check with a small burst of leaves when a plant is added.
plus

The prompt

“Also a small ‘add to garden’ button icon: a plus that morphs into a check when clicked, with a little leaf burst.”

5 checks, 2 previews, 3 records · 0 errors, 0 warnings

Presets

Start from something good.

Every preset is a single editable file, authored with the same loop your agent uses. Copy one with npx motion-forge add <name>, then ask your agent to make it yours.

ScoutMotion Forge mascot robot: breathes, blinks and watches the pointer (lookX/lookY); click or send wave to wave, send celebrate for a hop with sparkles.
idle

Scout

characters

Motion Forge mascot robot: breathes, blinks and watches the pointer (lookX/lookY); click or send wave to wave, send celebrate for a hop with sparkles.

npx motion-forge add scoutEdit
Empty inboxEmpty-state illustration: a paper plane swoops in on appear (or the intro event), then loops a lazy figure eight over an open tray while clouds drift.
waiting

Empty inbox

illustrations

Empty-state illustration: a paper plane swoops in on appear (or the intro event), then loops a lazy figure eight over an open tray while clouds drift.

npx motion-forge add empty-inboxEdit
Rocket launchOnboarding rocket idling on its pad with a flickering flame; click or send launch to crouch, ignite and blast off out of frame, then click again or send reset to land it gently.
idle

Rocket launch

illustrations

Onboarding rocket idling on its pad with a flickering flame; click or send launch to crouch, ignite and blast off out of frame, then click again or send reset to land it gently.

npx motion-forge add rocketEdit
Notification bellNotification bell: send notify (or click) to ring it with a lagging clapper and pop the badge; the badge shows the count input and hides at 0.3
quiet

Notification bell

feedback

Notification bell: send notify (or click) to ring it with a lagging clapper and pop the badge; the badge shows the count input and hides at 0.

npx motion-forge add bellEdit
ErrorError badge that turns rose, draws an X and shakes with decaying amplitude. Send "error" to show it (again to re-shake) and "reset" to clear. Emits "error".
idle

Error

feedback

Error badge that turns rose, draws an X and shakes with decaying amplitude. Send "error" to show it (again to re-shake) and "reset" to clear. Emits "error".

npx motion-forge add errorEdit
LikeHeart button that pops, rings and bursts when liked. Input: liked (boolean), click toggles it. Emits "liked" on like. Input hovered is set by the built-in hover.
idle

Like

feedback

Heart button that pops, rings and bursts when liked. Input: liked (boolean), click toggles it. Emits "liked" on like. Input hovered is set by the built-in hover.

npx motion-forge add likeEdit
SuccessSuccess badge: the ring draws, fills mint, the check draws and a few dots burst, then it holds. Plays on appear and on the "play" event; "reset" returns to idle. Emits "success".
idle

Success

feedback

Success badge: the ring draws, fills mint, the check draws and a few dots burst, then it holds. Plays on appear and on the "play" event; "reset" returns to idle. Emits "success".

npx motion-forge add successEdit
CheckboxRounded checkbox that fills with a spring pop and draws its check. Input: checked (boolean), click toggles it. Emits "checked" and "unchecked". Input hovered is set by the built-in hover.
unchecked

Checkbox

controls

Rounded checkbox that fills with a spring pop and draws its check. Input: checked (boolean), click toggles it. Emits "checked" and "unchecked". Input hovered is set by the built-in hover.

npx motion-forge add checkboxEdit
CopyCopy button: the sheets merge and pop into a check, hold for a moment, then return on their own. Click (or send "copy") to play. Emits "copied".
idle

Copy

controls

Copy button: the sheets merge and pop into a check, hold for a moment, then return on their own. Click (or send "copy") to play. Emits "copied".

npx motion-forge add copyEdit
Download buttonDownload button: hover nudges the arrow, click (or send "download") drops it into the tray, fills it and shows a check (emits "downloaded"); send "reset" to return. Input hovered is set by the built-in hover.
idle

Download button

controls

Download button: hover nudges the arrow, click (or send "download") drops it into the tray, fills it and shows a check (emits "downloaded"); send "reset" to return. Input hovered is set by the built-in hover.

npx motion-forge add downloadEdit
Sun and moonTheme toggle: set the dark input (or click) and the sun pulls in its rays and becomes a crescent moon while stars twinkle in; the backdrop shifts from day sky to night.
light

Sun and moon

controls

Theme toggle: set the dark input (or click) and the sun pulls in its rays and becomes a crescent moon while stars twinkle in; the backdrop shifts from day sky to night.

npx motion-forge add sun-moonEdit
TogglePill switch whose knob stretches as it slides and turns its dash into a check. Input: on (boolean), click toggles it. Emits "on" and "off".
off

Toggle

controls

Pill switch whose knob stretches as it slides and turns its dash into a check. Input: on (boolean), click toggles it. Emits "on" and "off".

npx motion-forge add toggleEdit
MenuHamburger menu that folds into a close X: boolean input open, click toggles it; lines slide to the center, then rotate with a slight overshoot.
closed

Menu

icons

Hamburger menu that folds into a close X: boolean input open, click toggles it; lines slide to the center, then rotate with a slight overshoot.

npx motion-forge add menuEdit
Play pausePlay button that morphs into pause bars: boolean input playing, click toggles it; the triangle splits into two bars with a small twist and a press squish.
paused

Play pause

icons

Play button that morphs into pause bars: boolean input playing, click toggles it; the triangle splits into two bars with a small twist and a press squish.

npx motion-forge add play-pauseEdit
Typing dotsTyping indicator: three dots bounce in a soft chat bubble; loops forever with no host code (no events or inputs needed).
typing

Typing dots

loaders

Typing indicator: three dots bounce in a soft chat bubble; loops forever with no host code (no events or inputs needed).

npx motion-forge add dotsEdit
Skeleton cardContent placeholder card (avatar + three lines) with a soft shimmer sweep; loops forever with no host code (no events or inputs needed).
loading

Skeleton card

loaders

Content placeholder card (avatar + three lines) with a soft shimmer sweep; loops forever with no host code (no events or inputs needed).

npx motion-forge add skeletonEdit
SpinnerMaterial-style arc that spins while it grows and shrinks; loops forever with no host code (no events or inputs needed).
spinning

Spinner

loaders

Material-style arc that spins while it grows and shrinks; loops forever with no host code (no events or inputs needed).

npx motion-forge add spinnerEdit
Progress ringCircular progress: set input progress (0-100, glides over 300ms); at 100 it turns mint, pops and shows a check (state done, emits "complete"), and returns when progress drops below 100.0%
active

Progress ring

progress

Circular progress: set input progress (0-100, glides over 300ms); at 100 it turns mint, pops and shows a check (state done, emits "complete"), and returns when progress drops below 100.

npx motion-forge add progress-ringEdit
UploadCloud upload: click (or send "start") to begin, set input progress (0-100) to fill the bar; at 100 it turns mint with a check (state done, emits "uploaded"); send "reset" to return to idle.
idle

Upload

progress

Cloud upload: click (or send "start") to begin, set input progress (0-100) to fill the bar; at 100 it turns mint with a check (state done, emits "uploaded"); send "reset" to return to idle.

npx motion-forge add uploadEdit
BatteryBattery meter: input level 0-100 (smoothed) sets fill width and color, boolean input charging shows a glowing bolt; pulses below 15% when not charging.72%
normal

Battery

data

Battery meter: input level 0-100 (smoothed) sets fill width and color, boolean input charging shows a glowing bolt; pulses below 15% when not charging.

npx motion-forge add batteryEdit
GaugeSemicircular gauge: input value 0-100 (smoothed) drives the needle, arc fill and readout; drag across it to set the value, send settle for a needle wobble.010040%
idle

Gauge

data

Semicircular gauge: input value 0-100 (smoothed) drives the needle, arc fill and readout; drag across it to set the value, send settle for a needle wobble.

npx motion-forge add gaugeEdit
Star ratingFive-star rating: input rating 0-5 (smoothed, fractions fill partially) fills stars in sequence with a pop; clicking a star sets rating to its number.
idle

Star rating

data

Five-star rating: input rating 0-5 (smoothed, fractions fill partially) fills stars in sequence with a pop; clicking a star sets rating to its number.

npx motion-forge add starsEdit
VolumeSpeaker volume: input volume 0-1 (smoothed) reveals three sound waves in turn, a mute cross pops in at 0, waves breathe while playing; drag horizontally to set volume.
sound

Volume

data

Speaker volume: input volume 0-1 (smoothed) reveals three sound waves in turn, a mute cross pops in at 0, waves breathe while playing; drag horizontally to set volume.

npx motion-forge add volumeEdit

What’s in a file

Everything is declared. Nothing is hidden in code.

State machines

Named states, events, conditions over inputs, one-shots with “next”, and parallel layers. Every switch blends from what’s on screen.

Real motion

Springs fitted to your timing, 20+ easings, stagger, delays, ping-pong loops, anticipation and overshoot.

Morph anything

Path morphing between shapes with different point counts, stroke drawing, polygon and color morphs in OKLab.

Live data

Inputs bind straight to properties with ranges, multi-stop maps and text templates. Smoothing makes data glide.

Interactions in the file

Click, hover, press, pointer-follow, drag and scroll-into-view. No host code; keyboard access included.

Start with SVG

Use supported vector artwork from Figma, Illustrator or icon sets. Scripts, external URLs and unsupported elements are removed with diagnostics.

Accessible by default

Titles become labels, click targets become buttons, and prefers-reduced-motion freezes loops.

Runs everywhere

A 31.1 KB web component, a React component with SSR, or a vanilla mount(). Shadow DOM keeps page CSS out.

Where it fits

An open, text-first alternative for interactive UI motion.

Several tools now support agent authoring and interactive animation. Choose Motion Forge when you want ordinary SVG artwork, an MIT toolchain, and a compact web runtime, with no account required.

CapabilityMotion ForgeLottieRiveCSS / JS libraries
Source formatSVG + JSON textLottie JSON / dotLottieRML text; .riv runtime filesCSS / JS code
Interactive statesBuilt indotLottie extensionBuilt inHand-written
Agent authoringText, skill, CLI and MCPJSON tooling and player APIsRML and CLICSS / JS in your project
Visual verificationLint, state/flow sheets, scripted recordingsPlayer / browser toolingCLI capture, simulated inputs and script testsBrowser tooling
Web runtime (gzip, JS + wasm)31.1 KB76.3 KB lottie-web; 531.9 KB dotLottie916.4 KB @rive-app/canvasNative CSS; JS library size varies
EditorYour editor + live playgroundAfter Effects / Lottie CreatorRive editor or CLIYour editor
LicenseMIT, format and runtimeMIT runtimeMIT runtime, closed editor—

Download sizes measured 2026-09-27 with pnpm size:compare from pinned npm packages; not a rendering-performance benchmark. See Rive’s CLI and RML and dotLottie interactivity. Motion Forge doesn’t import Lottie or Rive files.

Get started

Give your agent the skill.

init installs the skill for Claude Code and a note in AGENTS.md that Cursor, Codex and others read. Then just ask: “add a like button that pops”, “make our mascot wave when the upload finishes”.

terminal
# in your project
npx motion-forge init
npm i motion-forge

# the loop your agent runs
npx motion-forge add like --dir src/motion
npx motion-forge check src/motion/like.svg
npx motion-forge preview src/motion/like.svg
npx motion-forge record src/motion/like.svg --set liked=true@400
MCP (Claude Desktop, Cursor, Windsurf…)
{
  "mcpServers": {
    "motion-forge": { "command": "npx", "args": ["motion-forge", "mcp"] }
  }
}