Rogen

Using Syncback

Bring changes made in Studio back into your source files

Updated

rogen syncback reads a place file that you saved from Studio, and writes what changed into your source files. It needs Rojo 7.7.0 or newer.

In Studio, choose File > Save to File As and save the place as game.rbxlx in your project folder. Then see what syncback would do:

rogen syncback --input game.rbxlx --dry-run
Writing src/Greeter/Shared/Greeting.luau
Writing src/Quest/Shared/QuestTypes.luau
Writing src/Greeter/Server/Welcome.luau
Writing src/Quest/Server/Main.server.luau
Removing src/Greeter/Client
Syncback would change 5 files (4 to write, 1 to remove).

Syncback removes the files of every instance that the place no longer holds, so a place saved from an old copy of the game undoes the edits made since. Look before you write. Then run it without --dry-run. In a terminal it asks before it writes. Under CI or a coding agent it can't ask, so pass -y.

A changed instance goes back to the file it came from, in any layout. A new instance goes where routing would place a file for it, in the style of the files around it: in a project that routes with folders, a new ServerScriptService/Quest/Main script becomes src/Quest/Server/Main.server.luau.

When your config has a compiledPath, syncback leaves the compiled code alone, because the next compile would replace it, and lists each change as a syncback.compiledPath warning for you to make in the source files.