Plugin API
New to making plugins? The Plugin Generator gives you a ready-to-install plugin to start from.
UnderScript exposes its API to other scripts through the underscript variable. Most plugins start by creating a plugin object:
const plugin = underscript.plugin('My great plugin', '1.0.0');
plugin.logger.info('Hello from', plugin.name);The Plugin Object is where most of the API lives. The UnderScript Object has a few extra helpers.
Checking the version
Features are added over time. To only use a feature when it exists, check the version first:
if (underscript.semver.meets('0.65.0')) {
// Safe to use features from 0.65.0
}meets was added in 0.65.0. If your plugin also runs on older versions, use underscript.semver.isOlder('0.64.0') for the same check.
See underscript.semver.
Editor support
Starting with 0.65.0, every release has a file called underscript.d.ts. It is optional, and plugins work the same without it, but editors like VS Code use it to suggest and check your code. Download it from the latest release and put it next to your plugin’s script.