Writing plugins
Make a plugin in Studio and see it on a key within a minute.
A plugin adds actions to sdeck: things a key, a sensor strip or the window can do and show. It is
an npm package that makes a plugin with createPlugin(...) from @sdeck/plugin and exports it. It
runs inside sdeck, and can do what its user allows.
Start in Studio
- Open Plugins and press New plugin. Give it a name.
- Studio makes a folder for it inside its plugins folder (
plugins/local/<name>), with a working example, and loads it. Its actions are in the action list at once. - Press Open in editor (VS Code, Cursor, VSCodium or Zed, whichever is installed; otherwise the folder opens).
- Edit
src/index.tsxand save. The plugin reloads a moment later and a note says so. If the file does not load, the note says why and the plugin shows as failed until the next save.
There is no build step: Studio runs the TypeScript as it is. For types in your editor, run
bun install in the folder once.
A plugin you are working on elsewhere (a git checkout) works the same way: Plugins → Add folder. It reloads on save too.
To rename a plugin, change the name in both package.json and the id in src/index.tsx. Studio
follows, and keeps what you allowed it. Its settings and the buttons that use it stay with the old
name, so do this early.