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

IDNameDescriptionGUI
dockerDocker IsolationRun game servers in Docker containers with resource limits
steamcmdSteamCMDAutomate server installation and updates via SteamCMD
musicMusic BotPlay music in Discord voice channels (yt-dlp + ffmpeg)
ue4-iniUE4 INI ParserParse 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

HookTrigger
daemon.startupDaemon start
daemon.shutdownDaemon shutdown

Server Lifecycle

HookTrigger
server.pre_createBefore instance creation
server.post_createAfter instance creation
server.pre_startBefore server start
server.post_stopAfter server stop
server.pre_deleteBefore instance deletion
server.statusStatus query
server.statsStats query
server.settings_changedSettings change
server.list_enrichServer list enrichment
server.logsLog query
server.installServer installation
server.updateServer update
server.check_updateUpdate check

GUI/CLI Slots

Extensions can inject UI at these locations:

GUI SlotCLI SlotPurpose
ServerCard.badgeInstanceList.badgeInstance list badge
ServerCard.headerGaugeHeader gauge
ServerCard.expandedStatsInstanceDetail.statusExpanded stats
ServerCard.provisionProvisioning status
ServerSettings.tabInstanceSettings.fieldsSettings tab/fields
AddServer.optionsCreateInstance.optionsInstance 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.