feat: add an add-action command #57
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi 👋
I'm not entirely sure this is something you're looking for, or accepting on this repository - but I added an
add-actioncommand to the CLI app for my own benefit while creating a SD plugin, and I figured I submit this as it might help others as well.The
streamdeck add-actioncommand check if it's in a plugin directory, then adds a new action source file, modifies the mainplugin.tsto import that and register the action (before thestreamdeck.connecthappens, optionally creates a property inspector file, and adds the action to the manifest.You can also add the input as parameters, so to create a new action with a one-liner. Without params, it'll use inquirer to ask for the needed details.
Example:
I've been using this for the MuteDeck plugin, and works like a charm. 😊