CLI
genart import
Convert .js/.glsl to .genart
Convert existing JavaScript or GLSL source files into the .genart format. Detects renderer type, extracts parameters where possible, and wraps the code into a valid sketch file.
Usage
genart import <files...> [options]Arguments
| Argument | Required | Description |
|---|---|---|
<files...> | Yes | One or more .js or .glsl files to convert |
Options
| Flag | Type | Default | Description |
|---|---|---|---|
--renderer | string | Renderer to use (auto-detected if omitted) | |
--preset | string | square-600 | Canvas size preset |
--title | string | Sketch title | |
--seed | number | Initial seed value | |
-y, --non-interactive | boolean | Skip confirmation prompts | |
--batch | boolean | Process all files without individual confirmation | |
--dry-run | boolean | Show what would be created without writing files | |
-o, --output | path | Output file or directory path |
Examples
Import a JavaScript file:
genart import sketch.jsImport a GLSL shader:
genart import fragment.glsl --renderer glslImport multiple files in batch mode:
genart import src/*.js --batch -o sketches/Preview what would be created without writing:
genart import sketch.js --dry-runImport with explicit settings:
genart import sketch.js \
--renderer p5 \
--preset landscape-1920 \
--title "Imported Sketch" \
--seed 42Non-interactive import for CI pipelines:
genart import sketch.js -y -o output.genart