Node.js SDK Introduction (Alpha)
New in Plugin API 6.2.3 (available starting from Logi Options+ 1.97 and Loupedeck 6.2.4).
Introducing the Node.js version of our powerful Logi Actions SDK – now available in alpha for early adopters and innovative developers! The Node.js SDK harnesses JavaScript's flexibility and the vast npm ecosystem to help you create dynamic plugins. Whether you're a web developer looking to extend into hardware integration or seeking to leverage your JavaScript expertise for creative workflow solutions, this alpha release opens new possibilities for plugin development.
New to the Logi Actions SDK? Start with the Getting Started guide to learn about supported devices, choose between C# and Node.js SDKs, and understand the ecosystem.
What You Can Do with Node.js SDK
With the Node.js SDK, you can:
- Test and iterate rapidly: Take advantage of Node.js's fast development cycle with automatic hot reloading
- Leverage the JavaScript ecosystem: Integrate with npm packages and JavaScript libraries
- Provide valuable feedback: Help shape the SDK's evolution and influence the developer experience
This is an alpha release for developers who want early access to Node.js plugin development.
Current limitations:
- Windows only (macOS support coming soon)
- Plugins are for testing and feedback purposes only
- Direct marketplace submission will be available in future releases
Get involved:
Ready to help us improve the SDK? Join our Discord server to share feedback and get support.
Prerequisites
Before you begin, ensure you have:
- Windows OS: Node.js plugins can be developed and run only on Windows. macOS support will be added in future releases.
- Node.js: Install the latest LTS version from nodejs.org
- Basic JavaScript/TypeScript knowledge
For general prerequisites including host applications and supported devices, see the Getting Started guide.
Installation
Creating a plugin
To create a sample plugin, open a command prompt in the directory you wish to manage the plugin code. From here, run the following command with your desired name of the plugin in place of the templated name:
npx @logitech/plugin-toolkit create <plugin-name-here>
Use kebab-case notation for the plugin name. A new directory should be created with the name you gave the plugin in the create command. The sample plugin will use Typescript by default. If JavaScript is preferred, add the --javascript option to the end of the command.
Building the sample plugin
Navigate to the plugin directory created in the previous step. Install the plugin dependencies by running:
npm install
After the dependencies are installed, build plugin and link it to Logi Plugin Service using the watch script:
npm run watch
The plugin should now be available to use in Logi Options+. Once the build completes, it will watch for any file changes and rebuild the plugin. It will also tell Logi Plugin Service to reload the changes. When the watch script is stopped, the plugin will be unloaded from Logi Plugin Service also. To build the plugin without watching the source files for changes, the build script can be run directly:
npm run build
The compiled plugin is available from the newly created dist directory.
Running the plugin in Logi Plugin Service
The watch script will automatically load the plugin in Logi Plugin Service. If the build script is used to create a build of the plugin, it can be loaded into Logi Plugin Service using the following command:
npm run link
This will create a symlink from the dist folder to the Logi Plugin Service installed plugins folder. Once Logi Plugin Service detects the new plugin, it will create a new node process to run the plugin. Once the plugin has started, it should display in the installed plugin list in Logi Options+. From here, you can use the plugin like any other plugin. You can assign and run actions on devices, customize actions, create profiles, etc.
If you wish to remove the linked plugin from Logi Plugin Service, run the following command:
npm run unlink
The plugin should disappear from Logi Options+.
Building a distributable package
To run a minified build and package the plugin to a .lplug4 format that can be installed on any device running the Logi Plugin Service, run the following command
npm run build:pack