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

ArgumentRequiredDescription
<files...>YesOne or more .js or .glsl files to convert

Options

FlagTypeDefaultDescription
--rendererstringRenderer to use (auto-detected if omitted)
--presetstringsquare-600Canvas size preset
--titlestringSketch title
--seednumberInitial seed value
-y, --non-interactivebooleanSkip confirmation prompts
--batchbooleanProcess all files without individual confirmation
--dry-runbooleanShow what would be created without writing files
-o, --outputpathOutput file or directory path

Examples

Import a JavaScript file:

genart import sketch.js

Import a GLSL shader:

genart import fragment.glsl --renderer glsl

Import multiple files in batch mode:

genart import src/*.js --batch -o sketches/

Preview what would be created without writing:

genart import sketch.js --dry-run

Import with explicit settings:

genart import sketch.js \
  --renderer p5 \
  --preset landscape-1920 \
  --title "Imported Sketch" \
  --seed 42

Non-interactive import for CI pipelines:

genart import sketch.js -y -o output.genart