MicroStudio

The REPL

Inspect a live DataModel one expression at a time.

The REPL

Run MicroStudio with no script and it starts a prompt on a fresh world:

microstudio

Nothing is read from disk, and the full Roblox API is in scope. The banner names the CLI version and the Luau version:

MicroStudio 1.1.1 — Luau 0.740 — :help for commands
> workspace
Instance<Workspace> Workspace
> Instance.new("Part").Size
4, 1, 2
> CFrame.Angles(0, math.pi / 2, 0)
0, 0, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0
> game:GetService("CollectionService"):GetTags(workspace)
[]

On a terminal, a bare expression echoes its value, so part:GetFullName() answers without a print around it. Statements are accepted too, and echo nothing.

REPL commands

Anything starting with : is handled by the prompt; everything else is evaluated as Luau.

CommandDoes
:helpprints the command list
:advance <seconds>moves the virtual clock, running anything due
:tree [path]prints the DataModel below a path; game by default
:player <name>adds a mock player, firing PlayerAdded
:statsprints runtime counters as JSON
:quit, :qleaves

Stay in the world a script created

Pass --interactive to run a file and stay in the world it created, instead of exiting when the script finishes:

microstudio script.luau --interactive

The script's world stays live, so you can inspect what it built. Combine with --watch for a Luau scratchpad that re-runs on save.

The project REPL

repl is the same prompt, but it loads a Rojo project's instances first — without running the project's scripts:

microstudio repl examples/hello
loaded .../default.project.json
MicroStudio repl — :help for commands
> workspace
Instance<Workspace> Workspace
> :player Eddie
PlayerAdded: Eddie
> game:GetService("ReplicatedStorage").TS.util
Instance<ModuleScript> util
> :tree ReplicatedStorage
ReplicatedStorage (ReplicatedStorage)
  TS (Folder)
    util (ModuleScript)

For a live game whose scripts are running, use dev --interactive instead.

Things worth poking at

  • workspace — the root of the loaded tree; :tree walks it.
  • Instance.new("Part").Size — a datatype rendered as Roblox's tostring produces it.
  • game:GetService("CollectionService"):GetTags(workspace) — a real service call returning a real table.
  • :advance 0.6 — step the virtual clock and see scheduled work run.