Skip to Content
sdeck docs

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

  1. Open Plugins and press New plugin. Give it a name.
  2. 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.
  3. Press Open in editor (VS Code, Cursor, VSCodium or Zed, whichever is installed; otherwise the folder opens).
  4. Edit src/index.tsx and 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.

On this page