CLI
genart export
Export sketch as HTML, image, or algorithm source
Export a .genart sketch in different formats: a self-contained HTML file, a rendered image, or the raw algorithm source code.
Usage
genart export <file> [options]Arguments
| Argument | Required | Description |
|---|---|---|
<file> | Yes | Path to a .genart sketch file |
Options
| Flag | Type | Default | Description |
|---|---|---|---|
--format | html | png | jpeg | webp | algorithm | html | Export format |
--wait | string | 500ms | Time to wait before capture (image formats) |
--seed | number | Seed value | |
--params | JSON | Parameter overrides | |
--colors | JSON | Color palette override | |
--width | number | Canvas width | |
--height | number | Canvas height | |
--preset | string | Canvas size preset | |
--quality | 0-100 | 80 | Image quality (JPEG/WebP only) |
--scale | number | 1 | Device pixel ratio |
-o, --output | path | Output file path |
Examples
Export as a self-contained HTML file:
genart export my-sketch.genartExport as a PNG image:
genart export my-sketch.genart --format png --seed 42 -o render.pngExtract just the algorithm source code:
genart export my-sketch.genart --format algorithm -o sketch.jsExport HTML with specific dimensions:
genart export my-sketch.genart --width 800 --height 600 -o sketch.html