MicroStudio

Running a project

Boot a Rojo project and drive it with `dev`.

Running a project

MicroStudio runs a project through its Rojo file. dev reads the project, loads the compiled Luau into a live DataModel and runs the server scripts — it is the command for watching your game boot.

The project shape

MicroStudio needs a Rojo project file, because that is what says where compiled Luau lives. A typical roblox-ts default.project.json is enough:

{
  "name": "my-game",
  "tree": {
    "$className": "DataModel",
    "ServerScriptService": { "TS": { "$path": "out/server" } },
    "ReplicatedStorage": { "TS": { "$path": "out/shared" } }
  }
}

Compile with roblox-ts as usual, then point MicroStudio at the project:

npx rbxtsc
npx microstudio dev . --project default.project.json

Note the nested TS folder. MicroStudio reads it from the project file rather than guessing, which is why non-trivial layouts work: mount points, @rbxts segments and node_modules trees all come from the file. A directory holding init.luau becomes that script rather than a folder, which is what Rojo does.

What runs

dev loads the project's instances, then runs the server scripts. Only enabled Scripts under ServerScriptService are executed; a Disabled script is skipped, and LocalScripts are never run.

microstudio dev .

The session runs until Ctrl-C.

Time

dev uses a real clock by default, so task.wait(0.5) really waits half a second. Pass --clock virtual for a world that only moves when you ask it to, where :advance <seconds> steps the scheduler.

--state-dir <path> chooses where simulated services keep their JSON; a leading ~ means your home directory. See Simulated services.

Boot check

--once boots the project, drives it for --timeout seconds and exits instead of staying up. This is the "does my project still boot" check for CI:

microstudio dev . --once
microstudio dev . --once --timeout 3
  • --timeout is measured in seconds here, and defaults to 0.1.
  • The exit code is 0 when nothing errored, 1 when the run recorded an error, and 2 when no Rojo project file was found.

Prompt into a live game

--interactive keeps the session running and reads Luau from stdin against the same world the scripts are using:

microstudio dev examples/hello --interactive
...startup, exactly as above...
MicroStudio live — real clock, 1 server script — :help for commands
> task.wait(0.6)
half a second later
spawned task resumed after 0.25s
> game:GetService("CollectionService"):GetTagged("checkpoint")[1].Name
Checkpoint1
> :player Eddie
welcome, Eddie
PlayerAdded: Eddie
> :quit
stopped at 0.756s — 0 error(s)

The session is not paused: scripts keep running, signals keep firing, and typing at the prompt observes and changes that same world.

Inspect without running scripts

repl loads the project's tree and prompts for Luau, without running the project's scripts:

microstudio repl .
microstudio repl . --project default.project.json

That makes it the right tool for inspecting the loaded DataModel. See The REPL.

Reload on save

--watch restarts the session when the project changes — any .lua/.luau file under a Rojo mount, or the project file itself:

microstudio dev examples/hello --watch
running — Ctrl-C to stop
watching the project's mounts — reload on save
half a second later
spawned task resumed after 0.28s
↻ reload — examples\hello\out\shared\util.luau
loaded 6 instances
hello from the reload, MicroStudio
running on the server: true
[server] ServerScriptService.TS.game

Combine it with --interactive for the full edit → compile → save loop, where both the game and your prompt come back on the new code.

Errors do not end the session. A syntax error is reported with its script, line and stack trace, and the watcher keeps running; saving a fix reloads again. Writes are debounced (120 ms) and coalesced, so a compiler rewriting its whole output directory reloads once.

Flags for dev

FlagTypeDefaultEffect
[dir]positionalworking directorythe directory a Rojo project is searched from
--project <file>pathsearched forthe Rojo project file to read
--services <a,b>comma-separated namesthe server-side setwhich services to mount
--oncebooleanoffboot and exit instead of staying up
--timeout <seconds>number0.1how long --once drives the project
--interactivebooleanoffprompt into the live world
--watchbooleanoffrestart the session when a mount changes
--clock virtual|realenumrealwall time, or time that only moves on :advance
--state-dir <path>path<project>/.microstudiowhere simulated services keep their JSON; ~ is your home directory

See the CLI reference for every command and exit code.