ScratchScript is a text based language that compiles to Scratch 3.0 (.sb3) files.
For example:
turns into...
The code editor (CodeMirror) is under the MIT liscense (see https://github.com/codemirror/dev/blob/main/LICENSE). The block renderer (scratchblocks) is under the MIT liscense (see https://github.com/scratchblocks/scratchblocks/blob/main/LICENSE). Scratch Script is in no way affiliated nor endorsed by scratchblocks, Scratch, the Scratch Foundation, or the Scratch Team. Scratch is developed by the Lifelong Kindergarten Group at the MIT Media Lab. See the Scratch Website.