A template for building Firebot plugins (formerly known as "startup scripts") in TypeScript, bundled with tsdown.
Important
This template targets the new plugin API that only works with Firebot v5.67.0 or newer. Earlier versions of Firebot are not supported.
- Create a new repo based off this template (click "Use this Template" above) or fork it.
npm install
npm run build
The compiled plugin is written to dist/<pluginOutputName>.js as a single file.
- Run
npm run build:dev. This builds the plugin and automatically copies the.jsfile into Firebot'sscripts/folder. - In Firebot, open the plugin manager, click Install, and select your plugins
.jsfile in yourscripts/folder.
During development you can rerun npm run build:dev to have the latest code rebuilt and copied over again.
If Firebot is running, the command will also instruct Firebot to reload the plugin automatically as a form of hot-reload.
npm test
- Keep the plugin definition object (the one with
manifest,parametersSchema, andonLoad) insrc/main.ts. The build minifies output but preserves function names, which Firebot relies on to load the plugin. @crowbartools/firebot-typesis treated as an external dependency and is provided by Firebot at runtime - it is not bundled into your output.- Edit the
"pluginOutputName"property inpackage.jsonto change the filename of the built plugin.