Skip to content

CLI Reference

Compiles a file or directory of TS/TSX to Luau.

FlagDescriptionDefault
-o, --output <path>Output file or directorystdout
--cssAlso compile .css files via rbx-cssfalse
--react-path <path>Require path for ReactReplicatedStorage.Packages.React
--react-roblox-path <path>Require path for ReactRobloxReplicatedStorage.Packages.ReactRoblox
--strictTreat warnings as errorsfalse
--sourcemapEmit source map commentsfalse
--warn <level>all, unsupported, or noneall
Terminal window
rbx-tsx compile App.tsx # → stdout
rbx-tsx compile App.tsx -o App.luau # → file
rbx-tsx compile src/ -o out/ # → directory

Unsupported constructs emit warnings, not errors, by default. Use --strict to promote them to errors, or --warn to filter which warnings appear.

Watches a directory or file for changes and recompiles. Accepts the same flags as compile.

Terminal window
rbx-tsx watch src/ -o out/

Runs the compiler without emitting files. Reports warnings and errors only.

Terminal window
rbx-tsx check src/

Scaffolds a new Roblox project with starter components, tsconfig.json, wally.toml, and default.project.json.

Terminal window
rbx-tsx init my-app

Generates TypeScript declarations (.d.ts) from your installed wally/pesde Luau packages, so downloaded packages import with real types instead of any.

FlagDescriptionDefault
-o, --output <dir>Output directory for the generated .d.ts filestypes/packages
Terminal window
wally install # or: pesde install
rbx-tsx types # reads wally.toml / pesde.toml + the Packages/ folder

See Package Type Extraction for details on what it captures.

  • *.tsx / *.ts / *.jsx / *.js.luau
  • index.tsxinit.luau (Rojo convention)
  • index.client.tsxinit.client.luau

Package imports resolve to ReplicatedStorage.Packages.<PackageName>. Rojo-aware path resolution reads default.project.json to map source directories to game:GetService(...) require paths. Package manifests (wally.toml / pesde.toml) are auto-detected.