givemotion 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/AGENTS.md +37 -0
  2. package/LICENSE +21 -0
  3. package/README.md +492 -2
  4. package/SECURITY.md +40 -0
  5. package/THIRD_PARTY_NOTICES.md +48 -0
  6. package/blocks/bar-chart.html +63 -0
  7. package/blocks/browser-window.html +52 -0
  8. package/blocks/callout.html +57 -0
  9. package/blocks/captions.html +120 -0
  10. package/blocks/checklist.html +32 -0
  11. package/blocks/code-window.html +126 -0
  12. package/blocks/compare.html +33 -0
  13. package/blocks/cursor.html +157 -0
  14. package/blocks/end-card.html +28 -0
  15. package/blocks/gradient-bg.html +48 -0
  16. package/blocks/grid-bg.html +18 -0
  17. package/blocks/highlight.html +13 -0
  18. package/blocks/line-chart.html +36 -0
  19. package/blocks/logo-reveal.html +33 -0
  20. package/blocks/lottie.html +34 -0
  21. package/blocks/lower-third.html +24 -0
  22. package/blocks/phone.html +18 -0
  23. package/blocks/quote.html +19 -0
  24. package/blocks/stat.html +24 -0
  25. package/blocks/steps.html +40 -0
  26. package/blocks/title-card.html +22 -0
  27. package/blocks/word-pop.html +40 -0
  28. package/examples/bench/index.html +24 -0
  29. package/examples/data-story/data.json +9 -0
  30. package/examples/data-story/index.html +361 -0
  31. package/examples/data-story/other.json +46 -0
  32. package/examples/generative/index.html +60 -0
  33. package/examples/made-by-agents/README.md +5 -0
  34. package/examples/made-by-agents/photosynthesis/blocks/checklist.html +32 -0
  35. package/examples/made-by-agents/photosynthesis/blocks/end-card.html +25 -0
  36. package/examples/made-by-agents/photosynthesis/blocks/gradient-bg.html +48 -0
  37. package/examples/made-by-agents/photosynthesis/blocks/steps.html +40 -0
  38. package/examples/made-by-agents/photosynthesis/blocks/title-card.html +22 -0
  39. package/examples/made-by-agents/photosynthesis/index.html +217 -0
  40. package/examples/personalized/index.html +28 -0
  41. package/llms.txt +34 -0
  42. package/package.json +80 -4
  43. package/skills/givemotion/SKILL.md +152 -0
  44. package/skills/givemotion/references/api.md +40 -0
  45. package/skills/givemotion/references/camera.md +72 -0
  46. package/skills/givemotion/references/charts.md +138 -0
  47. package/skills/givemotion/references/check-codes.md +94 -0
  48. package/skills/givemotion/references/data-templates.md +61 -0
  49. package/skills/givemotion/references/diagrams.md +75 -0
  50. package/skills/givemotion/references/genres/code-explainer.md +15 -0
  51. package/skills/givemotion/references/genres/data-story.md +21 -0
  52. package/skills/givemotion/references/genres/explainer.md +20 -0
  53. package/skills/givemotion/references/genres/hand-drawn.md +18 -0
  54. package/skills/givemotion/references/genres/logo-sting.md +20 -0
  55. package/skills/givemotion/references/genres/promo.md +18 -0
  56. package/skills/givemotion/references/genres/ui-demo.md +21 -0
  57. package/skills/givemotion/references/genres/vertical.md +19 -0
  58. package/skills/givemotion/references/genres/year-recap.md +18 -0
  59. package/skills/givemotion/references/javascript.md +72 -0
  60. package/skills/givemotion/references/media-audio.md +57 -0
  61. package/skills/givemotion/references/motion-design.md +183 -0
  62. package/skills/givemotion/references/output.md +64 -0
  63. package/skills/givemotion/references/review.md +60 -0
  64. package/skills/givemotion/references/styles.md +133 -0
  65. package/skills/givemotion/references/techniques/backgrounds-and-ambient.md +85 -0
  66. package/skills/givemotion/references/techniques/camera-moves.md +88 -0
  67. package/skills/givemotion/references/techniques/captions-vertical.md +89 -0
  68. package/skills/givemotion/references/techniques/code-on-screen.md +125 -0
  69. package/skills/givemotion/references/techniques/hand-drawn.md +87 -0
  70. package/skills/givemotion/references/techniques/impacts-and-energy.md +106 -0
  71. package/skills/givemotion/references/techniques/kinetic-type.md +92 -0
  72. package/skills/givemotion/references/techniques/light-and-depth.md +91 -0
  73. package/skills/givemotion/references/techniques/logo-reveal.md +94 -0
  74. package/skills/givemotion/references/techniques/numbers-and-charts.md +92 -0
  75. package/skills/givemotion/references/techniques/paths-and-maps.md +99 -0
  76. package/skills/givemotion/references/techniques/scene-transitions.md +85 -0
  77. package/skills/givemotion/references/techniques/shapes-and-motion-graphics.md +92 -0
  78. package/skills/givemotion/references/techniques/text-reveals.md +94 -0
  79. package/skills/givemotion/references/techniques/ui-demo.md +110 -0
  80. package/skills/givemotion/references/timeline.md +85 -0
  81. package/src/analyze.js +1485 -0
  82. package/src/api.js +36 -0
  83. package/src/args.js +33 -0
  84. package/src/audio-cli.js +58 -0
  85. package/src/bench.js +153 -0
  86. package/src/browser.js +381 -0
  87. package/src/bundle.js +79 -0
  88. package/src/cdp.js +94 -0
  89. package/src/check.js +1818 -0
  90. package/src/cli.js +611 -0
  91. package/src/dev.js +26 -0
  92. package/src/ffmpeg.js +330 -0
  93. package/src/parts.js +380 -0
  94. package/src/player/gm-player.js +175 -0
  95. package/src/render.js +772 -0
  96. package/src/runtime/audio.js +306 -0
  97. package/src/runtime/chart.js +665 -0
  98. package/src/runtime/fonts/BebasNeue-OFL.txt +93 -0
  99. package/src/runtime/fonts/Caveat-OFL.txt +93 -0
  100. package/src/runtime/fonts/Inter-OFL.txt +93 -0
  101. package/src/runtime/fonts/JetBrainsMono-OFL.txt +93 -0
  102. package/src/runtime/fonts/Nunito-OFL.txt +93 -0
  103. package/src/runtime/fonts/PlayfairDisplay-OFL.txt +93 -0
  104. package/src/runtime/fonts/SpaceGrotesk-OFL.txt +93 -0
  105. package/src/runtime/fonts/bebas-neue-latin-400-normal.woff2 +0 -0
  106. package/src/runtime/fonts/bebas-neue-latin-ext-400-normal.woff2 +0 -0
  107. package/src/runtime/fonts/caveat-latin-ext-wght-normal.woff2 +0 -0
  108. package/src/runtime/fonts/caveat-latin-wght-normal.woff2 +0 -0
  109. package/src/runtime/fonts/inter-latin-ext-wght-italic.woff2 +0 -0
  110. package/src/runtime/fonts/inter-latin-ext-wght-normal.woff2 +0 -0
  111. package/src/runtime/fonts/inter-latin-wght-italic.woff2 +0 -0
  112. package/src/runtime/fonts/inter-latin-wght-normal.woff2 +0 -0
  113. package/src/runtime/fonts/jetbrains-mono-latin-ext-wght-italic.woff2 +0 -0
  114. package/src/runtime/fonts/jetbrains-mono-latin-ext-wght-normal.woff2 +0 -0
  115. package/src/runtime/fonts/jetbrains-mono-latin-wght-italic.woff2 +0 -0
  116. package/src/runtime/fonts/jetbrains-mono-latin-wght-normal.woff2 +0 -0
  117. package/src/runtime/fonts/nunito-latin-ext-wght-normal.woff2 +0 -0
  118. package/src/runtime/fonts/nunito-latin-wght-normal.woff2 +0 -0
  119. package/src/runtime/fonts/playfair-display-latin-ext-wght-italic.woff2 +0 -0
  120. package/src/runtime/fonts/playfair-display-latin-ext-wght-normal.woff2 +0 -0
  121. package/src/runtime/fonts/playfair-display-latin-wght-italic.woff2 +0 -0
  122. package/src/runtime/fonts/playfair-display-latin-wght-normal.woff2 +0 -0
  123. package/src/runtime/fonts/space-grotesk-latin-ext-wght-normal.woff2 +0 -0
  124. package/src/runtime/fonts/space-grotesk-latin-wght-normal.woff2 +0 -0
  125. package/src/runtime/motion.js +2674 -0
  126. package/src/runtime/preset.css +97 -0
  127. package/src/runtime/runtime.js +2141 -0
  128. package/src/runtime/sketch.js +1249 -0
  129. package/src/server.js +402 -0
  130. package/src/studio/index.html +238 -0
  131. package/src/types/api.d.ts +354 -0
  132. package/templates/starter/index.html +70 -0
package/AGENTS.md ADDED
@@ -0,0 +1,37 @@
1
+ # Working on givemotion (for AI agents and contributors)
2
+
3
+ - Using givemotion to make a video? Read `skills/givemotion/SKILL.md` instead (and the `references/` files it points to).
4
+ - Before fixing a problem someone saw in a video, decide where the fix belongs: engine, skill, the user's own brand and
5
+ taste, or nowhere. The rules are in `CLAUDE.md` ("How to handle feedback"). The authoring format is HTML/CSS/JS only (no JSX).
6
+ - Zero runtime dependencies. Node 20+ built-ins only. Keep it that way.
7
+ - Plain JavaScript, type-checked from JSDoc: no build step, the files run (and the runtime is injected into Chrome) as
8
+ they are. `npm run typecheck` (`tsc -p .`, also the first step of `npm test`) must stay at zero errors. TypeScript
9
+ and `@types/node` are dev dependencies only.
10
+ - Public API types: `src/types/api.d.ts` (shipped; `package.json` `types`). Change it together with the function;
11
+ `test/types/api.test-types.ts` fails when `src/api.js` and the declarations drift apart.
12
+ - Inside `src/`, refer to those types in JSDoc: `@param {import('./types/api.js').RenderOptions} [opts]`. Type new
13
+ functions' options and return values; that is the context the next agent reads.
14
+ - Fix type errors with JSDoc types or casts (`/** @type {any} */ (x)`), never `@ts-ignore`/`@ts-nocheck`. A cast must
15
+ not change behaviour; if the checker found a real bug, fix the bug.
16
+ - `typings/env.d.ts` (not shipped) declares what the browser runtime adds to the DOM: `__gm*` state on elements,
17
+ `window.gm`, and `gm` inside functions that run in the page.
18
+ - Layout:
19
+ - `src/runtime/runtime.js` — injected into every page: virtual clock, clips/sequences, seeking animations, enter/exit, split/count/type, media, `window.gm`.
20
+ - `src/runtime/preset.css` — injected first; easings, keyframes, `.scene`, built-in font faces.
21
+ - `src/runtime/motion.js` — timeline, camera, paths, shapes, morph, burst. `src/runtime/sketch.js` — `data-sketch`, `gm.sketch`, `gm.connect`, `gm.rect`, `data-anchor` (labels that follow their shapes), travel along a connect arrow. `src/runtime/chart.js` — `gm.chart.line` (live line charts: head, callouts pinned to points, rescaling axis). `src/runtime/fonts/` — bundled OFL fonts (Inter, JetBrains Mono, Playfair Display, Space Grotesk, Bebas Neue, Caveat; list them in `THIRD_PARTY_NOTICES.md` when adding one).
22
+ - `src/server.js` — local server: runtime injection, `<gm-include>`, `{{data.*}}`, video frame extraction.
23
+ - `src/browser.js`, `src/cdp.js` — Chrome discovery/install, CDP over a pipe, beginFrame/screenshot capture.
24
+ - `src/render.js`, `src/ffmpeg.js` — workers, fixed 1-2 s parts kept in `.gm-parts/` with fingerprints (only changed parts re-render), encoding, concat, audio mix.
25
+ - `src/analyze.js` — `givemotion analyze`: shots, transitions, camera, pacing, palette, sheets of any video file.
26
+ - `src/check.js` — checker + snapshot contact sheets. `src/studio/` — preview UI.
27
+ - `blocks/` — copyable HTML blocks (header comment = docs). `examples/`, `templates/`.
28
+ - `skills/givemotion/` — the agent skill pack (see below). `.claude-plugin/` — Claude Code plugin and marketplace manifests (the repo root is the plugin; its skill is `skills/givemotion`).
29
+ - The skill pack (`skills/givemotion/`):
30
+ - `SKILL.md` is the core that stays in the agent's context: keep it under ~18 KB, with the loop, the composition format, the timing model and the quality rules in its first ~5k tokens (Claude Code keeps only that much of a skill after compaction). Everything else goes in `references/<topic>.md` (one purpose line, a contents list if over 100 lines) and gets a row in the "What to read" table. `givemotion skill` copies the whole folder, and the project `AGENTS.md` section is generated from that table.
31
+ - Every API, attribute and flag must be documented somewhere in the pack, and only APIs that exist in `src/` and `blocks/`.
32
+ - `metadata.version` in SKILL.md and `version` in `.claude-plugin/plugin.json` must equal `package.json` (a unit test checks it); `givemotion doctor` and `check` warn when an installed pack differs from the engine.
33
+ - Agent test rounds (fresh agents make videos from the docs, blind judges score them): the harness in `bench/agents/` is kept outside the repo (ignored). Results: `docs/experiments/`. The quality knowledge from those rounds lives in `skills/givemotion/references/techniques/` (one recipe per technique, verified by rendering), `references/motion-design.md` and `references/genres/`: update them when a round teaches something new.
34
+ - Tests: `npm test` (needs Chrome + ffmpeg for the e2e part). Determinism matters: any change to the runtime must keep `1 worker == N workers` byte-identical.
35
+ - Before changing a block or example: `node src/cli.js check <file>` and `node src/cli.js snapshot <file>` and look at the sheet.
36
+ - Do not copy code from other video frameworks. Write it fresh. Name other frameworks only in the README comparison and in `benchmarks/` (the scripts it links to).
37
+ - The local server (`src/server.js`) only serves loopback Host headers, never hidden files, and sends no CORS headers: keep it that way (the root is often a project folder with `.env` in it). JSON put inside an inline `<script>` goes through `scriptJSON`.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Leonardo Grigorio and givemotion contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,493 @@
1
- # Temporary Holding Version
1
+ <picture>
2
+ <source media="(prefers-color-scheme: dark)" srcset="docs/media/logo/wordmark-dark.svg">
3
+ <img src="docs/media/logo/wordmark-light.svg" height="64" alt="givemotion">
4
+ </picture>
2
5
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
6
+ # givemotion: make videos with AI, free and open source
7
+
8
+ **Ask your AI for a video. Get an MP4.** givemotion is a free, open-source (MIT) video engine made for AI
9
+ coding agents like Claude Code, Cursor and Codex. Your agent writes the video as a web page, checks it, looks at
10
+ it, fixes it and renders it. When you want one thing changed, the agent changes that one thing and only that part
11
+ of the video is rendered again. No license fees, no seats, no per-render costs, no account, and you can fork it
12
+ and make it your own.
13
+
14
+ Created by [Leonardo Grigorio](https://github.com/leonardogrig) as an independent project. Website:
15
+ [givemotion.org](https://givemotion.org). (Formerly called motionwright.)
16
+
17
+ If you are looking for a **free, open-source way to make videos with code**, to **make videos with Claude Code**, or an
18
+ **AI motion graphics tool you can run in your own project**, this is it.
19
+
20
+ <p>
21
+ <img src="docs/media/data-story.gif" width="49%" alt="Data story made by an AI agent with givemotion: the camera rides a growing line chart">
22
+ <img src="docs/media/code-explainer.gif" width="49%" alt="Code explainer made by an AI agent with givemotion: retry with back-off drawn as a timeline">
23
+ </p>
24
+ <p>
25
+ <img src="docs/media/vertical-short.gif" width="24%" alt="Vertical short for social media made by an AI agent with givemotion, with word-by-word captions">
26
+ </p>
27
+
28
+ *All three were made by a Claude agent from a one-paragraph brief, using only this project's docs.
29
+ The data story is in [`examples/data-story`](examples/data-story); more compositions are in [`examples/`](examples).*
30
+
31
+ ---
32
+
33
+ ## Try it in 1 minute
34
+
35
+ In your project folder:
36
+
37
+ ```bash
38
+ npx givemotion init my-video
39
+ ```
40
+
41
+ This creates a starter video and installs the instructions your agent needs. Then just ask your agent:
42
+
43
+ > "Make a 20-second launch video for our app. Use our logo and colors, and put music under it."
44
+
45
+ The agent writes the video, runs the checks, looks at the frames, fixes what is wrong, and renders
46
+ `out/video.mp4`. You can watch and scrub it live with `npx givemotion dev my-video`.
47
+
48
+ Then ask for changes the way you would ask a motion designer: "make the title blue", "hold the chart two seconds
49
+ longer". The agent edits the page and renders again, and only the parts of the video that changed are redone.
50
+
51
+ Already have a project? `npx givemotion skill` adds just the agent instructions: a skill pack (a short
52
+ `SKILL.md` plus topic files the agent reads when it needs them) in `.claude/skills/givemotion/` for Claude Code and
53
+ `.agents/skills/givemotion/` for Codex, and a section in `AGENTS.md` for Cursor and other agents. Run it again after
54
+ updating givemotion; `npx givemotion doctor` tells you when the installed pack is older than the engine.
55
+
56
+ Other ways to install the skill:
57
+
58
+ - Claude Code plugin: `/plugin marketplace add givemotion/givemotion`, then `/plugin install givemotion@givemotion`
59
+ - Skills CLI (Claude Code, Codex, Cursor and more): `npx skills add givemotion/givemotion`
60
+
61
+ **You need:** Node.js 20+ and ffmpeg. Chrome is downloaded for you (`npx givemotion install`).
62
+
63
+ ## What you can make
64
+
65
+ - Product launch videos and app promos (with a cursor that really clicks the right button)
66
+ - Explainers with a camera that moves over a map, a diagram or a whole UI
67
+ - Hand-drawn whiteboard (Excalidraw-style) explainers: sketchy shapes and arrows that draw themselves on, handwriting
68
+ - Animated charts and data stories, from your own JSON data
69
+ - Vertical shorts for TikTok, Reels and YouTube Shorts, with word-by-word captions
70
+ - Code explainers for developer channels
71
+ - Logo stings, title cards, lower thirds, end cards
72
+ - Many personalized videos from one template (a different name, number or logo in each)
73
+ - Transparent overlays to drop into Premiere, DaVinci Resolve or Final Cut
74
+
75
+ ## Same brief, four models
76
+
77
+ Each model got the same one-page brief ("The last lighthouse": a 15 s cinematic title sequence, night sea, a light
78
+ beam that carries into the title) and only this project's docs.
79
+
80
+ | Claude Opus 5.5 | Claude Sonnet 5.5 |
81
+ |---|---|
82
+ | <img src="docs/media/lighthouse-opus.gif" width="100%" alt="The last lighthouse, made by Claude Opus 5.5 with givemotion"> | <img src="docs/media/lighthouse-sonnet.gif" width="100%" alt="The last lighthouse, made by Claude Sonnet 5.5 with givemotion"> |
83
+ | **Claude Haiku 5.5** | **Gemini 4 Argon** |
84
+ | <img src="docs/media/lighthouse-haiku.gif" width="100%" alt="The last lighthouse, made by Claude Haiku 5.5 with givemotion"> | <img src="docs/media/lighthouse-gemini.gif" width="100%" alt="The last lighthouse, made by Gemini 4 Argon with givemotion"> |
85
+
86
+ ## Why it exists
87
+
88
+ I started givemotion because of how AI video models handle changes. When one detail is wrong, you ask again and
89
+ the model makes the whole video again, and something else often comes out different. With code, a change is an edit:
90
+ the agent changes one color or one timing and everything else stays exactly as it was. I wanted an engine built
91
+ around that loop, where the agent writes, checks, looks and fixes, and where a small fix costs a small render.
92
+
93
+ I also wanted it to be free for everyone without conditions. Companies of any size, agencies, people building their
94
+ own video tools on top of it: MIT allows all of that, including selling a modified copy.
95
+
96
+ It's an independent project, not tied to any company, and it's young. It gets better in rounds: fresh agents make
97
+ real videos from the docs, I read where they got stuck, and the engine is fixed. What it can't do yet is listed
98
+ below, next to what it can.
99
+
100
+ Leo
101
+
102
+ ## Why it works well with AI agents
103
+
104
+ Most video tools were made for people. AI agents work differently, so givemotion is built around how they actually
105
+ behave, and we test it with real agents instead of guessing.
106
+
107
+ **1. Change one thing, render one part.** A render is split into fixed parts of 1 to 2 seconds, each with a
108
+ fingerprint of everything that can affect its pixels. Render again after an edit and only the parts whose fingerprint
109
+ changed are redone. Edit one scene and only that scene's parts are rendered; in one long scene, an edit to something
110
+ that first appears at 40 s keeps the first 40 s. The result is byte-identical to a full render. Neither HyperFrames
111
+ nor Remotion reuses unchanged parts on its own (Remotion can render a frame range you pick by hand). There are limits:
112
+ a script that reads the whole page, for example, turns the finer reuse inside a long scene off, and the render
113
+ report says why.
114
+
115
+ **2. It uses what AI already knows best: web pages.** A video is one HTML file with normal CSS and JavaScript.
116
+ Models have seen billions of web pages, so they write them well. In our test, 12 Claude agents made the same 4 videos
117
+ in plain HTML, in HTML with ready-made blocks, and in React; blind AI judges ranked plain HTML first in 6 of 8 cases,
118
+ with React a little behind ([the experiment](docs/experiments/2026-10-format-test.md)). That's a small test, and
119
+ it agrees with outside research (DesignBench, 2025) that models do best with plain HTML and CSS. React still works
120
+ if you want it. HyperFrames also uses plain HTML; Remotion uses React.
121
+
122
+ **3. The agent can check its own work.** An agent can't watch a video, so the engine does it for them:
123
+ - `check` finds text that is cut off, off screen, covered, overlapping, too small or hard to read, lines running
124
+ through labels, two scenes' text smudged together in a transition, broken files and script errors, and says how
125
+ to fix each one. It knows the difference between text that is *moving* past the edge and text that is *stuck* there.
126
+ - It also flags pacing: long stretches where nothing happens, a dead end card, an empty opening, an element that
127
+ leaves before you could read it, or a camera move that only arrives after its scene has started to leave.
128
+ - It prints a "motion strip", a one-line picture of the video's rhythm.
129
+
130
+ **4. It picks the frames worth looking at.** `snapshot` reads the timeline and chooses the moments itself: each scene
131
+ once its entrances are done and before it starts to leave, and each camera shot once the camera has arrived. It puts
132
+ them in one image, so the agent sees the whole video in one look instead of guessing timestamps. `analyze` does the
133
+ same for any video file, including a reference you want to match, and `--compare` lists how yours differs.
134
+
135
+ **5. Motion design, not slides.** The tools that make video feel like animation are built in, so the agent doesn't
136
+ have to write them: a camera that follows and frames things, motion along paths, shape morphs, shared elements that
137
+ fly from one scene into the next, more than 25 scene transitions, kinetic type, particle bursts, live data charts the
138
+ camera can ride, hand-drawn sketch shapes and arrows that draw themselves on, labels that stay attached to their
139
+ shapes, and cuts and pulses that land on the music's beats. In our test against Remotion, the givemotion agents
140
+ wrote a median of 240 lines per video and the Remotion agents 617, mostly because they had to build a camera, beat
141
+ detection and hand-drawn shapes themselves.
142
+
143
+ **6. Natural motion by default.** Entrances spring in and settle, diagonal moves travel on a slight arc, exits
144
+ accelerate away, and the camera moves like an operator (back-to-back shots flow into one move, `follow` trails its
145
+ target and settles). `<html data-motion="classic">` brings back plain curves. We are still working out how to
146
+ measure whether viewers see the difference; so far our AI judges, who look at stills, don't.
147
+
148
+ **7. The know-how of a motion designer, in the agent's docs.** The skill pack has a short core plus files the
149
+ agent reads only when it needs them: 15 technique recipes (kinetic type, camera moves, scene transitions, logo
150
+ reveals, charts, UI demos, hand-drawn...), each checked by rendering it; 8 ready-made looks (palette, fonts,
151
+ background, motion personality); and guides for 9 kinds of video. Six fonts are built in (Inter, JetBrains Mono,
152
+ Playfair Display, Space Grotesk, Bebas Neue, Nunito, Caveat), so a video looks the same on every machine.
153
+
154
+ **8. Built from what agents struggled with.** We give fresh agents only the docs and a real brief, read their
155
+ notes on what got in their way, and fix the engine, not just the instructions. In the latest full round, 18 agents
156
+ made 9 kinds of video (promo, explainer, data story, UI demo, whiteboard, code explainer, logo sting, year recap,
157
+ vertical short); blind AI judges gave them 7.1 out of 10 on average, none below 6, and their notes led to about 20
158
+ engine fixes. Every round and what it changed is in [`docs/experiments/`](docs/experiments/).
159
+
160
+ **9. Same input, same video.** Frames are a pure function of time, and 1 worker and N workers produce the same bytes;
161
+ the test suite checks it. That is what makes the reuse in point 1 safe. One known case still differs on macOS (a fade
162
+ combined with a move on text can be one color level off between worker counts), and it's on the fix list.
163
+
164
+ **10. Small and private.** givemotion has zero npm dependencies (installing it adds one package), sends no usage
165
+ data, and never needs an account. It renders wherever Node runs, and once Chrome is installed it works offline.
166
+
167
+ ## What it doesn't do yet
168
+
169
+ - **No cloud rendering.** It renders on your machine or your server. HyperFrames and Remotion both run on AWS Lambda
170
+ and Google Cloud Run.
171
+ - **No visual editor.** `givemotion dev` is a preview (timeline, scrubbing, frame stepping, sound), not an editor.
172
+ Your agent is the editor. If you want to drag things around yourself, the HyperFrames desktop app and Remotion
173
+ Studio do more.
174
+ - **No voice or transcription tools.** Bring your own voice-over and a word-timed captions file or `.srt`.
175
+ - **No HDR or HLS output.**
176
+ - **Slow on heavy pages without a GPU.** Pages with many full-screen effects render slowly on machines without one.
177
+ - **Speed on a Mac is not benchmarked yet.** All our timing numbers come from Linux cloud machines (see below).
178
+ - **It's new.** The community is small, and options may still change between 0.x versions.
179
+
180
+ ## How it compares
181
+
182
+ Three tools turn HTML in headless Chrome into video: **givemotion**, **HyperFrames** (by HeyGen) and **Remotion**.
183
+ All three encode with ffmpeg. Here is where they differ, from each project's own docs, license and repository.
184
+ Checked on 27 October 2026 (HyperFrames 0.8.209, Remotion 4.0.539); these projects move fast, so tell us if something
185
+ changed.
186
+
187
+ | | givemotion | HyperFrames | Remotion |
188
+ |---|---|---|---|
189
+ | Made by | Independent project by Leonardo Grigorio | HeyGen | Remotion |
190
+ | License | MIT | Apache 2.0 | Source-available, its own license (not open source by the OSI definition)¹ |
191
+ | Free for companies | Yes, any size | Yes, any size | Up to 3 people; at 4 or more people (all staff, not only users) a paid license, per seat or per render¹ |
192
+ | Fork it and sell your fork | Yes | Yes | No, selling or licensing your own derivative is not allowed¹ |
193
+ | You write | HTML, CSS, JavaScript (React optional) | HTML, CSS, JavaScript | React |
194
+ | Instructions for agents | Skill pack, Claude Code plugin, `AGENTS.md`, `llms.txt` | 7 skills, Claude Code plugin, hosted MCP server (beta), `llms.txt` | 12 Agent Skills, Claude Code plugin, WebMCP in Studio, docs as Markdown |
195
+ | Agent checks its own video | `check`: cut-off, covered, overlapping, tiny and low-contrast text, lines through labels, smudged transitions, broken files, script errors, pacing | `lint` and `check`: script errors, layout (overflow, clipping, occlusion), motion assertions, WCAG contrast, craft warnings, audio | ESLint plugin; we found no layout checker |
196
+ | Agent looks at frames | `snapshot` picks the key moments from the timeline into one image; frame strips of one move; `analyze` and `--compare` for any video | `snapshot` at times you give, an onion-skin image of one element's motion, side by side with a reference | `still`, or chosen frames as images |
197
+ | Render again after a small change | Only the parts that changed, automatically, byte-identical to a full render | No reuse of unchanged parts that we found (it caches frames taken from source videos) | No automatic reuse that we found; you can render a frame range you choose |
198
+ | Same bytes with 1 or N workers | Yes, tested (one open macOS case) | "Same input, identical output"; pixels can vary by machine, Docker for exact output | Frames must be a pure function of the frame number; no byte-identical claim |
199
+ | Built-in motion | Camera, paths, morphs, fly, hand-drawn shapes, live charts, beat-synced cuts; 21 blocks | A catalog of about 450 blocks; GSAP, Lottie, Three.js, Anime.js | `spring()`, `interpolate()`, add-on packages (transitions, paths, shapes, GSAP) |
200
+ | Frame capture | Chrome's frame-by-frame capture on Linux and Windows, screenshots on macOS | Frame-by-frame on Linux; screenshots for parallel renders on macOS and Windows | Screenshots; a custom Chromium with shared-memory capture on Linux and Apple Silicon Macs (macOS 15+) |
201
+ | Output | MP4, WebM, MOV (ProRes 4444 with transparency), GIF, PNG frames, MP3 | MP4, WebM, MOV (ProRes 4444), GIF, PNG frames, HLS, HDR | H.264, H.265, VP8, VP9, AV1, ProRes, GIF, image sequences, MP3/WAV/AAC |
202
+ | Cloud rendering | None | AWS Lambda, Google Cloud Run, HeyGen's cloud (credits) | AWS Lambda, Google Cloud Run (alpha), Vercel Sandbox |
203
+ | Editor | Browser preview | Browser studio and a desktop app with a built-in agent (HeyGen sign-in) | Remotion Studio; a paid editor template |
204
+ | Built-in AI extras | None | Text to speech, transcription, background removal | Whisper caption packages |
205
+ | npm packages installed² | 1 (zero dependencies) | about 66 | about 237, plus React |
206
+ | Usage data sent | None | On by default, can be turned off; tied to your HeyGen email after login | With a license key set, and always from in-browser rendering |
207
+ | Community (GitHub stars) | New and small | about 74k | about 68k |
208
+
209
+ ¹ Remotion's [license](https://github.com/remotion-dev/remotion/blob/main/LICENSE.md),
210
+ [terms](https://www.remotion.dev/docs/terms) and [license FAQ](https://www.remotion.dev/docs/license/faq). Read them
211
+ yourself before you decide; this is our summary, not legal advice. The FAQ also allows building an AI tool that
212
+ writes and renders Remotion code, and counts it as an automation (billed per render).
213
+ ² Counted from the npm registry for `givemotion`, `hyperframes` and `@remotion/cli`, without optional and peer
214
+ dependencies.
215
+
216
+ HyperFrames facts are from its [docs](https://hyperframes.heygen.com) and
217
+ [repository](https://github.com/heygen-com/hyperframes). Remotion facts are from its [docs](https://www.remotion.dev/docs)
218
+ and [repository](https://github.com/remotion-dev/remotion).
219
+
220
+ ### Tested with AI agents (givemotion vs Remotion)
221
+
222
+ Fresh Claude Opus agents made the same 9 briefs (promo, explainer, data story, UI demo, whiteboard, code explainer,
223
+ logo sting, year recap, vertical short), twice each, once with givemotion and once with Remotion 4.0.538, in
224
+ October 2026. 27 blind AI judges scored the 36 videos, 4 at a time per brief. HyperFrames has not been through this
225
+ test yet; it's next.
226
+
227
+ | | givemotion | Remotion |
228
+ |---|---|---|
229
+ | Judges' overall score (1-10) | **7.2** | 6.8 |
230
+ | Briefs won | 5 of 9 | 4 of 9 |
231
+ | Render time for all 18 videos (4 CPUs, no GPU) | **547 s** | 1102 s |
232
+ | Same animation in both tools, default settings | **14.6 s** | 27.1 s |
233
+ | Code the agent wrote per video (median) | **240 lines** | 617 lines |
234
+
235
+ The quality edge is small and mostly fewer visible mistakes; Remotion won the year recap, explainer, whiteboard and
236
+ promo briefs. The speed edge is larger: givemotion rendered every video faster. These are AI judges looking at frames,
237
+ on one machine, and the test harness and raw scores are not in this repository yet, so read this as our report, not
238
+ yet a benchmark you can rerun. givemotion agents also read more context per video (we estimate 10-20% more cost in
239
+ tokens at list prices), which we are working to bring down. The test used Remotion only as a user does.
240
+
241
+ ### Speed vs HyperFrames
242
+
243
+ The same GSAP animation (10 s at 1080p) on a small cloud machine with 2 CPUs and no GPU: givemotion 22.2 s,
244
+ HyperFrames 0.8.188 36.8 to 40.0 s at the same quality. That's one animation on one machine, and HyperFrames has faster
245
+ capture paths we could not test there. The script is in [`benchmarks/vs-hyperframes`](benchmarks/vs-hyperframes)
246
+ so you can run it yourself. We have not yet run all three tools on the same machine, or on a Mac.
247
+
248
+ ### Which one to pick
249
+
250
+ **Pick givemotion if** you want an engine with no license conditions you can fork and sell, no dependencies and no
251
+ data sent anywhere; if your agent will make many small changes and you want each re-render to be quick; or if you want
252
+ checks that also look at pacing and motion-design tools built in.
253
+
254
+ **Pick HyperFrames if** you want the biggest feature set right now: cloud rendering, a desktop app, voice and
255
+ transcription tools, HDR and HLS output, a large block catalog, and a large community backed by HeyGen.
256
+
257
+ **Pick Remotion if** you or your team already work in React, you want its mature ecosystem (Lambda rendering, the
258
+ Player, years of examples), and its license fits your company size.
259
+
260
+ HyperFrames and Remotion are good projects and inspired parts of this one. givemotion shares the idea of turning a
261
+ web page into a video, not the code. We are not affiliated with either.
262
+
263
+ ## Make your own version (fork it)
264
+
265
+ MIT means you can take this and build on it, keep your fork private, or sell it. The only condition is that the
266
+ license notice stays in. One idea we like: **a fork focused on one style.** For example a "whiteboard" edition, a
267
+ "tech launch" edition, or your company's brand edition:
268
+
269
+ 1. Fork the repo.
270
+ 2. Add blocks in [`blocks/`](blocks) for your style: your title cards, your lower thirds, your charts, your
271
+ transitions, in your colors and fonts. Put your fonts in `src/runtime/fonts/`, with an `@font-face` for each in
272
+ `src/runtime/preset.css`, so every render has them.
273
+ 3. Add your look to the agent instructions. [`skills/givemotion/references/styles.md`](skills/givemotion/references/styles.md)
274
+ holds the built-in looks; add yours with the blocks to use, the colors, the fonts, the motion personality and what
275
+ to avoid. Point to it from [`SKILL.md`](skills/givemotion/SKILL.md) so the agent reads it first.
276
+ 4. Ship it with `npx givemotion skill` (or your own package name), so your team's agents get your edition.
277
+
278
+ Agents then make videos in that style faster and more consistently, because they start from pieces that already look
279
+ right instead of inventing everything each time. You get most of what people hope for from "fine-tuning a model on
280
+ our brand", without training anything.
281
+
282
+ For a single project you may not need a fork: copy blocks into the project with `npx givemotion add <name>`, edit them
283
+ to your brand, and write your rules into the project's `AGENTS.md`.
284
+
285
+ ## Where it's going
286
+
287
+ givemotion is maintained as an independent project and improved in rounds: agents make real videos, judges score
288
+ them, and what went wrong becomes engine fixes and better docs. The open work is public in
289
+ [`docs/NEXT.md`](docs/NEXT.md). Near the top of the list:
290
+
291
+ - publish the agent-test harness, and put HyperFrames through the same test;
292
+ - benchmark all three tools on one machine, including a Mac;
293
+ - fix the open macOS determinism case;
294
+ - lower the token cost per video for agents;
295
+ - find a fair way to measure whether natural motion looks better.
296
+
297
+ If you use it, the most useful thing you can send is a video that came out wrong, with the HTML. Issues and pull
298
+ requests are welcome.
299
+
300
+ ## Questions people ask
301
+
302
+ **Is there a free, open-source way to turn code into video?** Yes. givemotion (MIT) and HyperFrames (Apache 2.0) are
303
+ both free for any use, including big companies. Remotion is free for individuals and companies of up to 3 people.
304
+ See [How it compares](#how-it-compares).
305
+
306
+ **Is it a free alternative to Remotion?** It does the same job (code in, video out) with HTML instead of React,
307
+ under MIT for everyone. In our test it rendered about 2× faster and scored a little higher; see
308
+ [How it compares](#how-it-compares).
309
+
310
+ **How is it different from HyperFrames?** Both are free and both use HTML. givemotion re-renders only what changed,
311
+ has no dependencies, sends no data, needs no account and is independent of any company. HyperFrames has far more
312
+ features today (cloud rendering, a desktop app, voice tools) and a much larger community.
313
+
314
+ **Can Claude Code make videos?** Yes. Run `npx givemotion init` (or `npx givemotion skill` in an existing
315
+ project) and ask Claude Code for a video. It also works with Cursor, Codex and other agents that read an
316
+ `AGENTS.md` file.
317
+
318
+ **If I don't like one part, does the whole video render again?** No. The agent edits that part, and only the 1-2
319
+ second pieces of the video that changed are rendered again. The result is the same file you would get from a full
320
+ render.
321
+
322
+ **Do I need to know how to code?** No. You talk to your agent; the agent writes the code. If you do know HTML
323
+ and CSS, you can open the file and change anything.
324
+
325
+ **Can I use it for client work or commercially?** Yes, for free, at any company size. MIT license.
326
+
327
+ **Can I build my own video product on it?** Yes. You can embed it, run it on your servers, fork it and sell the fork.
328
+
329
+ **Can I put my own music, voice-over, logos and videos in?** Yes. Audio tracks with volume curves and ducking
330
+ under a voice, video clips, images, fonts, and captions from a word-timed file or an `.srt`.
331
+
332
+ **How fast is it?** Fast on a normal computer, faster with more cores and a GPU. It renders with several browsers
333
+ at once, skips frames that did not change, and re-renders only the parts you changed. See [Performance](#performance).
334
+
335
+ **Who made it?** [Leonardo Grigorio](https://github.com/leonardogrig) started it in 2026. It's an independent
336
+ open-source project, and contributions are welcome.
337
+
338
+ ---
339
+
340
+ ## For developers
341
+
342
+ ### A composition
343
+
344
+ ```html
345
+ <!doctype html>
346
+ <html data-width="1920" data-height="1080" data-fps="30">
347
+ <head>
348
+ <style>
349
+ body { background: #0b0d12; color: #fff; font-family: Inter, system-ui, sans-serif; }
350
+ .scene { display: grid; place-items: center; }
351
+ h1 { font-size: 120px; margin: 0; }
352
+ </style>
353
+ </head>
354
+ <body>
355
+ <main data-sequence data-transition="fade 0.6">
356
+ <section class="scene" data-duration="3" data-camera="push 1.1">
357
+ <h1 data-enter="rise">Hello</h1>
358
+ </section>
359
+ <section class="scene" data-duration="4">
360
+ <h1 data-split="words" data-enter="fade-up 0.6" data-stagger="0.08">Any HTML. Any CSS.</h1>
361
+ <audio src="music.mp3" data-volume="0.4" data-fade-out="1"></audio>
362
+ </section>
363
+ </main>
364
+ </body>
365
+ </html>
366
+ ```
367
+
368
+ No imports and no build step: the runtime is added for you. Everything that moves on a web page is played
369
+ on a virtual clock and captured frame by frame: CSS animations, transitions, the Web Animations API, timers,
370
+ `requestAnimationFrame`, canvas, WebGL, GSAP, Lottie. There is also a built-in GSAP-style timeline
371
+ (`gm.timeline()`), a camera (`gm.camera()`), path travel, shape morphs, `gm.fly()` (move an element in from where
372
+ another one is), live line charts (`gm.chart.line()`), hand-drawn shapes (`data-sketch`), labels pinned to shapes
373
+ (`data-anchor`), particle bursts, and music analysis (`gm.audio()`, `gm.beat(n)`, `data-pulse`, cuts written in beats).
374
+
375
+ The full reference is the skill pack written for agents (and good for humans too):
376
+ [`skills/givemotion/SKILL.md`](skills/givemotion/SKILL.md) and the topic files in
377
+ [`skills/givemotion/references/`](skills/givemotion/references).
378
+
379
+ ### Commands
380
+
381
+ | Command | What it does |
382
+ |---|---|
383
+ | `init [dir]` | New project: starter video, agent instructions, AGENTS.md |
384
+ | `skill` | Add the agent instructions to an existing project |
385
+ | `dev [file]` | Live preview with a timeline, scrubbing, frame stepping and sound |
386
+ | `render [file] -o out.mp4` | Render to `.mp4` `.webm` `.mov` `.gif`, a folder of PNGs, or just the soundtrack (`.mp3`) |
387
+ | `still [file] -t 2.5 -o f.png` | One exact frame |
388
+ | `check [file]` | Problems with fixes, plus the motion strip |
389
+ | `snapshot [file]` | Key moments of every scene in one image |
390
+ | `inspect [file]` | Timeline as JSON; `--at 3.2 --el "#logo"` says where anything is at any moment |
391
+ | `audio <file>` | Tempo, beats, bar starts and big hits of a song |
392
+ | `captions <file>` | The caption pages a word-timed `.json` or `.srt` will show, so you can pick how many words per page |
393
+ | `analyze <video.mp4>` | Report on any video (a reference, or your render): shots and cuts, transitions, camera, pacing, colors, cuts on the beat, contact sheets. `--compare ref.mp4` lists how yours differs |
394
+ | `bundle [file] -o dir` | Standalone page + `<gm-player>` to embed the video in any site |
395
+ | `blocks` / `add <name>` | Ready-made blocks you can copy and edit |
396
+ | `install` / `doctor` / `bench` | Get Chrome, check your setup, measure speed (and what makes a page slow to draw) |
397
+
398
+ Render options: `--quality draft|standard|high|max`, `--fps`, `--scale 2` (4K from a 1080p layout; `4/3` for 1440p),
399
+ `--frames 2s-5s`, `--transparent`, `--motion-blur 8|auto`, `--codec h265|av1`, `--hardware`, `--workers`,
400
+ `--muted`, `--data file.json`, `--props '{…}'`, `--cache-dir <dir>` (where the parts cache lives),
401
+ `--progress json` (JSON progress lines on stderr, for apps). Every command takes `--json`.
402
+
403
+ Rendering again after a change only redoes the parts of the video that changed (edit one scene → only its 1-2 s parts
404
+ are rendered; in one long scene, an edit to something that appears at 40 s keeps the first 40 s), and the result is
405
+ byte-identical to a full render. `--redo 4s-7s` forces a range, `--no-cache` turns it off. The render result says
406
+ how many parts were reused, and `parts.lateOff` says why the finer reuse inside a long scene was turned off, if it was.
407
+
408
+ ### Programmatic API
409
+
410
+ ```js
411
+ import { render, check, snapshot, still, inspect } from 'givemotion';
412
+
413
+ await render('video.html', { output: 'out/video.mp4', quality: 'high', data: { name: 'Ada' } });
414
+ const report = await check('video.html'); // { ok, errors, warnings, issues: [...] }
415
+ const { sheet } = await snapshot('video.html'); // path to the contact sheet
416
+ ```
417
+
418
+ TypeScript types ship with the package (`RenderOptions`, `RenderResult`, `CheckReport`, `Issue`, ...), so your
419
+ editor and your agent see every option and catch a misspelled one. givemotion itself is plain JavaScript checked by
420
+ TypeScript from JSDoc, so there is no build step.
421
+
422
+ ### Blocks
423
+
424
+ Plain-HTML building blocks you copy into your project and edit freely (`npx givemotion add <name>`):
425
+ title-card, lower-third, captions, code-window, bar-chart, line-chart, stat, checklist, steps, browser-window,
426
+ phone, cursor, callout, compare, quote, word-pop, logo-reveal, end-card, gradient-bg, grid-bg, lottie.
427
+
428
+ ### Performance
429
+
430
+ Measured on a small cloud machine (2 CPUs, no GPU), 1080p at 30 fps, 300 frames:
431
+
432
+ | | Time |
433
+ |---|---|
434
+ | Simple approach: one browser, PNG screenshots, no frame reuse | 32.7 s |
435
+ | givemotion, 1 worker | 15.0 s |
436
+ | givemotion, auto workers | 13.3 s |
437
+
438
+ On a 4-CPU cloud machine without a GPU (October 2026), that same test page renders in 14.6 s (22.6 s with one
439
+ worker), and the 18 videos agents made in our latest test round (5 to 31 s long, 1080p) rendered at 18.8 frames per
440
+ second on average. Pages with many full-screen effects are slower on machines without a GPU. Run
441
+ `npx givemotion bench` on your own computer.
442
+
443
+ Where the speed comes from: Chrome's frame-by-frame capture (`beginFrame`, on Linux and Windows), several
444
+ browsers rendering parts of the video at once, reusing frames that did not change, re-rendering only the parts that
445
+ changed, and encoding while capturing.
446
+
447
+ **On a Mac** it uses the GPU for drawing, and the Mac's hardware video encoder (VideoToolbox) for MP4 by default,
448
+ once a quick one-time check shows the encoder gives the same bytes every time (so renders stay exact and re-renders
449
+ can reuse parts). `npx givemotion doctor` says which encoder you get; `--no-hardware` turns it off. Frame capture
450
+ on macOS uses screenshots, because Chrome's frame-by-frame capture is not available there. We have not published Mac
451
+ timings yet.
452
+
453
+ ### How it works
454
+
455
+ ```
456
+ HTML ──► local server (adds the runtime, expands blocks and {{data}}, serves video frames)
457
+ │
458
+ ▼
459
+ headless Chrome × N ── runtime: virtual clock, seeks every animation to the exact time
460
+ │ capture each frame
461
+ ▼
462
+ ffmpeg × N (1-2 s parts, fingerprinted, reused when unchanged) ──► join + audio mix ──► out.mp4
463
+ ```
464
+
465
+ ### Requirements
466
+
467
+ - Node.js 20+
468
+ - ffmpeg on your PATH (`brew install ffmpeg`, `sudo apt install ffmpeg`, `winget install ffmpeg`)
469
+ - Chrome: `npx givemotion install` downloads it, or it finds the one you have
470
+
471
+ givemotion itself has **zero npm dependencies**: installing it adds one package.
472
+
473
+ ### Status
474
+
475
+ givemotion is young (0.x). Compositions written today should keep working, but options and APIs may still
476
+ change between minor versions; changes are listed in the release notes.
477
+
478
+ ## Contributing and security
479
+
480
+ Pull requests and issues are welcome: see [CONTRIBUTING.md](CONTRIBUTING.md) (and [AGENTS.md](AGENTS.md) for the
481
+ code layout). A composition is code that runs in Chrome; if you render compositions or data from people you don't
482
+ trust, read [SECURITY.md](SECURITY.md) first. Report security problems privately, as described there.
483
+
484
+ ## License
485
+
486
+ MIT, copyright Leonardo Grigorio and givemotion contributors. Use it, change it, fork it, sell what you make with it.
487
+ The MIT license covers givemotion itself; Chrome and ffmpeg are installed separately under their own licenses. The
488
+ examples and the animations in this README were made for this project and are MIT too. The bundled fonts (Inter,
489
+ JetBrains Mono, Playfair Display, Space Grotesk, Bebas Neue, Nunito, Caveat) are under the SIL Open Font License (license
490
+ files in `src/runtime/fonts/`). Everything third-party is listed in [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
491
+
492
+ This project was written from scratch. It shares the idea of "turn a web page into a video" with tools like
493
+ Remotion and HyperFrames, but no code from them. Remotion and HyperFrames are trademarks of their owners.
package/SECURITY.md ADDED
@@ -0,0 +1,40 @@
1
+ # Security
2
+
3
+ ## Reporting a problem
4
+
5
+ Please do not open a public issue for security problems. Use GitHub's private reporting instead:
6
+ **Security → Report a vulnerability** on [the repository](https://github.com/givemotion/givemotion/security/advisories/new).
7
+ You should get an answer within a week. Fixes go into the latest release.
8
+
9
+ ## What givemotion trusts
10
+
11
+ givemotion runs your composition (HTML, CSS and JavaScript) in headless Chrome, the same way a browser runs a
12
+ web page. Keep that in mind when you render compositions or data you did not write:
13
+
14
+ - **A composition is code.** Rendering one runs its scripts. Render compositions from people you don't trust
15
+ the same way you would open their web page: in a container or a VM, without your secrets in the environment.
16
+ - **Network access.** Pages can load fonts, images and scripts from the internet, like any web page. To render
17
+ offline or in a locked-down service, block outbound network access around the render.
18
+ - **The local server** (used by `render`, `check`, `dev` and the others) listens on `127.0.0.1` only, answers only
19
+ requests addressed to `localhost`/`127.0.0.1`, sends no cross-origin headers, and never serves hidden files or
20
+ folders (`.env`, `.git`, ...). It serves the files under the project folder, so other programs on your own machine
21
+ can read them while it runs. The preview page exists only while `dev` runs, and it only loads pages from its own
22
+ server.
23
+ - **Symbolic links** inside the project folder are followed, also when they point outside it: that is how projects
24
+ share styles, sounds and blocks without copying them. A link that ends at a hidden file, or leads into a folder
25
+ that holds keys (`.ssh`, `.aws`, `.gnupg`, `.git`, `.config` and similar), is refused. A project you did not make
26
+ can still link to other files on your machine, so render it in a container (see above).
27
+ - **Media for the soundtrack** (`<audio>`, `<video>`) must be inside the project folder, by the same rules.
28
+ - **`<gm-include>`** is expanded on your machine, so it can read files outside the project folder (shared blocks);
29
+ it only reads `.html` and `.svg` files and never hidden files or folders.
30
+ - **`bundle`** makes a folder to publish. It copies only the files the page uses that the server would serve: inside
31
+ the project folder and not hidden. It lists the ones it left out.
32
+ - **Chrome's sandbox** stays on, except when running as root on Linux (common in Docker) or when
33
+ `GIVEMOTION_NO_SANDBOX` is set. In those cases isolate the process with the container instead.
34
+ - **Data and props** (`--data`, `--props`) are inserted into the HTML as escaped text: safe in text and in quoted
35
+ attribute values (`title="{{data.name}}"`, not `title={{data.name}}`), and a value at the start of a `src`/`href` is never a `javascript:` URL. They are not
36
+ safe inside `<script>` or `<style>`: there, read `gm.data` instead. `data-bind` sets text, and `data-bind-*` never
37
+ sets event handlers or script URLs. If you build compositions from user input in a service, still treat that input
38
+ like any HTML you would put on a web page.
39
+
40
+ givemotion sends no usage data anywhere.