https://github.com/fritzandfriends/streamdecktoolkit
A .NET Standard library, template, and tools for building extensions to the Elgato Stream Deck
https://github.com/fritzandfriends/streamdecktoolkit
dotnetcore stream-deck streamdeck streamdeck-sdk template
Last synced: 6 months ago
JSON representation
A .NET Standard library, template, and tools for building extensions to the Elgato Stream Deck
- Host: GitHub
- URL: https://github.com/fritzandfriends/streamdecktoolkit
- Owner: FritzAndFriends
- License: mit
- Created: 2019-01-08T18:01:10.000Z (about 7 years ago)
- Default Branch: dev
- Last Pushed: 2023-06-05T15:34:24.000Z (almost 3 years ago)
- Last Synced: 2025-04-26T08:49:18.774Z (12 months ago)
- Topics: dotnetcore, stream-deck, streamdeck, streamdeck-sdk, template
- Language: CSS
- Homepage:
- Size: 1.43 MB
- Stars: 168
- Watchers: 13
- Forks: 45
- Open Issues: 34
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# StreamDeckToolkit
[](https://dev.azure.com/FritzAndFriends/StreamDeckTools/_build/latest?definitionId=8)  [](https://www.nuget.org/packages/StreamDeckLib/)
[](https://github.com/FritzAndFriends/StreamDeckToolkit/actions?query=workflow%3A%22github+pages%22)

[Intellicode Model](https://prod.intellicode.vsengsaas.visualstudio.com/get?m=409A792BE4F74201806A848409B2984D)
## What Is This?
This is a template to help create plugins for the [Elgato Stream Deck][Stream Deck], using the [Stream Deck SDK][] with [Dotnet Core][].
## Docs
You can read more in the [Docs](https://FritzAndFriends.github.io/StreamDeckToolkit/).
## Pre-Requisites
In order to make use of this template, you will need to have the [Dotnet Core SDK][] (version 2.2.100 or above) installed on your development machine.
While not absolutely necessary, it is **strongly** recommended to have the [Stream Deck Software][] installed, to be able to perform some integration testing of your plugin.
## Install Project Template
### From File System
Installing the template from your filesystem is useful for local testing of the template itself. If you are actively working on the template making changes, this is the route you need to use.
To install, run the following command from the root of the repository.
dotnet new -i Templates/StreamDeck.PluginTemplate.Csharp
To pick up any changes you have made to the template source, you must uninstall the template and reinstall it.
To uninstall, run the following command from the root of the respository.
**Windows:** `dotnet new -u Templates/StreamDeck.PluginTemplate.Csharp`
**OSX/Linux:** `dotnet new -u $PWD/Templates/StreamDeck.PluginTemplate.Csharp`
### From NuGet
dotnet new -i StreamDeckPluginTemplate
- OR -
Install-Package StreamDeckPluginTemplate [-Version x.y.zzz]
## Using the Template
Once the template is installed, open a terminal in the folder of your choice and create a new project.
dotnet new streamdeck-plugin --plugin-name FirstPlugin --uuid com.yourcompany.pluginname.actionname --skipRestore false
Or create a directory in a location of your choice, change to that directory and run the command, which will inherit the directory name as the project name with default values.
dotnet new streamdeck-plugin
## Creating a Plugin Action
The Stream Deck Toolkit provides the functionality that communicates directly with the Stream Deck software. When creating a plugin, you are responsible for creating actions for the Stream Deck buttons to perform. There are two base classes that you can inherit from when creating your action:
1. BaseStreamDeckAction - this class contains all the integrations necessary to communicate with the Stream Deck at the 'barebones' level. Inheriting from this class will give you the greatest control over how your action sends and receives data from the software.
2. BaseStreamDeckActionWithSettingsModel - this class inherits from BaseStreamDeckAction, this class will automate the population of model properties, where type T is defined as the data that is stored when issuing a 'setSettings' event to the Stream Deck software. The property **SettingsModel** will automatically instantiate an instance of class T, so it is best to assign default values when defining your class T. Also, when using the Property Inspector and passing data back and forth, ensure that the properties defined in the settingsModel in JavaScript matches those that you have defined in T for the automatic mapping to occur between both environments.
Your project may contain any number of actions, inheriting from one of the classes above. In order for the Action to be automatically registered on start up, it must bear the **[ActionUuid(Uuid="com.fritzanfriends.pluginname.anotheraction")]** attribute.
Actions must also be manually registered in the **manifest.json** file, with the Uuid that matches ActionUuid attribute.
[Dotnet Core]: https://dotnet.microsoft.com/ "Free, cross-platform application framework"
[Dotnet Core SDK]: https://get.dot.net/ "Download the Dotnet Core SDK or Runtime"
[Stream Deck]: https://www.elgato.com/gaming/stream-deck/ "Elgato's Stream Deck product page"
[Stream Deck SDK]: https://developer.elgato.com/documentation/stream-deck "Elgato's Stream Deck SDK documentation and reference site"
[Stream Deck Software]: https://www.elgato.com/gaming/downloads "Download the Stream Deck desktop software"