Rojo with file-system routing. Professional-grade architecture for Roblox codebases.
Rogen is a superset of Rojo that generates Rojo project files from your file system. Put code in a Server or Client folder, or add @Server to a file's name, and Rogen sends it to the right place.
- Organize by feature — Group all code, UI, and assets for a specific feature in one place. This gives you high cohesion, better scalability, fewer merge conflicts, and features that are simple to maintain or delete.
- Enforce boundaries — Keep coupling low with a linter. Every path names its feature, so a lint rule can stop one feature from requiring another.
- Multi-place games — Write shared code once and use it in every place. When one place needs something different, add a file with the same name to that place's folder, and it overwrites the shared one there.
- Still Rojo — Rogen runs the Rojo commands you use, with the same flags. One tool, and nothing to relearn.
When an agent works on a feature, everything it needs is in one folder, from server to client. It spends its context on your task instead of searching the codebase.
Running several agents? Give each one a feature. A lint rule catches any agent that makes one feature require another, and there's no shared project file to conflict on.
default.rogen.json is a Rojo project file with routes added. The tree is the base: put in it what folder names can't say, such as your packages, and Rogen adds every routed file to it:
{
"name": "my-game",
"routes": {
"Server": "ServerScriptService",
"Client": "StarterPlayer/StarterPlayerScripts",
"Shared": "ReplicatedStorage/Shared",
"*": "ReplicatedStorage/Shared"
},
"tree": {
"$className": "DataModel",
"ReplicatedStorage": {
"Packages": { "$path": "Packages" }
}
}
}A folder or an @ suffix named after a route sends its code there. The * route takes every file that matches no other:
In src/Inventory |
Goes to |
|---|---|
Server/InventoryService.luau |
ServerScriptService/Inventory |
Client/InventoryController.luau |
StarterPlayer/StarterPlayerScripts/Inventory |
Shared/InventoryTypes.luau |
ReplicatedStorage/Shared/Inventory |
Save@Server.luau |
ServerScriptService/Inventory |
InventoryConfig.luau |
ReplicatedStorage/Shared/Inventory |
The routes are yours to change. Add "Gui": "StarterGui", and a Gui folder or a @Gui suffix sends code to StarterGui.
rokit add ldgerrits/rogen@2.0.0-beta.1
rogen initrogen init pins Rojo in rokit.toml and tells you to run rokit install to fetch it. New to Rojo? Also run rogen plugin install to add its Studio plugin. Prefer npm? Run npm i @ldgerrits/rogen@next and use npx rogen.
rogen serve # Serve with Rojo and update the project file on changes
rogen build -o game.rbxl # Update the project file, then build a place with Rojo
rogen check # Print warnings and errors, and exit 1 on anysourcemap, upload, syncback and plugin take Rojo's flags too. See the documentation for every command.
Yes and no. You run rogen instead of rojo, but Rojo still does the syncing and building underneath. Its Studio plugin stays installed too.
Yes, for syncing your files into Studio. Run rogen write --watch and serve with Argon. To bring Studio changes back, save the place and run rogen syncback --input game.rbxl. With Rojo, it's one command: rogen serve keeps the project file current and serves it.
Yes. Run rogen init to move it to Rogen. See Coming from Rojo.
Read the contributing guide before you open a pull request. You can also star the repo or sponsor its development.
Rogen is MIT licensed.