glue-cli
Editing a FlatRedBall Glue project from the command line with GlueCli.exe. Triggers: GlueCli, .gluj, .glsj or .glej files, adding a screen, entity, object, variable, state or file to a Glue project, e
SKILL.mdfrb-skills/glue-cli/SKILL.md
GitHubGlueCli
GlueCli.exe makes the same edits the FlatRedBall Editor makes, with no window, and reports any errors the edit added. Use it for every change to a Glue project instead of editing the .gluj, .glsj and .glej files by hand. The reference is GlueCli, and GlueCli for AI Agents is the full agent recipe. GlueCli --help lists the commands and GlueCli <command> --help gives each one's options.
GlueCli.exe sits next to GlueFormsCore.exe (the Xna 4 Tools folder of the FRBDK download) and runs on Windows only. See Getting GlueCli.
The Loop
- Run
GlueCli regen <project>once after cloning or pulling. - Run
GlueCli describe <project> --jsonbefore editing, and--element <name>for one screen or entity. It gives the exact names the other commands take. - Make one GlueCli run per edit with
--json, and branch onexitCode(see Exit Codes).--dry-runpreviews an edit. For several edits, put one command per line in a file and runbatch, which loads the project once, then checks for errors, saves and regenerates once after the last line. The batch'serrorsare reported once, for the whole batch, not per line; run commands singly to see which one adds an error. If any line fails or the batch adds errors, the batch writes nothing, so fix the lines and rerun the whole batch. - Build the game with
dotnet buildand fix errors as Build the Game and Fix Errors describes.
Landmines
- Edit commands regenerate only what they change, and
checkanddescriberegenerate nothing, so after a clone, a pull or a hand edit onlyregenmakes the game build. - Passing a folder as
<project>fails when the repo holds a second.gluj, such as a copy for another platform. Pass the.glujpath. - Never edit a
.Generated.csfile. Code generation overwrites it. Fix the project with a GlueCli command, then runregen. - A hand edit to a
.gluj,.glsjor.glejfile skips the editor's rules. Runcheck, thenregen. - Rename with
rename,rename-stateorrename-state-category. Deleting and re-adding loses every reference to the old name. renamedoes not change hand-written code. Update code that uses the old name yourself.- The FlatRedBall Editor can stay open while GlueCli runs. It reloads the changed files.