Rogen IconRogen
Setups

Luau

Step-by-step setup guide for a Luau project.

Rogen builds Luau projects directly. There's no compiler, so Rojo syncs the root directories themselves and no sync directory is needed.

Create the Config

Run the initialization command in the project root:

rogen init

It writes default.rogen.json and prints what to do next:

Created default.rogen.json.
Next steps
  rogen watch
  rojo serve default.project.json
  Add your own routes under "routes" in default.rogen.json.
  Add tags under "tags" in default.rogen.json to swap in variants like Analytics.mock.luau.
default.rogen.json
{
	"$schema": "https://ldgerrits.github.io/rogen/schema/2/rogen.json",
	"rootDirs": ["src"],
	"routes": {
		"Server": "ServerScriptService",
		"Client": "StarterPlayer/StarterPlayerScripts",
		"Shared": "ReplicatedStorage/Shared",
		"*": "ReplicatedStorage/Shared"
	}
}

In a terminal, init asks about the root directories, the routes and where files that match no route go. Pressing Enter at every question writes the config above. If it finds Wally or Pesde, it offers to mount their package folders (as optional ones until you install) and writes a template.project.json for them. If a hand-written default.project.json is already there, it copies it to template.project.json instead, so nothing in it is lost.

Lay Out a Feature

Put each feature in a folder under src, with a routing folder per side:

src/Inventory/Server/InventoryService.luau
src/Inventory/Client/InventoryController.luau
src/Inventory/Shared/InventoryTypes.luau

Rogen sends them to ServerScriptService/Inventory, StarterPlayer/StarterPlayerScripts/Inventory and ReplicatedStorage/Shared/Inventory. See Routing.

Start Watching

Run Rogen in watch mode. Rogen builds default.project.json and updates it when files change.

rogen watch

Sync with Rojo

Open a separate terminal window and start Rojo with the generated project file.

rojo serve

rojo serve with no argument picks up default.project.json, which is the file rogen watch writes.

On this page