Rogen

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:

CommandWhat it does
rogen serveServes the project with Rojo, and writes it again on every change
rogen buildBuilds a place (-o game.rbxl) or a plugin (-p)
rogen uploadBuilds the project and uploads it to Roblox
rogen sourcemapWrites a sourcemap for luau-lsp and other tools
rogen syncbackBrings changes made in a place file back into your source files
rogen fmt-projectFormats the config
rogen plugin installInstalls 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:

CommandWhat it does
rogen initStarts a project
rogen writeWrites the project file, and with --watch on every change
rogen checkPrints every error and warning
rogen wherePrints where a file lands in the game, and how to require it
rogen helpPrints a command's flags, or what a diagnostic code means
rogen docOpens 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:

.github/workflows/ci.yml
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

On this page