Sync scripts with files on disk
syncMirror Roblox Studio scripts to disk for editing with your own tools, then push changes back in one call. Keep both sides updated continuously.
Instructions
Mirrors the place's scripts into a folder on disk, so you can work on code with your own file tools -- read a window, search, edit in place, diff -- and then send it back to Studio in one call. Studio stays where the game runs: use playtest, screenshot, console and input to check the result.
Layout mirrors the instance tree, Rojo-style: ServerScriptService/Main.server.luau is a Script, .client.luau a LocalScript, .luau a ModuleScript, and a script with scripts inside is a folder holding init.server.luau (or init.client.luau, init.luau). New files become new scripts, and a file moved or renamed moves the script itself, keeping its identity.
Ops: status shows what would change without changing anything. sync goes both ways, pull only Studio -> disk, push only disk -> Studio. watch keeps them in step until stop: edit files and Studio follows within a second, and edits in Studio land on disk.
Nothing is overwritten blind. The last sync is remembered per file, so a file changed on both sides is a conflict, reported and left alone -- settle it, or pass prefer. Deleting a file deletes the script (one Ctrl+Z in Studio); a script deleted in Studio moves its file to .rbx-sync/trash. Nothing is deleted on a first sync.
UI and other instance trees: export writes one as a build file (e.g. StarterGui/Shop.build.json, the same fields create takes, only non-default properties). Edit it, then build -- or any sync -- rebuilds the tree in one undo step, keeping the scripts inside it. Build files are two-way too: a tree edited in Studio is written back to its file, and edits on both sides are a conflict rather than one silently undoing the other.
Conflicts leave Studio's version in .rbx-sync/conflicts/. Merge into the file (or fix Studio) and sync again: whichever side changed since the conflict wins. While watch runs, new conflicts and errors are appended to your next tool reply.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | 'status': dry run. 'sync': both ways. 'pull': Studio -> disk. 'push': disk -> Studio. 'watch'/'stop': continuous two-way sync. 'export': instance trees -> build files. 'build': build files -> instance trees. | |
| dir | No | Sync folder, relative to the working directory. Default "studio". | |
| files | No | build: build files to apply, relative to the folder. Default: those changed since last built. | |
| paths | No | export: instances to write as build files, e.g. ["StarterGui.Shop"]. | |
| roots | No | Studio paths to sync, e.g. ["ServerScriptService", "ReplicatedStorage.Shared"]. Default: every service scripts are authored in. Remembered for the folder once given. | |
| prefer | No | Settle conflicts in favour of one side instead of reporting them. | |
| rebind | No | Let a folder synced with one place follow a different place. Almost never what you want. | |
| studioId | No | Target Studio; omit for the active one. | |
| confirmDeletes | No | Allow a run that deletes most of what the folder tracks. Check `status` first. |