@elgato/streamdeck

中文文档
3.0.4发布于 2026/10/29MITTypeScriptES Module构建来源已验证近 30 天下载 7.1万

The official Node.js SDK for creating Stream Deck plugins.

原始使用文档
文档目录5 节
  1. 🚀 Quick Start
  2. 📂 File Structure
  3. 🎛️ Actions
  4. 🔎 Debugging
  5. 📖 Further Reading

Stream Deck SDK banner

Stream Deck SDK

SDK documentation Elgato homepage Join the Marketplace Makers Discord Stream Deck npm package Build status

Welcome to the Stream Deck SDK — Designed to make creating plugins for Stream Deck easy, the Stream Deck SDK provides everything you need to connect and communicate with Stream Deck app, letting you focus on the fun stuff.

Creating Stream Deck plugins with Node.js requires Node.js 24 or higher, and Stream Deck 7.1 or higher. When installing Node.js, we recommended using a version manager such as nvm (macOS) or nvm-windows (Windows).

🚀 Quick Start

The Stream Deck CLI provides commands for creating, testing, and bundling your plugins, and is the easiest way to get started building for Stream Deck. You can also learn more about getting started in our documentation.

  1. With Node.js installed, install the CLI.
npm install -g @elgato/cli@latest
  1. Once installed, run the create command to initialize the creation wizard.
streamdeck create

📂 File Structure

After creating a plugin with streamdeck create you'll be provided with a local environment for building a plugin.

/
├── *.sdPlugin/
│   ├── bin/
│   ├── imgs/
│   ├── logs/
│   ├── ui/
│   │   └── increment-counter.html
│   └── manifest.json
├── src/
│   ├── actions/
│   │   └── increment-counter.ts
│   └── plugin.ts
├── package.json
├── rollup.config.mjs
└── tsconfig.json

The package.json provides two scripts for building the plugin.

  • npm run build - builds the plugin.
  • npm run watch - continuously watches for changes, and hot-reloads the plugin after build.

🎛️ Actions

Actions are the star of the show and enable users to interact with your plugin. Actions are represented as classes that inherit from SingletonAction, enabling your plugin to receive events from Stream Deck, for example key down, dial rotate, etc.

The following is an example of an action that listens for the keyDown event, and then sets the title of the source action.

import { action, KeyDownEvent, SingletonAction } from "@elgato/streamdeck";

@action({ UUID: "com.elgato.hello-world.say-hello" })
export class SayHelloAction extends SingletonAction {
    /**
     * Listen for the key down event that occurs when a user presses
     * a Stream Deck button, and change the title of the action.
     */
    async onKeyDown(ev: KeyDownEvent) {
        await ev.action.setTitle("Hello world");
    }
}

🔎 Debugging

Plugins can be debugged using any Node.js debugger, for example Visual Studio Code, Chrome, etc., and by default will have debugging enabled when created with the Stream Deck CLI streamdeck create command.

You can configure debugging within the manifest's Node.js configuration.

{
    // ...
    "Nodejs": {
        "Version": "24",
        "Debug": "enabled",
    },
}

There are four available options when configuring the Debug property within the manifest:

  • "enabled" - the plugin will run with --inspect allowing debuggers to connect.
  • "break" - the plugin will launch with --inspect-brk and will await a debugger attaching before running.
  • string - a collection of CLI arguments supplied to the plugin.
  • undefined - debugging is disabled.

When running the plugin in either debug mode "enabled" or "break", a random available port will be allocated to the debug listener each time the plugin launches. If you wish to listen on a specific port, the Debug value can be set to a string of CLI arguments, for example to listen on port 12345, the Debug value would be --inspect=127.0.0.1:12345.

📖 Further Reading

版本与发布记录

@elgato/streamdeck 共发布 49 个版本,首次发布于 2023/08/23;过去 12 个月发布了 19 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
3.0.4latest2026/10/2915 天前
3.0.32026/10/1925 天前
3.0.22026/10/091 个月前
3.0.12026/09/271 个月前
3.0.02026/09/221 个月前
2.1.22026/08/172 个月前

其他发布通道:alpha → 2.0.0-alpha.2,dev → 2.0.0-dev.202510211650,beta → 2.0.0-beta.3,ea → 2.1.0-ea.202608131212。

关于 @elgato/streamdeck 的常见问题

@elgato/streamdeck 是什么?

The official Node.js SDK for creating Stream Deck plugins.

如何安装 @elgato/streamdeck?

在项目目录运行 npm install @elgato/streamdeck,或使用 pnpm add / yarn add / bun add。

@elgato/streamdeck 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@elgato/streamdeck 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@elgato/streamdeck 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20.5.1。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@elgato/streamdeck 可以商用吗?

@elgato/streamdeck 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@elgato/streamdeck 的下载量有多少?

根据 npm 官方下载统计,@elgato/streamdeck 在 2026/10/14 – 2026/11/12 这 30 天内被下载 71,491 次,日均约 2,383 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@elgato/streamdeck 还在维护吗?

最新版本 3.0.4 发布于 2026/10/29(15 天前);至今共发布 49 个版本,其中过去 12 个月发布了 19 个;首次发布于 2023/08/23。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。