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:
rodeo run my-script.luauThat’s it. No flags needed at the call site; the script’s directive runs it under --place 12345 --target edit:elevated --save.
Syntax
Section titled “Syntax”-- @rodeo run [flags] [-- script-args]- Everything before
--is parsed as flags forrodeo run(same flags asrodeo run --help). - Everything after
--becomesprocess.argsinside 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" }Override
Section titled “Override”User-supplied flags at the CLI call site override directive flags:
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.
Short names
Section titled “Short names”Scripts in .rodeo/ can be invoked by bare name:
rodeo run demo# resolves to .rodeo/demo.luauCombined with directives, this turns .rodeo/ into a project-local command palette: each script is a self-contained command with its own runtime config.