Skip to content
Centurion

Getting Started

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

Starting Centurion

Centurion needs to be started once on the client and server.

import { Centurion } from "@rbxts/centurion";
import { CenturionUI } from "@rbxts/centurion-ui";
Centurion.client()
.start()
.then(() => CenturionUI.start(Centurion.client(), {}))
.catch((err) => warn("Failed to start Centurion:", err));

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
server.start();