Documentation Index
Fetch the complete documentation index at: https://sphere.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Setup
Theindex<> pattern against API.Types gives accurate types. Define it once at the top of every package script:
Scripts not inside a named folder are treated as Client scripts by default. You may also create a folder named Client explicitly, it behaves identically.
Client
Client
Server
Server
Shared
Shared
API.Types:
Package
Page
A page shows up as a tab in the UI and holds your sections and commands.Annotation
Annotation
Input
Input
Title String • Required
The name shown on the page tab.Icon String | Icon
Asset ID or Icon table for the page icon.
The name shown on the page tab.Icon String | Icon
Asset ID or Icon table for the page icon.
Output
Output
Title String • Read-Only
The page’s display name.UniqueId String • Read-Only
Title lowercased. Used internally.Icon String | Icon • Read-Only
The icon as passed.Sections Table • Read-Only
All sections on this page, keyed by lowercased title.Commands Table • Read-Only
Page-level commands in creation order.
Creates a new section on this page.CreateCommand Function
Creates a command directly on this page, outside any section.FindSectionByTitle Function
Returns the section matching the title, or
Switches the UI to this page. Pass
The page’s display name.UniqueId String • Read-Only
Title lowercased. Used internally.Icon String | Icon • Read-Only
The icon as passed.Sections Table • Read-Only
All sections on this page, keyed by lowercased title.Commands Table • Read-Only
Page-level commands in creation order.
nil if empty.CreateSection FunctionCreates a new section on this page.CreateCommand Function
Creates a command directly on this page, outside any section.FindSectionByTitle Function
Returns the section matching the title, or
nil.Open FunctionSwitches the UI to this page. Pass
true to suppress the selection event.Section
Sections divide a page into labeled groups.Annotation
Annotation
Input
Input
Title String • Required
The label shown on the section header.Icon Icon
Icon displayed on the section header. Omit to hide the icon slot.VisibleGroup Boolean
Whether the section header is visible. Defaults to
The label shown on the section header.Icon Icon
Icon displayed on the section header. Omit to hide the icon slot.VisibleGroup Boolean
Whether the section header is visible. Defaults to
true.Output
Output
Title String • Read-Only
The section’s display name.UniqueId String • Read-Only
Auto-generated GUID.Page Page • Read-Only
The page this section belongs to.Commands Table • Read-Only
All commands in this section, in creation order.CreateCommand Function
Creates a new command inside this section.FindCommandById Function
Returns the command matching the
The section’s display name.UniqueId String • Read-Only
Auto-generated GUID.Page Page • Read-Only
The page this section belongs to.Commands Table • Read-Only
All commands in this section, in creation order.CreateCommand Function
Creates a new command inside this section.FindCommandById Function
Returns the command matching the
UniqueId, or nil.Command
Thetype decides what UI element is rendered and what fields Config exposes.
Client
Annotation
Annotation
Input
Input
Type String • Required
The command type. Determines the UI element and available Config fields.Display Table • Required
Initial config for the command. Fields depend on the type.
Called when the command is triggered. Arguments depend on the type.
The command type. Determines the UI element and available Config fields.Display Table • Required
Title is required. Description is optional.Config TableInitial config for the command. Fields depend on the type.
Button has none.Execute FunctionCalled when the command is triggered. Arguments depend on the type.
Output
Output
Display Table
The display table as passed. Writable.Config Table
The live config table. See Syncing for how changes propagate.Execute Function • Read-Only
The execute function as passed.Internal Table • Read-Only
Shallow copy of this command. Config is cloned, execute is copied by reference.Destroy Function
Removes the command.
The display table as passed. Writable.Config Table
The live config table. See Syncing for how changes propagate.Execute Function • Read-Only
The execute function as passed.Internal Table • Read-Only
- UniqueId String Auto-generated GUID.
- Type String The type passed at creation.
- Section Section? The section this command belongs to, if any.
- Page Page The page this command belongs to.
Shallow copy of this command. Config is cloned, execute is copied by reference.Destroy Function
Removes the command.
Permissions
The framework does not enforce permissions. You decide what guards your UI and implement it yourself. A common pattern is apermit helper that closes over your context:
Client
"*" acts as a wildcard: if present, permit always passes. This is just one approach.
Anything inside a
permit block that the user doesn’t have access to simply never gets created.Input
Input
Key String • Required
The permission key to check against
The block to run if the permission check passes. Any UI created inside is only registered when the check succeeds.
The permission key to check against
Context.Permissions. Use "*" as a wildcard that always passes.Callback Function • RequiredThe block to run if the permission check passes. Any UI created inside is only registered when the check succeeds.
Output
Output
Granted Boolean
If
If
Context.Permissions[key] or "*" is truthy, the callback executes and the enclosed UI elements are created. Otherwise, nothing happens and no UI is registered.Syncing
Only surface-level
Config writes trigger UI updates. Mutating a nested table directly will not.Server-only change
Server-only change
Fire your own
RemoteEvent from the server and listen for it on the client.Server
Client
Shared change
Shared change