npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@lumiastream/plugin-sdk

v0.1.8

Published

Official Lumia Stream Plugin SDK for building Lumia Stream plugins.

Readme

Lumia Stream Plugin SDK

Official TypeScript/JavaScript SDK for developing plugins for Lumia Stream.

Installation

npm install @lumiastream/plugin-sdk

Usage

import {
	Plugin,
	type PluginManifest,
	type PluginContext,
} from "@lumiastream/plugin-sdk";

export default class MyPlugin extends Plugin {
	constructor(manifest: PluginManifest, context: PluginContext) {
		super(manifest, context);
	}

	async onload(): Promise<void> {
		this.lumia.addLog("Plugin loaded successfully!");
	}

	async onunload(): Promise<void> {
		this.lumia.addLog("Plugin unloaded");
	}
}

Plugin Manifest

Every plugin requires a manifest.json file that describes your plugin, its metadata, and configuration:

{
	"id": "my-awesome-plugin",
	"name": "My Awesome Plugin",
	"version": "1.0.0",
	"author": "Your Name",
	"description": "A brief description of what your plugin does",
	"lumiaVersion": "^9.0.0",
	"category": "utilities",
	"config": {
		"settings": [
			{
				"key": "apiKey",
				"label": "API Key",
				"type": "text",
				"required": true
			}
		]
	}
}

Lifecycle Hooks

  • onload() – invoked when the plugin is enabled inside Lumia Stream.
  • onunload() – called when your plugin is disabled or unloaded.
  • onupdate(oldVersion, newVersion) – triggered after version upgrades.
  • onsettingsupdate(settings, previousSettings) – called whenever settings change.
  • actions(config) – handle custom actions invoked from Lumia automations.

Lumia API Highlights

Interact with Lumia Stream using the strongly typed ILumiaAPI helper on the plugin context:

await this.lumia.triggerAlert({
	alert: "follow",
	extraSettings: { username: "StreamerFan" },
});
await this.lumia.playAudio({ path: "alert.mp3", volume: 0.7 });
this.lumia.setVariable("follower_count", 1337);

See the API reference for the full surface area.

Scripts

  • npm run build – compile the SDK to the dist folder.
  • npm run lint – type-check the source without emitting output.

CLI Helpers

The CLI is distributed separately via @lumiastream/plugin-cli. Use it with npx (requires npm 7+).

  • npx @lumiastream/plugin-cli create my-plugin scaffold a feature-rich sample plugin showing logging, variables, and alerts
  • npx @lumiastream/plugin-cli validate ./path/to/plugin check manifest.json, entry files, and config for common mistakes
  • npx @lumiastream/plugin-cli build ./path/to/plugin --out ./plugin.lumiaplugin bundle the directory into a distributable archive

Documentation

Examples

  • examples/basic-logger – Smallest possible plugin: logs lifecycle events and handles a single action.
  • examples/toast-notifier – Demonstrates settings + actions to trigger Lumia toast notifications.
  • examples/variable-counter – Shows how to persist state via Lumia variables and support multiple actions.
  • examples/rumble – Plain JavaScript Rumble livestream plugin that polls the API, updates variables, and fires alerts.

License

The SDK is released under the MIT License. See LICENSE for details.