Centurion is a flexible and extensible command framework for roblox-ts that
makes defining commands easy and readable.
Installation
npm install @rbxts/centurion
npm install @rbxts/centurion-ui # Optional if using a custom UI
yarn add @rbxts/centurion
yarn add @rbxts/centurion-ui # Optional if using a custom UI
pnpm add @rbxts/centurion
pnpm add @rbxts/centurion-ui # Optional if using a custom UI
bun add @rbxts/centurion-ui # Optional if using a custom UI
Starting Centurion
Centurion needs to be started once on the client and server.
import { Centurion } from "@rbxts/centurion";
import { CenturionUI } from "@rbxts/centurion-ui";
.then(() => CenturionUI.start(Centurion.client(), {}))
.catch((err) => warn("Failed to start Centurion:", err));
import { Centurion } from "@rbxts/centurion";
Centurion.server().start();
Registration
The way commands and types are registered is the same on the server and client.
const server = Centurion.server();
// Load all child ModuleScripts under each container
const commandContainer = script.Parent.commands;
server.registry.load(commandContainer);
const typeContainer = ReplicatedStorage.types;
server.registry.load(typeContainer);
// Any loaded commands and types will then be registered once Centurion is started