@streamfox/create-streamfox-plugin 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 stream-fox
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,95 @@
1
+ # create-streamfox-plugin
2
+
3
+ CLI scaffolder for StreamFox plugin projects.
4
+
5
+ Generated projects target the current `@streamfox/plugin-sdk` contract:
6
+
7
+ - unified stream transport model (`supportedTransports` + `stream.transport`)
8
+ - optional installer config with `configurationRequired`
9
+ - serve integration URLs (`url`, `installURL`, `launchURL`)
10
+
11
+ ## Install
12
+
13
+ ```bash
14
+ npm i -g @streamfox/create-streamfox-plugin
15
+ ```
16
+
17
+ The installed command stays:
18
+
19
+ ```bash
20
+ create-streamfox-plugin
21
+ ```
22
+
23
+ ## Usage
24
+
25
+ Interactive:
26
+
27
+ ```bash
28
+ npx @streamfox/create-streamfox-plugin
29
+ ```
30
+
31
+ Or after global install:
32
+
33
+ ```bash
34
+ create-streamfox-plugin
35
+ ```
36
+
37
+ Non-interactive:
38
+
39
+ ```bash
40
+ create-streamfox-plugin my-plugin --yes
41
+ ```
42
+
43
+ ## CLI Options
44
+
45
+ | Option | Type | Default | Notes |
46
+ | ------------------------ | ------------- | ---------------------- | ------------------------------------------------------------------------ |
47
+ | `[directory]` | positional | `my-media-plugin` | Output directory. |
48
+ | `--ts` | flag | `true` (unless `--js`) | Generate TypeScript template. |
49
+ | `--js` | flag | no | Generate JavaScript template. |
50
+ | `--preset <preset>` | enum | `meta` | One of: `catalog`, `meta`, `stream`, `subtitles`, `plugin_catalog`. |
51
+ | `--capabilities <a,b,c>` | csv enum list | none | Adds extra capabilities on top of preset. |
52
+ | `--advanced` | flag | `false` | Generate richer examples (torrent/usenet/archive/trailers/distribution). |
53
+ | `--sdk-version <range>` | string | `^0.2.0` | Dependency range for `@streamfox/plugin-sdk`. |
54
+ | `--yes` | flag | `false` | Skip prompts and use provided/default values. |
55
+ | `-v, --version` | flag | no | Display the current CLI version. |
56
+
57
+ ## Examples
58
+
59
+ Create subtitles preset with advanced examples:
60
+
61
+ ```bash
62
+ create-streamfox-plugin streamfox-opensubs \
63
+ --ts \
64
+ --preset subtitles \
65
+ --capabilities meta,stream \
66
+ --advanced \
67
+ --sdk-version ^0.2.0 \
68
+ --yes
69
+ ```
70
+
71
+ ## What Gets Generated
72
+
73
+ - `src/plugin.(ts|js)` with selected capabilities and handlers
74
+ - `src/server.(ts|js)` that calls `serve(...)` and prints:
75
+ - manifest URL
76
+ - install deeplink URL
77
+ - launch URL
78
+ - `test/plugin.test.(ts|js)` smoke test (`/manifest`, `/studio-config`)
79
+ - `README.md`, `package.json`, `.prettierrc.json`, `.prettierignore`, and (for TS) `tsconfig.json`
80
+
81
+ ## Development
82
+
83
+ ```bash
84
+ npm install
85
+ npm run format
86
+ npm run build
87
+ npm test
88
+ ```
89
+
90
+ Local manual test:
91
+
92
+ ```bash
93
+ npm link
94
+ create-streamfox-plugin demo-plugin --yes
95
+ ```