codjo3/run_in_roblox

Luau port of the run-in-roblox Rojo tool.

run-in-roblox (Luau)

A Luau port of rojo-rbx/run-in-roblox, built for Lune and distributed via pesde.

run-in-roblox opens a place file in Roblox Studio, runs a script inside it, and pipes all output back to your terminal — enabling traditional automation tools to work alongside Roblox.

Installation

With pesde

pesde add codjo3/run_in_roblox

Requirements

  • pesde with Lune support
  • Roblox Studio installed on your machine

Platform support

OSSupportedNotes
WindowsNative Studio install
macOSNative Studio install
Linux⚠️Via Vinegar, Grapejuice, or Sober

Usage

pesde x codjo3/run_in_roblox -- --place MyPlace.rbxlx --script my-script.luau

This opens MyPlace.rbxlx in Roblox Studio, runs my-script.luau until it completes, then exits.

--script and --place are both required.

Output

Output from inside Studio is forwarded to your terminal with color coding:

LevelColour
printWhite
infoCyan
warnYellow
errorRed

Any error-level message sets the exit code to 1, making it straightforward to use run-in-roblox in CI pipelines.

How it works

  1. Your place file is copied to a temp directory to prevent Studio .lock file conflicts
  2. A .rbxmx plugin file is written to Studio's plugins folder containing:
    • A Script that connects to LogService, contacts the local server, and manages the run lifecycle
    • A ModuleScript child (Main) containing your script wrapped in a function
  3. A local HTTP server starts on port 50312
  4. Roblox Studio is launched with the temp place file
  5. The plugin verifies it's connected to the correct server via a unique session ID, then runs your script and streams output back as JSON over HTTP
  6. Once your script finishes, Studio is killed and all temp files (including the .lock file) are cleaned up

Differences from the original

This port is functionally equivalent to the original Rust tool with a few notes:

  • Distributed via pesde instead of GitHub Releases, Foreman, or crates.io
  • Linux support added for Vinegar, Grapejuice, and Sober compatibility layers
  • No binary place support.rbxl/.rbxlx place files are supported; binary .rbxl format is not currently handled differently (Studio opens both fine)
  • The plugin template is embedded directly in the source rather than as a separate file

License

run-in-roblox (Luau) is available under the MIT License. See LICENSE.txt for details.

Original tool by Lucien Greathouse and the Rojo contributors.