ShaderToy CLI agent workflow
To start from an existing public ShaderToy:
shadertoy import https://www.shadertoy.com/view/XXXXXX -o project
This creates the same editable directory format used by shadertoy new and keeps
supported remote assets local.
1. Start by inspecting the project:
shadertoy inspect --json
2. Edit ShaderToy.toml and files under shaders/ or assets/.
The manifest is schema-backed. To print the exact schema:
shadertoy docs manifest --schema
3. Validate after edits:
shadertoy check --json
4. Render deterministic evidence:
shadertoy render -o target/check.png
For temporal comparison/contact sheets, reuse one runtime:
shadertoy render-frames --frames 0,60,120,180 --contact-sheet target/contact.png
5. Debug multipass projects from the outside in:
shadertoy inspect graph --json
shadertoy inspect pass buffer-a --json
shadertoy render --pass buffer-a -o target/buffer-a.png
6. Freeze a feedback state when a bug appears:
shadertoy state capture --frame 300 -o target/frame300.ststate
shadertoy state inspect target/frame300.ststate --json
7. Replace a buffer with a known image to isolate a pass:
shadertoy render --state target/frame300.ststate \
--set-buffer buffer-a=fixtures/a.png \
-o target/debug.png
8. Use live native-rendered review when iterating:
shadertoy preview
On Linux, check/render/render-frames/state capture/preview use surfaceless EGL and do not require DISPLAY or WAYLAND_DISPLAY.
Do not edit target/. It is disposable generated output.