# CLI reference

> Every `vidmake` command with its real `--help` text, plus exit codes, environment variables, licensing and the daily update check.

`vidmake` is one binary with subcommands. Each section below has a short description, links to the page that
covers it in depth, and the command's real `--help` output.

```console
$ vidmake --help
Programmatic video for AI agents: JSON compositions in, video out. No UI.

Start with `vidmake docs` for the full format reference, `vidmake init` for a starter project.

Usage: vidmake <COMMAND>

Commands:
  docs        Print the full format reference (for AI agents)
  init        Create a starter project
  list        List compositions in a project
  validate    Validate a project: schema, assets, fonts, timing and layout lint
  timeline    Show the timeline: when every layer starts/ends, transitions, audio
  inspect     Show resolved properties and bounding boxes of every visible layer at a frame
  trace       Sample a layer's animated properties over time
  still       Render a single frame to PNG
  storyboard  Render a grid of frames to one PNG for a quick visual overview
  render      Render the composition to a video, GIF, audio file or PNG sequence
  hardware    Show the detected GPU/hardware video encoders and decoders (what `render --encoder auto` will use)
  probe       Print media metadata (duration, size, fps, audio) as JSON
  analyze     Show what the audio-reactive variables (amp, bass, beat, beats) will see: beat times, tempo and loudness curves
  theme       List the theme's tokens with their resolved values and how often each is used
  migrate     Rewrite a 0.5 project to the current format (`tokens` → `theme`, `easings` → `theme.motion`, `{{token}}` → `$token`)
  fonts       List installed font families
  get         Read a value: `get project.json title.fontSize` (layer id / comp id / JSON pointer)
  set         Set a value (JSON or plain string): `set project.json title.text '"Hi"'`
  unset       Remove a field or a layer: `unset project.json title.enter`
  add         Add layer(s) from JSON (object or array) to a composition or group
  rm          Remove a layer by id
  schema      Print the JSON Schema of project files (for editors and agents)
  update      Update vidmake to the newest release your license covers (set VIDMAKE_NO_UPDATE_CHECK=1 to disable the daily check)
  license     Activate, show, move or upgrade your vidmake license
  help        Print this message or the help of the given subcommand(s)

Options:
  -h, --help
          Print help (see a summary with '-h')

  -V, --version
          Print version
```

| command | purpose | details |
|---|---|---|
| [`docs [topic]`](https://vidmake.app/docs/cli.md#docs) | print the format reference, or one section | [reference](https://vidmake.app/docs/reference.md) |
| [`init [dir]`](https://vidmake.app/docs/cli.md#init) | create a starter project | [quickstart](https://vidmake.app/docs/quickstart.md) |
| [`list <project>`](https://vidmake.app/docs/cli.md#list) | compositions, sizes, durations, props | [inspecting](https://vidmake.app/docs/inspecting.md#list) |
| [`validate <project>`](https://vidmake.app/docs/cli.md#validate) | full compile and lint | [lint](https://vidmake.app/docs/lint.md) |
| [`timeline <project>`](https://vidmake.app/docs/cli.md#timeline) | layer timing table, Gantt chart, audio clips | [inspecting](https://vidmake.app/docs/inspecting.md#timeline) |
| [`inspect <project>`](https://vidmake.app/docs/cli.md#inspect) | resolved properties and bounding boxes at one frame | [inspecting](https://vidmake.app/docs/inspecting.md#inspect) |
| [`trace <project> -l id`](https://vidmake.app/docs/cli.md#trace) | one layer's values over time | [inspecting](https://vidmake.app/docs/inspecting.md#trace) |
| [`still <project>`](https://vidmake.app/docs/cli.md#still) | one frame as PNG | [inspecting](https://vidmake.app/docs/inspecting.md#still) |
| [`storyboard <project>`](https://vidmake.app/docs/cli.md#storyboard) | a grid of frames as one PNG | [inspecting](https://vidmake.app/docs/inspecting.md#storyboard) |
| [`render <project>`](https://vidmake.app/docs/cli.md#render) | the final video, GIF, PNG sequence or audio | [rendering](https://vidmake.app/docs/rendering.md) |
| [`probe <files...>`](https://vidmake.app/docs/cli.md#probe) | media metadata as JSON | [inspecting](https://vidmake.app/docs/inspecting.md#probe) |
| [`analyze <audio \| project>`](https://vidmake.app/docs/cli.md#analyze) | beats, tempo and `amp`/`bass` curves as expressions see them | [audio-reactive](https://vidmake.app/docs/audio-reactive.md#check-the-soundtrack-with-analyze) |
| [`fonts [filter]`](https://vidmake.app/docs/cli.md#fonts) | installed font families | [inspecting](https://vidmake.app/docs/inspecting.md#fonts) |
| [`theme <project>`](https://vidmake.app/docs/cli.md#theme) | every theme token, its resolved value, and whether it is used | [theme](https://vidmake.app/docs/theme.md#vidmake-theme) |
| [`migrate <project>`](https://vidmake.app/docs/cli.md#migrate) | rewrite a 0.5 project (`tokens`, `easings`, `{{token}}`) to the theme | [theme](https://vidmake.app/docs/theme.md#from-0-5) |
| [`get <project> <path>`](https://vidmake.app/docs/cli.md#get) | read a value | [editing](https://vidmake.app/docs/editing.md#get) |
| [`set <project> <path> <value>`](https://vidmake.app/docs/cli.md#set) | write a value | [editing](https://vidmake.app/docs/editing.md#set) |
| [`unset <project> <path>`](https://vidmake.app/docs/cli.md#unset) | delete a field or layer | [editing](https://vidmake.app/docs/editing.md#unset) |
| [`add <project> <layer>`](https://vidmake.app/docs/cli.md#add) | insert layers | [editing](https://vidmake.app/docs/editing.md#add) |
| [`rm <project> <id>`](https://vidmake.app/docs/cli.md#rm) | delete a layer | [editing](https://vidmake.app/docs/editing.md#rm) |
| [`schema`](https://vidmake.app/docs/cli.md#schema) | JSON Schema for project files | [schema](https://vidmake.app/docs/schema.md) |
| [`update`](https://vidmake.app/docs/cli.md#update) | install the newest release your license covers | [installation](https://vidmake.app/docs/installation.md#updating) |
| [`license <command>`](https://vidmake.app/docs/cli.md#license) | activate, show, move, upgrade or recover your license | [licensing](https://vidmake.app/docs/licensing.md) |

`vidmake help <command>` is the same as `vidmake <command> --help`, and `vidmake --version` (`-V`) prints the version:

```console
$ vidmake --version
vidmake 0.9.2
```

## Common options

The commands that compile a composition (`validate`, `timeline`, `inspect`, `trace`, `still`, `storyboard`,
`render`) share these:

| option | meaning |
|---|---|
| `<PROJECT>` | the project file. Asset and font paths inside it are relative to this file, not to your shell's directory |
| `-c, --comp <id>` | the composition to use; default the first one in the file |
| `-p, --props <props>` | input props, a JSON object (`'{"title":"Hi"}'`) or `key=value`. Repeatable; values are parsed as JSON when possible, so `-p count=3` is a number |
| `--props-file <file>` | input props from a JSON object file, applied before `-p` |
| `--theme <mode>` | lay one of the theme's `modes` over it, e.g. `--theme dark` (see [modes](https://vidmake.app/docs/theme.md#modes)) |
| `--theme-file <file>` | lay a whole theme file over the project's theme (a second brand, a client) |

`analyze` also compiles a project when you give it one, but takes only `-c`: it analyzes the soundtrack with the
composition's default props. [`theme`](#theme) takes `--theme` and `--theme-file` too.

Times passed to options (`-t`, `--every`, `--from`, `--to`, `--frames`, `--at`) accept frames (`45`) or any
[time string](https://vidmake.app/docs/time.md): `"1.5s"`, `"500ms"`, `"45f"`, `"0:02"`.

## Getting started

### docs

Prints the reference that this site's [reference page](https://vidmake.app/docs/reference.md) is built from. With a topic, it prints only
the sections whose heading contains that text (case-insensitive); an unknown topic lists the section names.

```console
$ vidmake docs --help
Print the full format reference (for AI agents)

Usage: vidmake docs [TOPIC]

Arguments:
  [TOPIC]  Print only the section whose heading contains this text

Options:
  -h, --help  Print help
```

### init

Creates `<dir>/project.json` (or `--name`) from the built-in starter project, plus an empty `<dir>/assets` folder.
It refuses to overwrite an existing file.

```console
$ vidmake init --help
Create a starter project

Usage: vidmake init [OPTIONS] [DIR]

Arguments:
  [DIR]  [default: .]

Options:
      --name <NAME>  [default: project.json]
  -h, --help         Print help
```

```bash
vidmake init my-video
```

```output
created my-video/project.json
next:
  vidmake validate my-video/project.json
  vidmake storyboard my-video/project.json -o storyboard.png
  vidmake render my-video/project.json -o out/video.mp4
```

## Checking

### list

```console
$ vidmake list --help
List compositions in a project

Usage: vidmake list [OPTIONS] <PROJECT>

Arguments:
  <PROJECT>  

Options:
      --json  
  -h, --help  Print help
```

### validate

Compiles the composition (or all of them with `--all`) and lints the layout. Prints `✓` with warnings, or `✗`
with the error. Exits with status 2 when any composition fails.

```console
$ vidmake validate --help
Validate a project: schema, assets, fonts, timing and layout lint

Usage: vidmake validate [OPTIONS] <PROJECT>

Arguments:
  <PROJECT>  Project file (JSON)

Options:
  -c, --comp <COMP>              Composition id (default: first)
  -p, --props <PROPS>            Input props: JSON object or key=value (repeatable)
      --props-file <PROPS_FILE>  Input props from a JSON file
      --theme <THEME>            Theme mode to apply (one of the theme's `modes`, e.g. dark)
      --theme-file <THEME_FILE>  Extra theme file laid over the project's theme (a brand, a client)
      --all                      Validate every composition
      --json                     
  -h, --help                     Print help
```

### timeline

```console
$ vidmake timeline --help
Show the timeline: when every layer starts/ends, transitions, audio

Usage: vidmake timeline [OPTIONS] <PROJECT>

Arguments:
  <PROJECT>  Project file (JSON)

Options:
  -c, --comp <COMP>              Composition id (default: first)
  -p, --props <PROPS>            Input props: JSON object or key=value (repeatable)
      --props-file <PROPS_FILE>  Input props from a JSON file
      --theme <THEME>            Theme mode to apply (one of the theme's `modes`, e.g. dark)
      --theme-file <THEME_FILE>  Extra theme file laid over the project's theme (a brand, a client)
      --json                     
  -h, --help                     Print help
```

### inspect

Without `-f` or `-t`, inspects frame 0.

```console
$ vidmake inspect --help
Show resolved properties and bounding boxes of every visible layer at a frame

Usage: vidmake inspect [OPTIONS] <PROJECT>

Arguments:
  <PROJECT>  Project file (JSON)

Options:
  -c, --comp <COMP>              Composition id (default: first)
  -p, --props <PROPS>            Input props: JSON object or key=value (repeatable)
      --props-file <PROPS_FILE>  Input props from a JSON file
      --theme <THEME>            Theme mode to apply (one of the theme's `modes`, e.g. dark)
      --theme-file <THEME_FILE>  Extra theme file laid over the project's theme (a brand, a client)
  -f, --frame <FRAME>            Frame number
  -t, --time <TIME>              Time ("1.5s", "500ms", "0:02", "@marker", "@marker+0.5s")
  -l, --layer <LAYER>            Only this layer id
      --json                     
  -h, --help                     Print help
```

### trace

```console
$ vidmake trace --help
Sample a layer's animated properties over time

Usage: vidmake trace [OPTIONS] --layer <LAYER> <PROJECT>

Arguments:
  <PROJECT>  Project file (JSON)

Options:
  -c, --comp <COMP>              Composition id (default: first)
  -p, --props <PROPS>            Input props: JSON object or key=value (repeatable)
      --props-file <PROPS_FILE>  Input props from a JSON file
      --theme <THEME>            Theme mode to apply (one of the theme's `modes`, e.g. dark)
      --theme-file <THEME_FILE>  Extra theme file laid over the project's theme (a brand, a client)
  -l, --layer <LAYER>            Layer id
      --every <EVERY>            Sample interval in frames or time ("5", "0.25s") [default: 5]
      --from <FROM>              Range start (frames or time)
      --to <TO>                  Range end (frames or time)
      --json                     
  -h, --help                     Print help
```

### still

Prints `{"output", "frame", "time", "width", "height"}` as one JSON line after writing the PNG.

```console
$ vidmake still --help
Render a single frame to PNG

Usage: vidmake still [OPTIONS] <PROJECT>

Arguments:
  <PROJECT>  Project file (JSON)

Options:
  -c, --comp <COMP>              Composition id (default: first)
  -p, --props <PROPS>            Input props: JSON object or key=value (repeatable)
      --props-file <PROPS_FILE>  Input props from a JSON file
      --theme <THEME>            Theme mode to apply (one of the theme's `modes`, e.g. dark)
      --theme-file <THEME_FILE>  Extra theme file laid over the project's theme (a brand, a client)
  -f, --frame <FRAME>            Frame number
  -t, --time <TIME>              Time ("1.5s", "500ms", "0:02", "@marker", "@marker+0.5s")
  -o, --out <OUT>                [default: still.png]
      --scale <SCALE>            Resolution scale (e.g. 0.5) [default: 1]
  -h, --help                     Print help
```

### storyboard

Prints `{"output", "frames", "width", "height"}` as one JSON line after writing the PNG.

```console
$ vidmake storyboard --help
Render a grid of frames to one PNG for a quick visual overview

Usage: vidmake storyboard [OPTIONS] <PROJECT>

Arguments:
  <PROJECT>  Project file (JSON)

Options:
  -c, --comp <COMP>              Composition id (default: first)
  -p, --props <PROPS>            Input props: JSON object or key=value (repeatable)
      --props-file <PROPS_FILE>  Input props from a JSON file
      --theme <THEME>            Theme mode to apply (one of the theme's `modes`, e.g. dark)
      --theme-file <THEME_FILE>  Extra theme file laid over the project's theme (a brand, a client)
  -o, --out <OUT>                [default: storyboard.png]
  -n, --count <COUNT>            Number of evenly spaced frames [default: 12]
      --at <AT>                  Explicit frames/times/markers, comma separated, e.g. "0,1.5s,@build" (overrides --count)
      --cols <COLS>              [default: 4]
      --scale <SCALE>            Scale of each thumbnail [default: 0.25]
  -h, --help                     Print help
```

### probe

Prints a JSON array with one object per file (`path`, `kind`, `duration`, `width`, `height`, `fps`, `hasVideo`,
`hasAudio`, `videoCodec`, `audioCodec`, `sampleRate`). Fails on the first missing or unreadable file.

```console
$ vidmake probe --help
Print media metadata (duration, size, fps, audio) as JSON

Usage: vidmake probe [FILES]...

Arguments:
  [FILES]...  

Options:
  -h, --help  Print help
```

### analyze

Reports the beat times, tempo, and the mean, percentiles and ceiling share of `amp` and `bass`, with a curve sampled
every `--every`, for an audio or video file or for a project's mixed soundtrack. Prints text, or the same report as
JSON with `--json`. See [audio-reactive](https://vidmake.app/docs/audio-reactive.md#check-the-soundtrack-with-analyze).

```console
$ vidmake analyze --help
Show what the audio-reactive variables (amp, bass, beat, beats) will see: beat times, tempo and loudness curves

Usage: vidmake analyze [OPTIONS] <FILE>

Arguments:
  <FILE>  An audio/video file, or a project file to analyze its mixed soundtrack

Options:
      --fps <FPS>                    Frame rate for an audio file (a project uses its composition's) [default: 30]
      --every <EVERY>                Curve sample interval in frames or time ("0.5s") [default: 0.5s]
  -c, --comp <COMP>                  Composition id (project files)
      --onset-window <ONSET_WINDOW>  RMS window for onsets (accents), e.g. "10ms" [default: 10ms]
      --min-rise <MIN_RISE>          Smallest rise in dB that counts as an onset [default: 6]
      --json                         
  -h, --help                         Print help
```

```console
$ vidmake analyze assets/music.mp3 --every 2s
12.00s at 30.0 fps (360 frames)
beats: 18, tempo ≈120 BPM
  0.00 1.00 1.50 2.00 3.00 3.50 4.00 5.00 5.50 6.00 7.00 7.50 8.00 9.00 9.50 10.00 11.00 11.50s
onsets: 25 (TIME  RISE  PEAK  BAND)
    0.499s  +12.3 dB   -8.9 dBFS  mid
    1.008s  +12.5 dB   -8.8 dBFS  mid
    1.507s  +12.4 dB   -8.7 dBFS  mid
    2.005s  +12.8 dB   -8.4 dBFS  mid
    2.504s  +12.4 dB   -8.8 dBFS  mid
    3.003s  +12.5 dB   -8.7 dBFS  mid
    3.502s  +12.4 dB   -8.6 dBFS  mid
    4.001s  +12.7 dB   -8.3 dBFS  mid
    4.500s  +12.6 dB   -8.6 dBFS  mid
    4.590s  +10.6 dB  -10.6 dBFS  mid
    5.009s  +12.5 dB   -8.8 dBFS  mid
    5.507s  +12.5 dB   -8.7 dBFS  mid
    6.016s  +12.4 dB   -8.8 dBFS  mid
    6.505s  +12.5 dB   -8.6 dBFS  mid
    7.004s  +12.5 dB   -8.7 dBFS  mid
    7.503s  +12.4 dB   -8.6 dBFS  mid
    8.012s  +12.4 dB   -8.6 dBFS  mid
    8.501s  +12.4 dB   -8.6 dBFS  mid
    9.010s  +12.3 dB   -8.8 dBFS  mid
    9.508s  +12.6 dB   -8.7 dBFS  mid
   10.007s  +12.7 dB   -8.5 dBFS  mid
   10.087s  +10.7 dB  -10.5 dBFS  mid
   10.506s  +12.8 dB   -8.6 dBFS  mid
   11.005s  +12.4 dB   -8.6 dBFS  mid
   11.504s  +12.5 dB   -8.7 dBFS  mid

        MEAN    P10 MEDIAN    P90 AT CEILING
amp     0.54   0.27   0.49   0.90         7%
bass    0.31   0.10   0.24   0.61         3%

   TIME  AMP mean/peak                   BASS mean/peak                  BEATS   (bar = mean, ▏ = peak)
  0.00s  0.54/1.00 ███████████        ▏ 0.31/1.00 ██████             ▏   3
  2.00s  0.54/1.00 ███████████        ▏ 0.31/1.00 ██████             ▏   3
  4.00s  0.54/1.00 ███████████        ▏ 0.31/1.00 ██████             ▏   3
  6.00s  0.54/1.00 ███████████        ▏ 0.31/1.00 ██████             ▏   3
  8.00s  0.54/1.00 ███████████        ▏ 0.31/1.00 ██████             ▏   3
 10.00s  0.54/1.00 ███████████        ▏ 0.31/1.00 ██████             ▏   3
```

### fonts

```console
$ vidmake fonts --help
List installed font families

Usage: vidmake fonts [OPTIONS] [FILTER]

Arguments:
  [FILTER]  Case-insensitive substring filter (also lists each family's weights and italics)

Options:
      --project <PROJECT>  Also load the project's fonts
      --faces              List weights, variable ranges and italics for every family
  -h, --help               Print help
```

## Rendering

### render

Always prints a final `{"event":"done", ...}` line on stdout. All flags, codecs and the JSON events are on the
[rendering page](https://vidmake.app/docs/rendering.md).

```console
$ vidmake render --help
Render the composition to a video, GIF, audio file or PNG sequence

Usage: vidmake render [OPTIONS] <PROJECT>

Arguments:
  <PROJECT>  Project file (JSON)

Options:
  -c, --comp <COMP>                Composition id (default: first)
  -p, --props <PROPS>              Input props: JSON object or key=value (repeatable)
      --props-file <PROPS_FILE>    Input props from a JSON file
      --theme <THEME>              Theme mode to apply (one of the theme's `modes`, e.g. dark)
      --theme-file <THEME_FILE>    Extra theme file laid over the project's theme (a brand, a client)
  -o, --out <OUT>                  Output file (.mp4 .webm .mov .gif .mp3 .wav .m4a) or a directory for PNG frames [default: out/video.mp4]
      --codec <CODEC>              h264 | h265 | vp9 | prores | gif | png | mp3 | wav | aac (default: from extension)
      --crf <CRF>                  Quality (codec CRF; lower = better and bigger). Default: h264 23, h265 26, vp9 30
      --frames <FRAMES>            Frame range "start-end" (end exclusive), frames, times or markers: "0-90", "1s-3s", "@intro..@outro"
      --encoder <ENCODER>          auto | hardware | software. auto uses the GPU/media engine for h264, h265 and prores when `vidmake hardware` finds one [default: auto]
      --scale <SCALE>              Resolution scale (default 1, or 0.5 with --draft)
      --concurrency <CONCURRENCY>  Worker threads (default: all cores)
      --muted                      Drop audio
      --json                       Emit progress as JSON lines on stdout
      --ffmpeg-arg <FFMPEG_ARGS>   Extra ffmpeg output args (e.g. --ffmpeg-arg=-b:v --ffmpeg-arg=4M)
      --draft                      Quick preview: no motion blur, half scale (unless --scale is given), fastest encoder preset
  -h, --help                       Print help
```

## Editing

The edit commands rewrite the project file in place (pretty-printed). `set` and `add` compile every composition
first and refuse to save an invalid result unless `--force` is given; `unset` and `rm` always save and print any
resulting problem as a warning. See [editing](https://vidmake.app/docs/editing.md).

### get

```console
$ vidmake get --help
Read a value: `get project.json title.fontSize` (layer id / comp id / JSON pointer)

Usage: vidmake get <PROJECT> <PATH>

Arguments:
  <PROJECT>  
  <PATH>     

Options:
  -h, --help  Print help
```

### set

```console
$ vidmake set --help
Set a value (JSON or plain string): `set project.json title.text '"Hi"'`

Usage: vidmake set [OPTIONS] <PROJECT> <PATH> <VALUE>

Arguments:
  <PROJECT>  
  <PATH>     
  <VALUE>    Negative numbers work as-is: `set p.json logo.x -8`

Options:
      --force  Save even if the result fails validation
  -h, --help   Print help
```

### unset

```console
$ vidmake unset --help
Remove a field or a layer: `unset project.json title.enter`

Usage: vidmake unset <PROJECT> <PATH>

Arguments:
  <PROJECT>  
  <PATH>     

Options:
  -h, --help  Print help
```

### add

```console
$ vidmake add --help
Add layer(s) from JSON (object or array) to a composition or group

Usage: vidmake add [OPTIONS] <PROJECT> <LAYER>

Arguments:
  <PROJECT>  
  <LAYER>    Layer JSON, or @file.json, or - for stdin

Options:
  -c, --comp <COMP>      
      --parent <PARENT>  Insert into this group's children
      --index <INDEX>    Insert position (default: end = top-most)
      --force            
  -h, --help             Print help
```

### rm

```console
$ vidmake rm --help
Remove a layer by id

Usage: vidmake rm <PROJECT> <ID>

Arguments:
  <PROJECT>  
  <ID>       

Options:
  -h, --help  Print help
```

## Tooling

### theme

Lists every token in the project's [theme](https://vidmake.app/docs/theme.md) with its resolved value (aliases followed, the mode applied)
and marks tokens nothing uses as `(unused)`.

```console
$ vidmake theme --help
List the theme's tokens with their resolved values and how often each is used

Usage: vidmake theme [OPTIONS] <PROJECT>

Arguments:
  <PROJECT>  

Options:
      --theme <THEME>            Theme mode to apply
      --theme-file <THEME_FILE>  Extra theme file laid over the project's theme
      --json                     
  -h, --help                     Print help
```

```console
$ vidmake theme theme-basics.json --theme dark
$color.ground  #131210
$color.card    #1d1b18
$color.text    #efebe2
$color.mute    #8a857a
$color.pencil  #f05a4e
$color.accent  #f05a4e
$color.line    #efebe2e6
$type.display  {"font":"Schibsted Grotesk","size":92,"weight":860,"tracking":-0.045}
$type.label    {"font":"JetBrains Mono","size":16,"weight":500,"tracking":0.16,"uppercase":true}
$motion.house  {"spring":0.2,"duration":"0.6s"}
$styles.card   {"fill":"#1d1b18","stroke":"#efebe2e6","strokeWidth":2,"cornerRadius":4}
modes: dark (apply with --theme <mode>); showing dark
```

### migrate

Rewrites a vidmake 0.5 project in place: the top-level `tokens` becomes `theme`, `easings` moves to
`theme.motion`, and `{{token}}` references become `$token` (props keep their `{{name}}`). The result is compiled
before it is saved and the file is pretty-printed. `--check` only reports and exits 1 when something would change,
for CI. See [From 0.5](https://vidmake.app/docs/theme.md#from-0-5).

```console
$ vidmake migrate --help
Rewrite a 0.5 project to the current format (`tokens` → `theme`, `easings` → `theme.motion`, `{{token}}` → `$token`)

Usage: vidmake migrate [OPTIONS] <PROJECT>

Arguments:
  <PROJECT>  

Options:
      --check  Only report what would change; exit 1 if anything would
  -h, --help   Print help
```

### schema

Prints the JSON Schema (draft 2020-12) for project files to stdout. The same file is served at
[/schema.json](https://vidmake.app/schema.json). See [schema](https://vidmake.app/docs/schema.md).

```console
$ vidmake schema --help
Print the JSON Schema of project files (for editors and agents)

Usage: vidmake schema

Options:
  -h, --help  Print help
```

### update

Asks the license server for the newest release your license covers and, if it is newer than this one, downloads
it with your license key, checks it against the release's `SHA256SUMS` and replaces the running binary. `--check`
only reports. See [updating](https://vidmake.app/docs/installation.md#updating).

```console
$ vidmake update --help
Update vidmake to the newest release your license covers (set VIDMAKE_NO_UPDATE_CHECK=1 to disable the daily check)

Usage: vidmake update [OPTIONS]

Options:
      --check  Only report whether an update is available
  -h, --help   Print help
```

```bash
vidmake update --check
```

```output
vidmake 1.2.1 is available (you have 1.2.0); run `vidmake update` to install it
```

When nothing newer exists it prints `vidmake 1.2.1 is up to date`. When a newer major version than your license
covers is out, it adds a line with the upgrade offer.

### license

Activates this Mac, shows the license on it, gives its seat back, starts an upgrade checkout for the newest
major version, or emails lost keys. See [licensing](https://vidmake.app/docs/licensing.md).

```console
$ vidmake license --help
Activate, show, move or upgrade your vidmake license

Usage: vidmake license <COMMAND>

Commands:
  activate    Activate this machine with a license key (default: $VIDMAKE_LICENSE_KEY)
  status      Show the license activated on this machine
  deactivate  Free this machine's seat, to move the license to another machine
  upgrade     Upgrade the license to the newest major version, at the upgrade discount
  recover     Email the license keys bought with this address to it
  help        Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help
```

```bash
vidmake license activate VMK-XXXXX-XXXXX-XXXXX-XXXXX
vidmake license status --json
vidmake license deactivate   # before moving the license to another Mac
vidmake license upgrade      # the next major version, at the upgrade discount
vidmake license recover you@example.com
```

## Exit codes

| status | when |
|---|---|
| `0` | success. Lint warnings and edit warnings don't change it |
| `1` | an error: unreadable or invalid JSON file, missing composition/layer/path, a frame outside the composition, an edit refused by the compile check, ffmpeg failures, `migrate --check` with changes to make. The message starts with `error:` on stderr |
| `2` | `validate` found a composition that doesn't compile (`✗` lines on stdout), or the command line itself is wrong (unknown flag, missing argument; the usage is printed on stderr) |
| `3` | no license on this Mac, or the license doesn't cover this version; see [licensing](https://vidmake.app/docs/licensing.md). `docs`, `schema`, `update` and `license` never stop for it |

Note the difference for compile errors: `validate` reports them on stdout and exits with 2, while `render`,
`still`, `timeline` and the other commands print `error: ...` and exit with 1.

```bash
vidmake validate project.json || echo "fix the project first (status $?)"
```

## Environment variables

| variable | effect |
|---|---|
| `VIDMAKE_MEDIA` | `native` (macOS's own frameworks) or `ffmpeg`; unset, ffmpeg when it's installed, else native |
| `VIDMAKE_FFMPEG` | path to `ffmpeg` (default: `ffmpeg` on `PATH`) |
| `VIDMAKE_FFPROBE` | path to `ffprobe` (default: `ffprobe` on `PATH`) |
| `VIDMAKE_DEBUG` | print the encoder's ffmpeg command line to stderr during `render` |
| `VIDMAKE_NO_UPDATE_CHECK` | any non-empty value other than `0` disables the daily update check |
| `CI` | same as `VIDMAKE_NO_UPDATE_CHECK` when set (non-empty, not `0`) |
| `VIDMAKE_CACHE_DIR` | where the update check keeps its state file (`update-check.json`). Default: `$XDG_CACHE_HOME/vidmake`, else `~/.cache/vidmake` |
| `VIDMAKE_LICENSE_KEY` | license key to activate with when the Mac has none (scripts, agent sandboxes) |
| `VIDMAKE_CONFIG_DIR` | where the license activation is kept (`license.json`). Default: `$XDG_CONFIG_HOME/vidmake`, else `~/.config/vidmake` |
| `VIDMAKE_LICENSE_SERVER` | the license server that activation, updates and downloads use (default `https://api.vidmake.app`) |

## The update check

Once a day, on the first command you run (any command except `update` and `license`; `--help` and `--version` skip
it too), vidmake asks the license server for the newest release your license covers, giving up after 3 seconds.
The result is cached in the state file above. When a newer version exists:

- **on an interactive terminal** (stdin and stderr are both a TTY) it asks
  `vidmake 1.3.0 is available (you have 1.2.0). Update now? [Y/n/s = skip this version]`. Yes installs it and
  reruns your command with the new binary; `s` never asks about that version again;
- **otherwise** (pipes, agents, CI) it prints one line to stderr and carries on:
  ``note: vidmake 1.3.0 is available (you have 1.2.0); run `vidmake update` to install it``.

Each new version is announced at most once a day, and a new major version your license doesn't cover at most once
a week, with the [upgrade](https://vidmake.app/docs/licensing.md#upgrading) discount. Stdout and `--json` output are never touched, so the notice
can't break a script that parses the output, but agents and CI should still set `VIDMAKE_NO_UPDATE_CHECK=1` to
avoid the network call and keep stderr clean.

> [!AGENT]
> Export `VIDMAKE_NO_UPDATE_CHECK=1` in your environment before running vidmake, and use `--json` on any command
> whose output you parse.
