execute_aseprite_script
Run a complete Aseprite Lua script headlessly to draw, animate, or export a sprite in one batch call, verifying the resulting output file.
Instructions
Run a complete Aseprite Lua script headlessly (aseprite --batch --script). Write the whole drawing/animation/export as one script instead of many small calls. Call get_aseprite_lua_docs first if unsure about the API.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lua_code | Yes | Full Lua script to execute | |
| output_filename | No | Expected output file (e.g. sprite.png). Absolute paths are used as-is; relative paths resolve against DEFAULT_OUTPUT_DIR (or the server's working directory). Missing directories are created. The script itself must save it (e.g. spr:saveCopyAs(...)); this is used to verify the result. |