Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.sirius.menu/llms.txt

Use this file to discover all available pages before exploring further.

When a buyer’s key validates, Sirius injects a Sirius global before your code runs. Read it to branch on what they own.

The Sirius global

getgenv().Sirius = {
    Tier = {
        id = "gold",
        name = "Gold Tier"
    },
    Source = "whitelist",
    ExpiresAt = nil
}
FieldDescription
Tier.idThe permanent slug from the product. Branch on this.
Tier.nameDisplay name. Safe for UI.
Source"whitelist" for paid keys, "checkpoint" for free ad-gated keys.
ExpiresAtUnix seconds for subscriptions, nil for permanent keys.

Branching

local tier = getgenv().Sirius and getgenv().Sirius.Tier
local tierId = tier and tier.id or "free"

if tierId == "gold" then
    enableGoldFeatures()
elseif tierId == "silver" then
    enableSilverFeatures()
else
    enableBasicFeatures()
end
Always default to "free" when the global is missing — the script might be running outside a key gate.

Trust the global once

The buyer’s executor controls the runtime. They can overwrite getgenv().Sirius after your script loads. Read it once at the top of your script and cache it.
-- Top of file, before any other code
local SIRIUS_TIER = (getgenv().Sirius and getgenv().Sirius.Tier and getgenv().Sirius.Tier.id) or "free"

-- Use SIRIUS_TIER everywhere; never re-read getgenv().Sirius
The tier id and watermark are also baked into the source itself, so leaked scripts trace back regardless of runtime tampering.