Create a plugin
When you finish this page, you’ll have a plugin directory with a manifest, Go entry point, public docs page, and conformance test, plus Studio pages and Player behavior if you ask for them.
Before you start
Section titled “Before you start”Use a checkout that already passes the repository checks. Install the dependencies with make bootstrap.
Scaffold the plugin
Section titled “Scaffold the plugin”-
Choose a stable snake_case ID. It is stored in Tilecast data and should not change later.
-
Run the scaffold command from the repository root:
Repository root npm run plugins:new -- transit_alerts --name "Transit Alerts" --category Automation --apiThe scaffold uses Plugin API v2. Add
--plugin-api 3for a plugin whose instances and settings Tilecast should store for you: it generates the routes, API description, and Studio pages from the manifest, so those files aren’t scaffolded. Pick only the parts the plugin needs:--apiadds HTTP routes and an API description.--no-studioleaves out Studio pages, for a server-only integration.--playeradds Player behavior. Name its services with--services player.clock@1,...and enhancements with--optional player.presentation.observe@1.--surface ticker:strip.top,strip.bottom:scheduledadds a visual contribution and theplayer.surface@1service.--no-instances(with--plugin-api 3) leaves out instances, for a plugin built from settings, connections, feeds, events, webhooks, or providers. It starts with one organization setting so its page has something to open on. Add--no-studioto leave out the Studio route and that setting for a plugin that only runs on the Server.
A scaffold never asks for Tilecast services on its own. If the plugin reads the content library or Activity, add
content.read@2oractivity.read@1toservicesyourself, and only the one you need.Without
--player, the plugin gets no Player files at all. -
Open
plugins/transit-alerts/tilecast.plugin.jsonand replace the generated description, icon, maintainers, requirements, andusesentries. -
Implement only the parts the plugin needs. A plugin that shows nothing on screens does not need Player projection; a plugin with no background work does not need a worker.
-
Check the plugin:
Repository root npm run plugins:check
The scaffold also regenerates the Go registry, CODEOWNERS, and composed API files.
Keep the entry point small
Section titled “Keep the entry point small”plugin.go embeds the manifest and migrations and returns the server contribution. Put product logic under server/.
package transitalerts
import ( _ "embed"
"github.com/tilecast/tilecast/packages/plugin-sdk/go/plugin")
//go:embed tilecast.plugin.jsonvar manifest []byte
func New() plugin.Plugin { return &Plugin{Bundle: plugin.NewBundle(manifest, nil)}}The scaffold creates a matching conformance test. Keep it.
Don’t add central registration
Section titled “Don’t add central registration”You should not need to add the plugin ID to Tilecast Server startup, Studio routing, or the Player runtime. Those paths use generated registries or build-time discovery. The docs sidebar doesn’t list plugin pages, so a plugin that publishes a docs page links it from the plugin catalog page instead.
If the plugin needs a core fact that no Host service exposes, treat that as a Plugin API design change instead of reading a core table directly.
Next, read Write the plugin manifest, then use the server, Studio, or Player pages only for the parts your plugin needs.