Skip to content

Directives

A directive is a single-line comment at the top of a Luau script that pre-fills the rodeo run flags. It lets a script declare its own runtime configuration (target, place, save behavior, fflags, and so on) so the caller doesn’t have to remember the right rodeo run invocation, and so you don’t have to orchestrate the script manually from a separate runtime via the rodeo client.

Directives have full parity with the rodeo run subcommand. Any flag you can pass to rodeo run on the CLI can go inside a directive.

-- @rodeo run --place 12345 --target edit:elevated --save
local workspace = game:GetService("Workspace")
print("running in", workspace.Name)

Then:

Terminal window
rodeo run my-script.luau

That’s it. No flags needed at the call site; the script’s directive runs it under --place 12345 --target edit:elevated --save.

-- @rodeo run [flags] [-- script-args]
  • Everything before -- is parsed as flags for rodeo run (same flags as rodeo run --help).
  • Everything after -- becomes process.args inside the script.
  • The directive must be on a single line; it can sit anywhere in the file but is conventionally the first line.
-- @rodeo run --place ./game.rbxl --target test:client -- --user frank --rooms 4
local process = require("@rodeo/process")
print(process.args) --> { "--user", "frank", "--rooms", "4" }

User-supplied flags at the CLI call site override directive flags:

Terminal window
rodeo run my-script.luau --target run:server
# script ran with --target run:server, NOT the edit:elevated from its directive.

This lets the directive set sensible defaults while leaving room for one-off overrides.

Scripts in .rodeo/ can be invoked by bare name:

Terminal window
rodeo run demo
# resolves to .rodeo/demo.luau

Combined with directives, this turns .rodeo/ into a project-local command palette: each script is a self-contained command with its own runtime config.