Skip to content
Changelog

Developers

Build on Lightair

Drive a running Lightair from your own apps and agents, or extend it with packages that people install from a catalog.

What a package can hold

Code that runs inside Lightair runs only in Lightair Desktop. See Packages for every kind.

Content You write What happens
Scenes, media, avatars, sounds, LUTs, automation recipes Files and JSON Nothing runs: Lightair adds them to your show
Widgets HTML, CSS, JavaScript Runs in Lightair’s web view, reaching only the hosts it declares
Script plugins JavaScript Runs in its own isolate inside Lightair Desktop, with a memory and time budget
Helpers Any language Runs as a sandboxed process of its own, beside Lightair Desktop

Your first widget

Full widget guide →
1Describe the package
lightair-package.json
{
"id": "com.example.thanks",
"name": "Thanks",
"version": "1.0.0",
"lightair": ">=1.1 <2",
"contents": [{ "kind": "widget", "path": "widgets/thanks" }]
}
2React to events
widgets/thanks/main.js
// Called for every chat message and alert
lightair.on("event", (e) => {
if (lightair.kindOf(e) !== "follow") return;
show(`Thanks, ${e.user.display_name}`);
});
3Check it and build it
Terminal
lightair-pack check thanks
lightair-pack build thanks
# → thanks-1.0.0.airpkg

Install the .airpkg in Lightair. To test without real viewers, turn on Placeholder in the widget’s Inspector.