A comprehensive .NET wrapper for creating Stream Deck plugins, using the official Elgato Stream Deck SDK.
SharpDeck takes the hassle out of communicating with the Stream Deck SDK, and handles caching and calling your actions! At a glance, SharpDeck handles...
- Connecting to the Stream Deck.
- Registering your custom actions.
- Calling your custom actions when something happens (i.e. button press).
- Counter - Single action counter plugin.
- Shared Counter - Multiple action plugin with a shared counter and reset.
We recommend taking a look at the official Stream Deck SDK documentation. Each plugin has a manifest.json
file (example) which tells Stream Deck everything about your plugin, and it's actions.
- Create a .NET console app (Framework or Core supported).
- Add your
manifest.json
file.- Set the
Copy to Output Directory
property toCopy Always
.
- Set the
- Add SharpDeck
dotnet add package SharpDeck
. - Update
Program.cs
to initiate your plugin.public static void Main(string[] args) { #if DEBUG // optional, but recommended System.Diagnostics.Debugger.Launch(); #endif // register actions and connect to the Stream Deck SharpDeck.StreamDeckPlugin.Run(); }
- Create your action as a class. Each action must,
- Have the attribute
[StreamDeckAction(UUID)]
, with a unique UUID. - Inherit from either
StreamDeckAction
, orStreamDeckAction{TSettings}
.
- Have the attribute
- Navigate to
%APPDATA%\Elgato\StreamDeck\Plugins
, this is where all Stream Deck plugins live. - Create a folder for your plugin, typically
com.{author}.{plugin}.sdPlugin
. - Copy your files from your
bin\Debug
folder to your plugin folder. - Restart Stream Deck, and your plugin should be there! ๐
Copying your plugin each time can be a bit tedious, but don't worry, there's a few steps to make it easier!
- Ensure your
Program.cs
callsSystem.Diagnostics.Debugger.Launch();
. - Add a pre-build task to terminate
StreamDeck.exe
process:taskkill -f -t -im StreamDeck.exe -fi "status eq running"
- Build to your plugin folder directly:
- e.g.
<OutputPath>$(APPDATA)\Elgato\StreamDeck\Plugins\com.geekyeggo.counter.sdPlugin\</OutputPath>
- e.g.
- Create a debug profile in
Properties/launchSettings.json
(example).{ "profiles": { "DebugWin": { "commandName": "Executable", "executablePath": "c:\\windows\\system32\\cmd.exe", "commandLineArgs": "/S /C \"start \"title\" /B \"%ProgramW6432%\\Elgato\\StreamDeck\\StreamDeck exe\" \"" } } }
- Voila,
F5
should now terminate Stream Deck, rebuild your plugin, and then re-launch Stream Deck!
- If you can't see your plugin at all:
- Check your plugin folder contains your plugin's executable.
- Check the
manifest.json
file exists, and thecodePath
points to your executable.
- If you can see your plugin but it isn't working:
- Check
%APPDATA%\Elgato\StreamDeck\logs
if there are any logs for your plugin. - Update your
Program.cs
to callDebugger.Launch()
(example) which will allow you to debug your plugin.
- Check
Still can't get it working? No problems, raise an issue and we'll try to help!
The MIT License (MIT) Stream Deck is a trademark or registered trademark of Elgato Systems.