# Introduction

> vidmake renders video from declarative JSON compositions, with a CLI built for AI agents to validate, inspect and look at every frame before rendering.

vidmake is a command-line tool, written in Rust, that turns a JSON file into a video. You describe
compositions, layers and animation as data; vidmake compiles that into a render tree and draws every
frame. There is no editor, timeline UI or browser. Instead, the CLI gives you (or your agent) precise
ways to check the work: validation with suggestions, a timeline, per-frame layout inspection,
animation traces, single stills and storyboard contact sheets.

**Demo: JSON on the left, the frame it describes on the right** (rendered video: https://vidmake.app/media/start-hero.mp4)

```json
{
  "fonts": [
    { "family": "Schibsted Grotesk", "path": "fonts/SchibstedGrotesk.ttf" },
    { "family": "Schibsted Grotesk", "path": "fonts/SchibstedGrotesk-Italic.ttf" },
    { "family": "JetBrains Mono", "path": "fonts/JetBrainsMono.ttf" }
  ],
  "compositions": [{
    "id": "hero", "description": "JSON on the left, the frame it describes on the right",
    "width": 1280, "height": 720, "fps": 30, "duration": "5s",
    "background": { "type": "radial", "center": [0.7, 0.45], "radius": 0.9, "stops": ["#f4f1ea", "#e9e4d8"] },
    "layers": [
      { "id": "card", "type": "rect", "x": 340, "y": "50%", "width": 560, "height": 300, "cornerRadius": 3,
        "fill": "#fbf9f4", "stroke": "#161412", "strokeWidth": 2, "enter": "fadeRight" },
      { "id": "code", "type": "text", "font": "JetBrains Mono", "fontSize": 24, "lineHeight": 1.6, "align": "left",
        "whiteSpace": "pre", "anchor": "left", "x": 96, "y": "50%", "fill": "#8a857a",
        "reveal": { "from": 0, "to": 1, "start": "0.5s", "duration": "1.5s", "ease": "linear" },
        "text": [ "{ ", { "text": "\"type\"", "fill": "#4a4640" }, ": ", { "text": "\"text\"", "fill": "#161412", "fontWeight": 700 }, ",\n  ",
          { "text": "\"text\"", "fill": "#4a4640" }, ": ", { "text": "\"Motion, written.\"", "fill": "#c92a26", "fontWeight": 700 }, ",\n  ",
          { "text": "\"font\"", "fill": "#4a4640" }, ": ", { "text": "\"Schibsted Grotesk\"", "fill": "#161412", "fontWeight": 700 }, ",\n  ",
          { "text": "\"stagger\"", "fill": "#4a4640" }, ": { ", { "text": "\"by\"", "fill": "#4a4640" }, ": ", { "text": "\"char\"", "fill": "#161412", "fontWeight": 700 }, " } }" ] },
      { "id": "cursor", "type": "rect", "width": 3, "height": 26, "x": 4, "fill": "#161412", "attach": "code",
        "opacity": "=floor(t * 2.5) % 2", "lint": { "ignore": ["invisible"] } },
      { "id": "arrow", "type": "line", "points": [[0, 0], [56, 0]], "x": 672, "y": "50%", "stroke": "#161412", "strokeWidth": 3,
        "drawEnd": { "from": 0, "to": 1, "duration": "0.4s" }, "start": "1.9s" },
      { "id": "title", "type": "text", "text": ["Motion,\n", { "text": "written.", "italic": true, "fontWeight": 400 }],
        "font": "Schibsted Grotesk", "fontWeight": 860, "fontSize": 104, "letterSpacing": -4.5, "lineHeight": 0.95,
        "fill": "#161412", "x": 975, "y": "43%", "start": "2.2s", "stagger": { "by": "char", "type": "fadeUp", "each": "35ms" } },
      { "id": "rule", "type": "line", "points": [[0, 0], [360, 0]], "x": 975, "y": "62%", "stroke": "#c92a26", "strokeWidth": 4,
        "start": "2.6s", "drawEnd": { "from": 0, "to": 1, "duration": "0.8s", "ease": "easeOutCubic" } },
      { "id": "tag", "type": "text", "text": "vidmake · JSON in, video out", "font": "JetBrains Mono", "fontSize": 15, "letterSpacing": 2.4,
        "uppercase": true, "fill": "#8a857a", "x": 975, "y": "68%", "start": "3s", "enter": "fadeUp" }
    ]
  }]
}
```

## Why vidmake exists

[Remotion](https://www.remotion.dev) makes videos from React code and gives people a Studio to
preview them. That works well for humans, but an AI agent can't watch a Studio preview and has to get
a whole React and browser toolchain right first. An agent needs three things instead:

- **A format it can write reliably.** A vidmake project is one strict JSON file. Unknown fields are
  rejected with a "did you mean" suggestion, and compile errors name the composition, the layer id and the field.
- **Feedback it can read.** `validate`, `timeline`, `inspect` and `trace` describe the video in words
  and numbers, `analyze` describes the music it will move to, and all of them can print JSON.
- **A way to see.** `storyboard` and `still` render any frame to a PNG the agent can open. Every frame is a
  pure function of time, so any frame can be checked on its own, in any order.

The concepts map closely to Remotion (compositions, sequences, series and transitions, springs,
input props, components), so if you know one you can read the other. See
[Coming from Remotion](https://vidmake.app/docs/remotion.md) for the full mapping.

| | Remotion | vidmake |
|---|---|---|
| You write | React components (TSX) | JSON data |
| Preview | Studio in a browser | `storyboard`, `still`, `inspect`, `timeline`, `trace` |
| Runtime | Node.js and a headless browser | one native Mac app |
| Errors | JavaScript stack traces | the layer id, the field and a suggested fix |
| Timing | `<Sequence>`, `<Series>`, `useCurrentFrame()` | `start`/`duration`, `series` groups, `t`/`f` in expressions |

## The loop at a glance

Every vidmake project is built the same way, whether a person or an agent is driving:

1. **Write** `project.json`: [compositions](https://vidmake.app/docs/compositions.md) containing [layers](https://vidmake.app/docs/layers.md), each with an `id`.
2. **Validate** with `vidmake validate project.json`: schema, assets, fonts, expressions and a [layout lint](https://vidmake.app/docs/lint.md).
3. **Check timing** with `vidmake timeline project.json`: when every layer is on screen.
4. **Look** with `vidmake storyboard project.json -o sb.png`: a labeled grid of frames.
5. **Measure** with `vidmake inspect project.json -t 2s` and `vidmake trace project.json -l title`: positions, boxes and curves as numbers.
6. **Render** with `vidmake render project.json -o out/video.mp4`.

Small fixes don't need a text editor: `vidmake set project.json title.fontSize 96` edits one value and
refuses to save it if the project would no longer compile. [Editing](https://vidmake.app/docs/editing.md) covers `get`, `set`,
`unset`, `add` and `rm`.

## A first look

This is a complete project. The title's letters blur in one after another, and the ring draws itself:

```json title="title.json"
{
  "id": "main", "width": 1920, "height": 1080, "fps": 30, "duration": "5s",
  "props": { "title": "Hello" },
  "background": { "type": "linear", "angle": 135, "stops": ["#f4f1ea", "#e9e4d8"] },
  "layers": [
    { "id": "title", "type": "text", "text": "{{title}}", "fontSize": 120, "fontWeight": 900, "fill": "#161412",
      "enter": { "from": { "opacity": 0, "y": "0.3em", "blur": "0.15em" } }, "stagger": "char", "exit": "fade" },
    { "id": "ring", "type": "arc", "y": "75%", "width": 120, "stroke": "#c92a26", "strokeWidth": 12,
      "endAngle": { "from": 0, "to": 360, "duration": "3s" }, "enter": "pop" }
  ]
}
```

```bash
vidmake validate title.json
vidmake storyboard title.json -o sb.png
vidmake render title.json -o out/title.mp4 -p title="Launch day"
```

The `{{title}}` placeholder is an input [prop](https://vidmake.app/docs/props.md), overridden here from the command line.
The [quickstart](https://vidmake.app/docs/quickstart.md) walks through a project like this one step by step.

## What you can make

- **Layers**: [shapes](https://vidmake.app/docs/shapes.md) (rect, ellipse, polygon, star, arc), [paths and lines](https://vidmake.app/docs/paths.md) that
  draw themselves on stroke by stroke, [text](https://vidmake.app/docs/text.md) with wrapping, rich spans (color, weight, italic, font) and per-letter stagger, [images](https://vidmake.app/docs/images.md)
  (including sharp SVG), [video](https://vidmake.app/docs/video.md), [audio](https://vidmake.app/docs/audio.md), [groups](https://vidmake.app/docs/groups.md) with flexbox-style
  layout, reusable [components](https://vidmake.app/docs/components.md), [captions](https://vidmake.app/docs/captions.md), [waveforms](https://vidmake.app/docs/waveform.md)
  and [particles](https://vidmake.app/docs/particles.md).
- **Motion**: [keyframes, tweens and springs](https://vidmake.app/docs/animation.md), 30+ [easings](https://vidmake.app/docs/easing.md),
  [expressions](https://vidmake.app/docs/expressions.md) like `"=h/2 + sin(t*2)*40"`, [audio-reactive values](https://vidmake.app/docs/audio-reactive.md),
  [enter and exit presets](https://vidmake.app/docs/presets.md) on springs, [stagger](https://vidmake.app/docs/text.md#stagger) for text, groups and copies,
  [repeat](https://vidmake.app/docs/repeat.md) and [attach](https://vidmake.app/docs/attach.md).
- **Structure**: [series with transitions](https://vidmake.app/docs/series.md), [props](https://vidmake.app/docs/props.md) for templating, multiple
  [compositions](https://vidmake.app/docs/compositions.md) in one file.
- **Look**: a [theme](https://vidmake.app/docs/theme.md) of colors, type styles and motion with modes, [gradients and colors](https://vidmake.app/docs/colors.md), [effects](https://vidmake.app/docs/effects.md) (shadow, blur, glow, grain, 3D tilt,
  blend modes, motion blur) and [masks](https://vidmake.app/docs/masks.md).
- **Output**: MP4 (H.264/H.265), WebM (VP9, with alpha), MOV (ProRes, with alpha), GIF, PNG sequences and
  MP3/WAV/M4A audio. See [Rendering](https://vidmake.app/docs/rendering.md).

> [!AGENT]
> If you are an AI agent, start with [For AI agents](https://vidmake.app/docs/agents.md). It explains the loop above in detail
> and how to read each command's output. `vidmake docs` prints the complete format reference in one go,
> and [`/llms-full.txt`](https://vidmake.app/llms-full.txt) has every page of these docs as plain text.

## Explore the docs

### Getting started

- [Installation](https://vidmake.app/docs/installation.md) The app, your license key, the command and updates.
- [Licensing](https://vidmake.app/docs/licensing.md) One payment, every update of your major version, and the upgrade discount.
- [Quickstart](https://vidmake.app/docs/quickstart.md) Your first video: init, validate, storyboard, edit, render.
- [For AI agents](https://vidmake.app/docs/agents.md) The agent loop in depth, `--json` output and error messages.
- [Core concepts](https://vidmake.app/docs/concepts.md) Projects, the layer tree, coordinates, anchors and the time model.

### Compositions

- [Compositions](https://vidmake.app/docs/compositions.md) The project file, fonts and every composition field.
- [Time](https://vidmake.app/docs/time.md) Frames, `"1.5s"`, `"500ms"`, `"45f"`, `"1:02.5"` and layer-local time.
- [Series and transitions](https://vidmake.app/docs/series.md) Scenes back to back, with fades, slides, wipes and zooms.
- [Props](https://vidmake.app/docs/props.md) `{{name}}` templating and overrides from the command line.

### Layers

- [Layers](https://vidmake.app/docs/layers.md) Fields every layer shares: timing, transform, style.
- [Shapes](https://vidmake.app/docs/shapes.md) rect, ellipse, polygon, star and arc.
- [Paths and lines](https://vidmake.app/docs/paths.md) SVG path data, polylines and draw-on animation.
- [Text](https://vidmake.app/docs/text.md) Fonts, wrapping, rich text, counters and stagger.
- [Images](https://vidmake.app/docs/images.md) PNG, JPEG, WebP, GIF and sharp SVG.
- [Video](https://vidmake.app/docs/video.md) Trimming, speed, looping, volume and fit.
- [Audio](https://vidmake.app/docs/audio.md) Music and sound with fades and volume curves.
- [Groups](https://vidmake.app/docs/groups.md) Nesting, clipping and flexbox-style layout.
- [Components](https://vidmake.app/docs/components.md) Reusable compositions with `use`.
- [Captions](https://vidmake.app/docs/captions.md) SRT, VTT and Whisper JSON with word highlighting.
- [Waveform](https://vidmake.app/docs/waveform.md) Spectrum bars and oscilloscope lines.
- [Particles](https://vidmake.app/docs/particles.md) A deterministic particle emitter.

### Motion

- [Animation](https://vidmake.app/docs/animation.md) Keyframes, tweens and springs.
- [Easing](https://vidmake.app/docs/easing.md) Every easing curve, springs and motion tokens.
- [Expressions](https://vidmake.app/docs/expressions.md) Per-frame math with `=...` and live text with `${...}`.
- [Audio-reactive](https://vidmake.app/docs/audio-reactive.md) `amp`, `bass`, `beat` and `beats`, checked with `vidmake analyze`.
- [Presets](https://vidmake.app/docs/presets.md) `enter` from a state, `exit` to one, on springs.
- [Repeat](https://vidmake.app/docs/repeat.md) Stamp out copies in rows, grids and circles.
- [Attach](https://vidmake.app/docs/attach.md) Ride a path's tip or a text's last character.

### Style

- [Theme](https://vidmake.app/docs/theme.md) Design tokens for the whole project: `$color.accent`, type styles, motion, modes.
- [Colors and gradients](https://vidmake.app/docs/colors.md) Color formats, linear and radial gradients.
- [Effects](https://vidmake.app/docs/effects.md) Shadow, blur, glow, grain, 3D tilt and blend modes.
- [Masks](https://vidmake.app/docs/masks.md) Track mattes: video through text and more.

### Tooling

- [Rendering](https://vidmake.app/docs/rendering.md) Formats, codecs, frame ranges, drafts and progress events.
- [Inspecting](https://vidmake.app/docs/inspecting.md) `timeline`, `inspect`, `trace`, `storyboard` and `still`.
- [Editing](https://vidmake.app/docs/editing.md) `get`, `set`, `unset`, `add` and `rm`.
- [Lint](https://vidmake.app/docs/lint.md) Layout warnings and how to silence intended ones.
- [CLI reference](https://vidmake.app/docs/cli.md) Every command and flag.
- [JSON Schema](https://vidmake.app/docs/schema.md) Editor completion and validation.

### Guides

- [Recipes](https://vidmake.app/docs/recipes.md) Copy-paste solutions for common shots.
- [Coming from Remotion](https://vidmake.app/docs/remotion.md) How Remotion concepts map to vidmake.
- [AI integration](https://vidmake.app/docs/ai.md) The agent skill, `llms.txt` and prompts.
- [Troubleshooting](https://vidmake.app/docs/troubleshooting.md) Common errors and how to fix them.
- [Format reference](https://vidmake.app/docs/reference.md) The complete reference, as printed by `vidmake docs`.

Want to see more first? The [demo gallery](https://vidmake.app/demos/) has every demo from these docs, each with its JSON.
