Forest Logo
search
package_2

operator

By @qscythee

Roblox

Mirrored from Wally

[image: Operator]

Operator

A command console and admin framework for Roblox, in pure Luau.

License: MIT

Documentation →

Introduction · Installation · Setup

Operator is a command console and permission system for Roblox developers who would rather define commands than build an admin panel.

Features

🔒 Nothing reaches an unauthorized client: no modules, no remote, no interface. A player who is allowed nothing has no way to tell the package is installed.

👥 Roles are built in. Declare them by group rank or user ID, inherit between them, and permissions resolve themselves. No hooks to write.

⚡ One require, one call. No client bootstrap, no configuration files, no folder you have to create first. Every field is optional.

🧩 Typed argument tables. Arguments arrive as a checked table, not positional strings, so a typo in a handler is a type error rather than a runtime surprise.

🎨 Extensible argument types. Define your own with validation, transformation and autocomplete, and compose them on top of the built-ins.

A command

local Operator = require(game:GetService("ServerStorage").Operator)
local Command, Types = Operator.Command, Operator.Types

export type KickArgs = { target: Player, reason: string }

return (Command.new("kick") :: Operator.Builder<KickArgs>)
    :description("Kick a player")
    :arg(Types.Player, "target", "Player to kick")
    :arg(Types.String, "reason", "Reason shown to the player", { rest = true })
    :permission("moderator")
    :destructive()
    :run(function(context, args)
        args.target:Kick(args.reason)
        context:reply(`kicked {args.target.Name}`)
    end)

Inside run, args.target is a Player and args.reason is a string, fully checked.

Starting it

local Operator = require(game:GetService("ServerStorage").Operator)

Operator.Start({
    Commands = script.Parent.Commands,
    DefaultCommands = { "debug", "moderation" },

    Roles = {
        owner = { UserIds = { 1234567 }, Inherits = { "moderator" } },
        moderator = { GroupId = 123456, MinRank = 200 },
    },
})

That is the whole setup. Operator.Start({}) also works, and gives you a console for the place owner and nobody else.

Attributions

  • Centurion: console interface design and interaction model. Operator's terminal is a structural port of Centurion's, reimplemented in Luau.
  • Cmdr: prior art for Roblox command consoles, and the origin of the quote-aware argument splitting both use.
  • Vide: the reactive UI library the console is built with, vendored under Client/UI/Packages/.

License

Operator is MIT licensed.

License: MIT

Package Details

Install command (Click to copy)


Version

0.2.0

License

MIT

check_circle

Safe for commercial use

Automated license review — not legal advice.