genart.dev
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

ArgumentRequiredDescription
<file>YesPath to a .genart sketch file

Options

FlagTypeDefaultDescription
--formathtml | png | jpeg | webp | algorithmhtmlExport format
--waitstring500msTime to wait before capture (image formats)
--seednumberSeed value
--paramsJSONParameter overrides
--colorsJSONColor palette override
--widthnumberCanvas width
--heightnumberCanvas height
--presetstringCanvas size preset
--quality0-10080Image quality (JPEG/WebP only)
--scalenumber1Device pixel ratio
-o, --outputpathOutput file path

Examples

Export as a self-contained HTML file:

genart export my-sketch.genart

Export as a PNG image:

genart export my-sketch.genart --format png --seed 42 -o render.png

Extract just the algorithm source code:

genart export my-sketch.genart --format algorithm -o sketch.js

Export HTML with specific dimensions:

genart export my-sketch.genart --width 800 --height 600 -o sketch.html