Metadata-Version: 2.2
Name: streamdeck-plugin-sdk-cli
Version: 0.1.0
Summary: CLI util to create the scaffolding of a Stream Deck plugin, validate it, and pack it to be ready for install.
Author-email: strohganoff <you@example.com>
License: MIT License
        
        Copyright (c) 2024 strohganoff
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/strohganoff/python-streamdeck-plugin-sdk-cli
Project-URL: Repository, https://github.com/strohganoff/python-streamdeck-plugin-sdk-cli
Project-URL: Documentation, https://docs.elgato.com/streamdeck/sdk/introduction/getting-started/
Project-URL: Issues, https://github.com/strohganoff/python-streamdeck-plugin-sdk-cli/issues
Keywords: python,sdk,streamdeck,streamdeck_sdk,streamdeck_plugin_sdk,stream deck,stream deck sdk,stream deck plugin sdk,streamdeck-sdk,streamdeck-plugin-sdk,stream-deck,stream-deck-sdk,stream-deck-plugin-sdk,elgato,elgato sdk,elgato plugin,elgato sdk,elgato stream deck,elgato stream deck sdk,elgato stream deck plugin sdk
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: MacOS X
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: copier>=9.4.1
Requires-Dist: pathspec>=0.12.1
Requires-Dist: pydantic>=2.9.2
Requires-Dist: pydantic_core>=2.23.4
Requires-Dist: typer>=0.12.5
Provides-Extra: dev
Requires-Dist: pytest>=8.3.3; extra == "dev"
Requires-Dist: pytest-cov>=5.0.0; extra == "dev"
Requires-Dist: pytest-mock>=3.14.0; extra == "dev"
Requires-Dist: pytest-sugar>=1.0.0; extra == "dev"
Requires-Dist: tox>=4.23.2; extra == "dev"

# Python StreamDeck Plugin SDK CLI

A command-line interface (CLI) tool for packaging Elgato Stream Deck plugins. This tool helps automate the process of creating plugin packages using the [Python plugin SDK](https://github.com/strohganoff/python-streamdeck-plugin-sdk) library.

## Features

- Create a fresh Python plugin project with scaffolding provided by a template.
- Validate a plugin's structure.
- Pack Stream Deck plugins into distributable .streamDeckPlugin files
- Support for `.packignore` file to exclude unwanted files/directories
- Automatic plugin UUID directory structure creation

## Installation

To install the required dependencies, run:
```bash
pip install streamdeck-plugin-sdk-cli
```

## Usage

### Create a New Plugin
To create a new Stream Deck plugin project, run:
```bash
streamdeck-cli create
```

This will create a new project at the current directory from the template at https://github.com/strohganoff/python-streamdeck-plugin-template.git.


### Validate a Plugin
To validate the plugin manifest and directory structure, run:
```bash
streamdeck-cli validate /path/to/plugin
```

Note that the manifest.json file must be updated and saved as a proper json file (no comments) to pass validation.

### Pack a Plugin
To pack the plugin into a .streamDeckPlugin file, run:
```bash
streamdeck-cli pack /path/to/plugin --output /path/to/output
```

If you don't pass in a version argument, the script will automatically look up the plugin version in the manifest.json file to place the release package into a directory named for that version under the specified output directory.

If there is already a release directory with that version, the script will handle giving a subversion (or incrementing the subversion) to apply to the directory name.
So if a version '0.0.1' has already been packed, a new release directory will be saved to named '0.0.1-1', but the version in the manifest.json file will be unchanged.
If a release was already saved to directory '0.0.1-1', then a new release directory will be saved to named '0.0.1-2'.

#### Next Step
Simply double-click the .streamDeckPlugin file, which will load up the plugin in the Stream Deck application.

#### Pack for debug mode
To pack the plugin in debug mode, which enables remote debugging capabilities, use the `--debug` flag:

```bash
streamdeck-cli pack /path/to/plugin --debug --debug-port 5679
```

This will create a flag file named `.debug` in the packed plugin containing the specified port.

When this file is included, the plugin will wait for a debugger to attach at that port before starting. You can use tools like VS Code's Python debugger or PyCharm's remote debugger to connect to it.

## Contributing
Contributions are welcome! Please open an issue or submit a pull request on GitHub.

## License
This project is licensed under the MIT License. See the LICENSE file for details.

