Commands
Rojo's commands through Rogen, and Rogen's own
Updated
Rogen runs Rojo's commands with Rojo's flags, and adds a few of its own. rogen help <command> lists a command's flags.
Rojo's Commands
Each command writes the project file first, so Rojo always reads what your config says:
| Command | What it does |
|---|---|
rogen serve | Serves the project with Rojo, and writes it again on every change |
rogen build | Builds a place (-o game.rbxl) or a plugin (-p) |
rogen upload | Builds the project and uploads it to Roblox |
rogen sourcemap | Writes a sourcemap for luau-lsp and other tools |
rogen syncback | Brings changes made in a place file back into your source files |
rogen fmt-project | Formats the config |
rogen plugin install | Installs Rojo's Studio plugin, matching the Rojo your project pins |
In a folder with a plain default.project.json and no config, these commands run on that file as Rojo would, and write nothing.
Rogen's Commands
Rogen's own commands write and inspect the project file. To sync with Argon or another tool instead of Rojo, run rogen write --watch beside it:
| Command | What it does |
|---|---|
rogen init | Starts a project |
rogen write | Writes the project file, and with --watch on every change |
rogen check | Prints every error and warning |
rogen where | Prints where a file lands in the game, and how to require it |
rogen help | Prints a command's flags, or what a diagnostic code means |
rogen doc | Opens these docs, or prints a topic offline |
Exit Codes and JSON
A command exits 0 when it did what it was asked, warnings included, 1 when the project has errors, and 2 when the command line is wrong. rogen check exits 1 on any warning too.
With --json, a command prints one JSON document on one line of stdout and nothing else. Match a diagnostic on its code, not its message. rogen doc output explains every key.
Running in CI
This workflow installs the tools that rokit.toml pins, which must include Rogen, then checks and builds the game. Under GitHub Actions, rogen check also shows each diagnostic on the file in the pull request:
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: CompeyDev/setup-rokit@v0.2.1
- run: rogen check
- run: rogen build -o game.rbxl