---
name: vidmake
description: Make videos from JSON with the vidmake CLI. Use when the user asks for a video, animation, motion graphic, title card, social clip, captions/subtitles burn-in, animated chart, music visualizer, or an MP4/WebM/MOV/GIF render, and vidmake is installed (or can be installed).
---

# vidmake

vidmake (v0.2.1) renders video from a declarative JSON project. There is no UI: you write JSON,
look at it with inspection commands, fix it, then render. Every frame is a pure function of time.

Full docs: https://vidmake.app/llms-full.txt · Format reference: run `vidmake docs` (or `vidmake docs <topic>`)
· JSON Schema: `vidmake schema`.

## Loop

1. `vidmake docs` once (or `vidmake docs animation`, `presets`, `stagger`, `theme`, `captions`, `expressions` ...) to learn the format.
2. `vidmake probe assets/*` for durations and sizes of any media you will use. Before syncing anything to music,
   `vidmake analyze music.mp3` for beat times, tempo and the `amp`/`bass` curves expressions will see.
3. Write `project.json`. Give every layer an `id`. Numbers are **frames**; strings take units (`"1.5s"`, `"500ms"`, `"45f"`).
   Animation times are **relative to the layer's own start**.
4. Repeat until clean:
   - `vidmake validate project.json` must print ✓. Read every warning; silence intended ones per layer with `"lint": { "ignore": ["offCanvas"] }`.
   - `vidmake timeline project.json` to confirm timing and overlaps.
   - `vidmake storyboard project.json -o sb.png -n 12` and **look at the image**.
   - `vidmake inspect project.json -t 2s` for exact positions and bounding boxes; `-l <id>` for one layer.
   - `vidmake trace project.json -l <id>` to check an animation curve.
   - `vidmake analyze project.json` after trims, fades or volume changes: the mixed soundtrack exactly as `amp`, `bass`, `beat` and `beats` see it.
5. `vidmake render project.json -o out/video.mp4 --json` and report the `done` event (`--draft` first for a fast preview).

Small edits: `vidmake set project.json <layerId>.<field> <json>` (compiled before saving; rejected if it breaks the project).

## Minimal project

```json
{
  "id": "main", "width": 1920, "height": 1080, "fps": 30, "duration": "5s",
  "background": { "type": "linear", "angle": 135, "stops": ["#0f172a", "#1e1b4b"] },
  "layers": [
    { "id": "title", "type": "text", "text": "Hello", "fontSize": 120, "fontWeight": 800,
      "enter": { "from": { "opacity": 0, "y": "0.3em", "blur": "0.15em" } }, "stagger": "char", "exit": "fade" },
    { "id": "ring", "type": "arc", "y": "75%", "width": 120, "stroke": "#22d3ee", "strokeWidth": 12,
      "endAngle": { "from": 0, "to": 360, "duration": "3s" }, "enter": "pop" }
  ]
}
```

## Things that trip agents up

- `x`/`y` place the layer's **anchor** (default center) in parent coordinates; default is the parent center.
- A `rect` with no size fills its parent (a background). Layers draw in order: first is bottom.
- Inside a `group`, children use the group box's coordinates (0,0 = its top-left) and its timing.
- `series: true` groups need every child to have a fixed duration; `transition` overlaps a child with the next.
- `"=expr"` strings are evaluated per frame (`t`, `f`, `p`, `w`, `h`, `i`, `n`, `beat` ...); `${...}` inside text is live.
- `amp` and `bass` are scaled so the loudest 2% of the soundtrack reads 1: a loud section can sit at 1 for seconds. Keep multipliers small and act on `analyze` ceiling warnings.
- Rich-text spans take `fill`, `fontWeight`, `italic` and `font` (not `fontSize`). A `path` with several `M` sub-paths needs `"drawMode": "total"` to draw them one after another.
- More than a few beats? Name them once in the composition's `markers` (`{"strike": "3s", "ship": "@strike+2s"}`) and use
  `"start": "@ship"`, `"@strike+0.2s"` in keyframes and `since('strike')` in expressions instead of retyping times.
- Never hand-measure text to draw a line through or under it: `"decoration": {"type": "strike", "progress": ...}`.
- `repeat` row/column/grid layouts center the block on `x`/`y`; add `"origin": "start"` to put the first copy there.
- Brand colors, type styles and a house motion go in the project's `theme`: write `"$color.accent"`, `"style": "$type.display"`,
  `"motion": "house"`. W3C token files work (`"extends": "tokens.json"`); `--theme dark` renders a mode. `{{}}` is for props only.
- Entrances say where a layer comes *from*: `"enter": { "from": { "opacity": 0, "y": "0.3em" }, "motion": "snap" }`. Keep moves
  short (em for text); springs start from rest, so nothing jumps. Stagger by a total time, not a gap: `"stagger": "char"` on text,
  `"stagger": { "from": "center" }` on a group or a repeat. Don't hand-space `start` times to stagger.
- Unknown fields are errors with "did you mean" suggestions: read them, they are usually right.
- H.264/H.265 need even width/height. Transparent backgrounds keep alpha in `.webm`, `.mov`, `.png`, `.gif`.
- vidmake runs on macOS and needs nothing else for video and sound (it uses the system's AVFoundation); VP9/WebM and MP3 output need `ffmpeg` installed. Exit status 3 means no license on
  this Mac: ask the user to open the vidmake app and buy or enter their key; don't retry until then.
