Extensions
What is an Extension?
Unlike modules (game-specific), extensions are general-purpose add-ons that aren't tied to any particular game. They hook into the server lifecycle at various points and can inject UI into both GUI and CLI.
Built-in Extensions
| ID | Name | Description | GUI |
|---|---|---|---|
docker | Docker Isolation | Run game servers in Docker containers with resource limits | ✅ |
steamcmd | SteamCMD | Automate server installation and updates via SteamCMD | ❌ |
music | Music Bot | Play music in Discord voice channels (yt-dlp + ffmpeg) | ❌ |
ue4-ini | UE4 INI Parser | Parse Unreal Engine 4 INI OptionSettings | ❌ |
Extension Management
Enable / Disable
GUI Settings → Extensions tab, or via CLI:
:ext enable <id>
:ext disable <id>
Install / Remove
:ext manifest # Browse remote manifest
:ext install <id>
:ext remove <id>
:ext rescan # Rescan extension directory
Hook System
Extensions can execute at these lifecycle points:
Daemon Lifecycle
| Hook | Trigger |
|---|---|
daemon.startup | Daemon start |
daemon.shutdown | Daemon shutdown |
Server Lifecycle
| Hook | Trigger |
|---|---|
server.pre_create | Before instance creation |
server.post_create | After instance creation |
server.pre_start | Before server start |
server.post_stop | After server stop |
server.pre_delete | Before instance deletion |
server.status | Status query |
server.stats | Stats query |
server.settings_changed | Settings change |
server.list_enrich | Server list enrichment |
server.logs | Log query |
server.install | Server installation |
server.update | Server update |
server.check_update | Update check |
GUI/CLI Slots
Extensions can inject UI at these locations:
| GUI Slot | CLI Slot | Purpose |
|---|---|---|
ServerCard.badge | InstanceList.badge | Instance list badge |
ServerCard.headerGauge | — | Header gauge |
ServerCard.expandedStats | InstanceDetail.status | Expanded stats |
ServerCard.provision | — | Provisioning status |
ServerSettings.tab | InstanceSettings.fields | Settings tab/fields |
AddServer.options | CreateInstance.options | Instance creation options |
Extension Architecture
Extensions follow the same independence principles as modules:
- Configuration via stdin JSON and environment variables
- All data stored in
%APPDATA%/saba-chan - Communication with daemon through
DAEMON_API_URL - GUI components loaded dynamically from
gui/directory
Developing Extensions
Each extension has a manifest.json:
{
"name": "my-extension",
"version": "1.0.0",
"entry": "main.py",
"gui": "gui/src/MyExtension.js"
}
Extensions can be written in Python, Go, or any language — the daemon communicates via standard I/O.