You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fb48936
Browse filesBrowse the repository at this point in the historyBrowse files
@@ -87,19 +87,117 @@ Once installed, Claude Code automatically loads the skills when you work in that
87
87
88
88
## CLI Reference
89
89
90
+
### `rustmotion validate`
91
+
92
+
Schema + geometry checks, with no render. This is the gate every generated scenario is expected to pass before use.
93
+
94
+
| Flag | Description | Default |
95
+
|---|---|---|
96
+
|`-f, --file <FILE>`| Path to the JSON scenario file | (required) |
97
+
|`--report <FILE>`| Write a machine-readable JSON report of all violations ||
98
+
|`--fix`| Auto-fix safe violations in place (`auto_scroll: true`, drop `white-space` back to wrap, `text-autofit: true`) — refuses templated scenarios (`include`/`for-each`/`use`) |`false`|
99
+
|`--strict-anim`| Sample animated frames and reapply renderer transforms to detect per-frame viewport overflow (slower) |`false`|
100
+
|`--lenient`| Treat geometry violations as warnings instead of errors |`false`|
101
+
|`--props <FILE>`| Load variable overrides from a JSON object file ||
102
+
|`--var <KEY=VALUE>`| Set a single variable override (repeatable); `--var` wins over `--props`||
103
+
90
104
### `rustmotion render`
91
105
92
106
| Flag | Description | Default |
93
107
|---|---|---|
94
-
|`input`| Path to the JSON scenario file | (required) |
108
+
|`-f, --file <FILE>`| Path to the JSON scenario file (or `--json <STRING>` for inline input)| (required) |
95
109
|`-o, --output`| Output file path |`output.mp4`|
96
110
|`--frame <N>`| Render a single frame to PNG (0-indexed) ||
111
+
|`--frames <START-END>`| Render only frames `START..=END` as a standalone segment with its own windowed audio slice, for joining later with `rustmotion concat`. Mutually exclusive with `--frame`/`--watch`; only mp4/webm/mov are implemented for a range ||
97
112
|`--codec <CODEC>`| Video codec: `h264`, `h265`, `vp9`, `prores`|`h264`|
|`--hardware-acceleration`| Probe `ffmpeg -encoders` and use this machine's hardware encoder (VideoToolbox/NVENC/QSV/AMF) when available; explicit message and software fallback otherwise |`false`|
117
+
|`-w, --watch`| Watch the input file and re-render on change (not compatible with `--props`/`--var`) |`false`|
118
+
|`--no-validate`| Skip the implicit validate pass (schema + geometry + variables) before rendering |`false`|
119
+
|`--lenient`| Treat geometry violations as warnings during the implicit validate pass |`false`|
120
+
|`--strict-anim`| Sample animated frames for per-frame viewport overflow during the implicit validate pass |`false`|
121
+
|`--props <FILE>`| Load variable overrides from a JSON object file ||
122
+
|`--var <KEY=VALUE>`| Set a single variable override (repeatable); `--var` wins over `--props`||
101
123
|`--output-format json`| Machine-readable JSON output for CI pipelines ||
102
124
|`-q, --quiet`| Suppress all output except errors ||
125
+
|`--threads <N>`| Number of parallel rendering threads (global flag) | all cores |
126
+
127
+
### `rustmotion concat`
128
+
129
+
Joins segment files — e.g. several `render --frames a-b` outputs from the same scenario — via ffmpeg's concat demuxer (`-c copy`, no re-encoding). Requires ffmpeg on PATH.
130
+
131
+
```bash
132
+
rustmotion concat seg1.mp4 seg2.mp4 -o out.mp4
133
+
```
134
+
135
+
### `rustmotion still`
136
+
137
+
Exports a single frame as a still image (PNG/JPEG/WebP).
138
+
139
+
| Flag | Description | Default |
140
+
|---|---|---|
141
+
|`-f, --file <FILE>`| Path to the JSON scenario file | (required) |
142
+
|`-o, --output`| Output file path |`still.png`|
143
+
|`--time <SECONDS>`| Time to capture |`0.0`|
144
+
|`--format <FMT>`| Image format: `png`, `jpeg`, `webp`| from extension |
145
+
|`--quality <1-100>`| JPEG quality |`90`|
146
+
|`--props` / `--var`| Variable overrides, same as `render`||
147
+
148
+
### `rustmotion captions`
149
+
150
+
Generates word-level caption timings from audio (via a local `whisper.cpp` binary) or by importing subtitles.
|`--codec` / `--crf` / `--format` / `--transparent`| Same as `render`||
176
+
|`--jobs <N>`| Videos to render in parallel (the render itself already uses all cores via rayon) |`1`|
177
+
178
+
### `rustmotion schema`
179
+
180
+
Prints the JSON Schema for scenario files (editor autocompletion, LLM prompts).
181
+
182
+
```bash
183
+
rustmotion schema -o schema.json
184
+
```
185
+
186
+
### `rustmotion info`
187
+
188
+
Shows information about a scenario (duration, scene count, dimensions, ...).
189
+
190
+
```bash
191
+
rustmotion info scenario.json
192
+
```
193
+
194
+
### `rustmotion skills`
195
+
196
+
Manages the built-in Claude Code skills — `install [--global]`, `uninstall [--global]`, `list`, `show <name>`. See [Claude Code Skills](#claude-code-skills).
197
+
198
+
### `rustmotion completions`
199
+
200
+
Generates or installs shell completions — `install`, `uninstall`, `generate <shell>`. See [Shell Completions](#shell-completions).
103
201
104
202
---
105
203
@@ -2025,42 +2123,42 @@ Transparency is supported with `--transparent` for PNG sequences, WebM (VP9), an
2025
2123
-**JSON Schema:** schemars (auto-generated from Rust types)
2026
2124
-**Parallelism:** rayon (multi-threaded frame rendering)
2027
2125
2028
-
## Architecture
2126
+
rustmotion ships 60 components, each implementing the `Painter` trait, through a CSS-inspired **box_tree → layout_pass → paint_pass** pipeline:
2029
2127
2030
-
rustmotion uses a Flutter-inspired **measure → layout → paint** pipeline built on Skia:
2128
+
1.**box_tree** — builds a tree of `BoxNode { css: CssStyle, children, intrinsic }` from the resolved JSON components
2129
+
2.**layout_pass** — runs [taffy](https://github.com/DioxusLabs/taffy) to compute each node's `BoxLayout { x, y, width, height }`; leaves that carry an `IntrinsicMeasure` (text, images, codeblocks, ...) are measured through a `measure_fn`
2130
+
3.**paint_pass** — walks the tree top-down, applies transform/opacity, paints decorations (background, border, shadow), and delegates content painting to the component's `Painter` implementation
0 commit comments