Files
shinyobjectz bbd7369548 One loop, raea goal: every rule in TypeScript, held at edit, render, publish and done; raea make is the asset tools
The rules are raea/goal's (sdk/goal), run by `raea goal check` at four moments: the hook after a save, every
render's end, raea cloud's publish, and the Stop hook. Rust's cut and goal gates and the box's word, sound, frame and
place checks are packs (MK30-MK39); runtime/cut-plan, runtime/goal-plan, raea make status and the box's check code
are gone with no alias (MK41).

brief.ts is the one registered root (MK43): raea runs it, and every file that imports raea must be reached from it
(the registered check, an error at publish and done). Its tasks are its `plan` (MK44), read from its run and written
back where each is written by `raea goal tasks`, the one path for the app, agents and the box. Its `goal` is one
goal or a workflow of several (MK46), each with its step, after and rules, checked and reported alone. Taste lines
and signed asks run inside the loop (MK47).

`raea goal check|tasks|seen|judge|gates|next` is the loop; `raea make clothes|motion|solid|wear|splat|physics|bake|
sao|tokensynth|sounds|component|blockout|...` the asset tools (MK45). Old names are refused with where they went.
docs/make.feature is docs/goal.feature; tools/legacy-names.sh holds the old names out.

raea's Node mode on JavaScriptCore now gives a CommonJS package's names as named exports (React's jsx), loads a
file a tool imports by URL, keeps process.exit's code from a promise callback, and reads stdin as fd 0, so the goal
runner runs on the shipped binary.
2026-11-29 16:02:31 -08:00

2.5 KiB

title, summary, order, sources
title summary order sources
raea godot Run a TypeScript script against Godot's whole API in a headless Godot with GodotJS, record what it draws as frames, or open the editor on the project. 116
apps/engines/src/godot.rs
apps/engines/src/godot_run.rs

raea godot run bundles SCRIPT.ts and runs it in the Godot that raea setup godot downloaded: Godot 4.6.1 with GodotJS, its TypeScript bindings. The script imports Godot's whole API, typed, from raea/godot. Its default export is either a function given the SceneTree and ARGS, or a SceneTree subclass that is Godot's main loop. Godot quits with 0 when the function returns, and with 1 when it or a callback throws.

Godot runs headless unless --window is given. --movie FILE opens Godot's window too, since a headless Godot draws nothing, and records every frame it draws at a fixed --fps: NAME.png writes numbered PNGs, NAME.avi one video. raea godot types writes the project's own typings, and raea godot open opens GodotJS's editor on the project for the person. The guide is raea guide bevy/godot.

Usage

raea setup godot [--check]   (download Godot 4.6.1 with GodotJS, its TypeScript bindings (MIT), into ~/.raea/tools/godot: JavaScriptCore on the Mac, QuickJS on Windows and Linux; raea's own build (the Mac's notarized), else GodotJS's, each checked against its pinned sha256)
raea godot run [SCRIPT.ts] [--project DIR] [--window] [--movie FILE [--fps N] [--frames N]] [--scene res://X.tscn] [--size WxH] [--timeout S] [ARGS...]   (a TypeScript script against Godot's whole API through raea/godot: its default export gets the SceneTree and ARGS, headless unless --window; --movie writes every frame Godot draws (NAME.png numbered, or .avi) at a fixed --fps, 30 unless given; the project is DIR, else the nearest project.godot above the script, else an empty one; Godot quits when it returns, or after --frames N; --scene plays a scene of the project under it, with no script needed; a scene in --window plays until the window is closed)
raea godot types [DIR]   (the project's own TypeScript types from GodotJS: Godot's API with its scenes, resources and input actions, into DIR/typings)
raea godot open [DIR]   (the Godot editor on the project, GodotJS's, to edit its scenes)

Headless: it needs nothing running and opens no window. Its arguments go to a parser of its own, whose forms are listed above.