spawn-cli 0.1.1__py3-none-any.whl → 0.1.2__py3-none-any.whl
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.
- spawn_cli/cli.py +255 -44
- {spawn_cli-0.1.1.dist-info → spawn_cli-0.1.2.dist-info}/METADATA +1 -1
- {spawn_cli-0.1.1.dist-info → spawn_cli-0.1.2.dist-info}/RECORD +6 -6
- {spawn_cli-0.1.1.dist-info → spawn_cli-0.1.2.dist-info}/WHEEL +0 -0
- {spawn_cli-0.1.1.dist-info → spawn_cli-0.1.2.dist-info}/entry_points.txt +0 -0
- {spawn_cli-0.1.1.dist-info → spawn_cli-0.1.2.dist-info}/top_level.txt +0 -0
spawn_cli/cli.py
CHANGED
|
@@ -20,7 +20,10 @@ def _require_init(target_root: Path) -> None:
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
def build_parser() -> argparse.ArgumentParser:
|
|
23
|
-
parser = argparse.ArgumentParser(
|
|
23
|
+
parser = argparse.ArgumentParser(
|
|
24
|
+
prog="spawn",
|
|
25
|
+
description="Spawn CLI: manage Spawn extensions and IDE adapters in this repository.",
|
|
26
|
+
)
|
|
24
27
|
parser.add_argument(
|
|
25
28
|
"--version",
|
|
26
29
|
action="version",
|
|
@@ -28,55 +31,263 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
28
31
|
)
|
|
29
32
|
sub = parser.add_subparsers(dest="command", required=True)
|
|
30
33
|
|
|
31
|
-
sub.add_parser(
|
|
34
|
+
sub.add_parser(
|
|
35
|
+
"init",
|
|
36
|
+
help="Initialize spawn/ in the current repository",
|
|
37
|
+
description=(
|
|
38
|
+
"Create the spawn/ tree in the repository root "
|
|
39
|
+
"(config, metadata layout, navigation stub)."
|
|
40
|
+
),
|
|
41
|
+
)
|
|
32
42
|
|
|
33
|
-
rules_p = sub.add_parser(
|
|
43
|
+
rules_p = sub.add_parser(
|
|
44
|
+
"rules",
|
|
45
|
+
help="Rebuild navigation mandatory reads from spawn/rules/",
|
|
46
|
+
description="Refresh navigation.yaml from files under spawn/rules/.",
|
|
47
|
+
)
|
|
34
48
|
rules_sub = rules_p.add_subparsers(dest="rules_command", required=True)
|
|
35
|
-
rules_sub.add_parser(
|
|
49
|
+
rules_sub.add_parser(
|
|
50
|
+
"refresh",
|
|
51
|
+
help="Sync spawn/rules/ into navigation.yaml",
|
|
52
|
+
description=(
|
|
53
|
+
"Scan spawn/rules/ and rewrite read-required paths in spawn/navigation.yaml."
|
|
54
|
+
),
|
|
55
|
+
)
|
|
36
56
|
|
|
37
|
-
ide_p = sub.add_parser(
|
|
57
|
+
ide_p = sub.add_parser(
|
|
58
|
+
"ide",
|
|
59
|
+
help="Add, remove, or list IDE adapters registered for this repo",
|
|
60
|
+
description=(
|
|
61
|
+
"Control which IDE keys Spawn configures (rendered metadata under spawn/.metadata/)."
|
|
62
|
+
),
|
|
63
|
+
)
|
|
38
64
|
ide_sub = ide_p.add_subparsers(dest="ide_command", required=True)
|
|
39
|
-
|
|
40
|
-
_ide_add.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
65
|
+
|
|
66
|
+
_ide_add = ide_sub.add_parser(
|
|
67
|
+
"add",
|
|
68
|
+
help="Install metadata rendering for IDE key(s)",
|
|
69
|
+
description="Install metadata rendering for one or more IDE keys (cursor, codex, ...).",
|
|
70
|
+
)
|
|
71
|
+
_ide_add.add_argument(
|
|
72
|
+
"ides",
|
|
73
|
+
nargs="+",
|
|
74
|
+
metavar="IDE",
|
|
75
|
+
help="IDE identifiers to add (canonical keys from Spawn).",
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
_ide_remove = ide_sub.add_parser(
|
|
79
|
+
"remove",
|
|
80
|
+
help="Unregister IDE key(s) and clean vacancy where supported",
|
|
81
|
+
description="Unregister IDE keys and drop rendered outputs when the adapter defines cleanup.",
|
|
82
|
+
)
|
|
83
|
+
_ide_remove.add_argument(
|
|
84
|
+
"ides",
|
|
85
|
+
nargs="+",
|
|
86
|
+
metavar="IDE",
|
|
87
|
+
help="IDE identifiers to remove.",
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
ide_sub.add_parser(
|
|
91
|
+
"list",
|
|
92
|
+
help="Print registered IDE identifiers for this repository",
|
|
93
|
+
description="Print one IDE identifier per line from the Spawn registry.",
|
|
94
|
+
)
|
|
95
|
+
ide_sub.add_parser(
|
|
96
|
+
"list-supported-ides",
|
|
97
|
+
help="Print YAML map of IDE keys to detected capabilities",
|
|
98
|
+
description=(
|
|
99
|
+
"Probe installed IDE adapters on this machine; emit YAML suited for tooling."
|
|
100
|
+
),
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
ext_p = sub.add_parser(
|
|
104
|
+
"extension",
|
|
105
|
+
help="Install, scaffold, upgrade, validate, or list Spawn extensions",
|
|
106
|
+
description=(
|
|
107
|
+
"Manage Spawn extensions under spawn/.extend/ (sources, reinstall, scaffold, checks)."
|
|
108
|
+
),
|
|
109
|
+
)
|
|
47
110
|
ext_sub = ext_p.add_subparsers(dest="ext_command", required=True)
|
|
48
|
-
|
|
49
|
-
_ext_add.
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
111
|
+
|
|
112
|
+
_ext_add = ext_sub.add_parser(
|
|
113
|
+
"add",
|
|
114
|
+
help="Fetch and register an extension (git archive, ZIP, local path)",
|
|
115
|
+
description="Download or copy an extension into spawn/.extend/ and refresh renders.",
|
|
116
|
+
)
|
|
117
|
+
_ext_add.add_argument(
|
|
118
|
+
"path",
|
|
119
|
+
metavar="SOURCE",
|
|
120
|
+
help="Extension source URL, git ref, ZIP path, or local directory/archive.",
|
|
121
|
+
)
|
|
122
|
+
_ext_add.add_argument(
|
|
123
|
+
"--branch",
|
|
124
|
+
default=None,
|
|
125
|
+
metavar="REV",
|
|
126
|
+
help="Git revision to use when the source is a Git URL (ignored for non-git sources).",
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
_ext_update = ext_sub.add_parser(
|
|
130
|
+
"update",
|
|
131
|
+
help="Pull or resync extension content from recorded source.yaml",
|
|
132
|
+
description="Upgrade an installed extension to its configured upstream revision.",
|
|
133
|
+
)
|
|
134
|
+
_ext_update.add_argument(
|
|
135
|
+
"extension_name",
|
|
136
|
+
metavar="NAME",
|
|
137
|
+
help="Installed extension name (directory spawn/.extend/<name>/).",
|
|
138
|
+
)
|
|
139
|
+
|
|
140
|
+
_ext_remove = ext_sub.add_parser(
|
|
141
|
+
"remove",
|
|
142
|
+
help="Unregister and delete an extension from this repo",
|
|
143
|
+
description="Remove spawn/.extend/<name>/ entry and unload extension-side scripts.",
|
|
144
|
+
)
|
|
145
|
+
_ext_remove.add_argument(
|
|
146
|
+
"extension_name",
|
|
147
|
+
metavar="NAME",
|
|
148
|
+
help="Installed extension name to remove.",
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
_ext_reinstall = ext_sub.add_parser(
|
|
152
|
+
"reinstall",
|
|
153
|
+
help="Re-download extension from spawn/.extend/<name>/source.yaml",
|
|
154
|
+
description="Staging reinstall from cached source.yaml (recovery after corrupted tree).",
|
|
155
|
+
)
|
|
156
|
+
_ext_reinstall.add_argument(
|
|
157
|
+
"extension_name",
|
|
158
|
+
metavar="NAME",
|
|
159
|
+
help="Installed extension name to reinstall.",
|
|
160
|
+
)
|
|
161
|
+
|
|
162
|
+
ext_sub.add_parser(
|
|
163
|
+
"list",
|
|
164
|
+
help="Print installed extension names",
|
|
165
|
+
description="Emit one extension name per line.",
|
|
166
|
+
)
|
|
167
|
+
|
|
168
|
+
_ext_init = ext_sub.add_parser(
|
|
169
|
+
"init",
|
|
170
|
+
help="Create a Spawn extension scaffold from a filesystem path",
|
|
171
|
+
description="Lay out skeleton files for a new extension under the chosen directory.",
|
|
172
|
+
)
|
|
173
|
+
_ext_init.add_argument(
|
|
174
|
+
"path",
|
|
175
|
+
nargs="?",
|
|
176
|
+
default=".",
|
|
177
|
+
metavar="PATH",
|
|
178
|
+
help="Directory receiving the scaffold (defaults to '.').",
|
|
179
|
+
)
|
|
180
|
+
_ext_init.add_argument(
|
|
181
|
+
"--name",
|
|
182
|
+
required=True,
|
|
183
|
+
metavar="ID",
|
|
184
|
+
help="Canonical extension id used in spawn/.extend/<id>/ when installed.",
|
|
185
|
+
)
|
|
186
|
+
|
|
187
|
+
_ext_check = ext_sub.add_parser(
|
|
188
|
+
"check",
|
|
189
|
+
help="Lint extension workspace against authoring rules",
|
|
190
|
+
description="Warn on missing declares, dangling paths, skill layout issues.",
|
|
191
|
+
)
|
|
192
|
+
_ext_check.add_argument(
|
|
193
|
+
"path",
|
|
194
|
+
nargs="?",
|
|
195
|
+
default=".",
|
|
196
|
+
metavar="PATH",
|
|
197
|
+
help="Extension project root directory to validate.",
|
|
198
|
+
)
|
|
199
|
+
_ext_check.add_argument(
|
|
200
|
+
"--strict",
|
|
201
|
+
action="store_true",
|
|
202
|
+
help=(
|
|
203
|
+
"Fail on issues that default to warnings "
|
|
204
|
+
"(missing skill files, bad mcp.json, empty file descriptions)."
|
|
205
|
+
),
|
|
206
|
+
)
|
|
207
|
+
|
|
208
|
+
_ext_from_rules = ext_sub.add_parser(
|
|
209
|
+
"from-rules",
|
|
210
|
+
help="Compose an extension scaffold from YAML rules-derived sources",
|
|
211
|
+
description="Hydrate packaged rules into a scaffold under --output.",
|
|
212
|
+
)
|
|
213
|
+
_ext_from_rules.add_argument(
|
|
214
|
+
"source",
|
|
215
|
+
metavar="SOURCE",
|
|
216
|
+
help=(
|
|
217
|
+
"Repository root containing spawn/rules (local dir), "
|
|
218
|
+
"or remote URL/Git ref staged before import."
|
|
219
|
+
),
|
|
220
|
+
)
|
|
221
|
+
_ext_from_rules.add_argument(
|
|
222
|
+
"--name",
|
|
223
|
+
required=True,
|
|
224
|
+
metavar="ID",
|
|
225
|
+
help="Canonical extension id for the generated scaffold.",
|
|
226
|
+
)
|
|
227
|
+
_ext_from_rules.add_argument(
|
|
228
|
+
"--branch",
|
|
229
|
+
default=None,
|
|
230
|
+
metavar="REV",
|
|
231
|
+
help="Revision for Git-backed sources referenced by SOURCE.",
|
|
232
|
+
)
|
|
233
|
+
_ext_from_rules.add_argument(
|
|
234
|
+
"--output",
|
|
235
|
+
default=".",
|
|
236
|
+
metavar="DIR",
|
|
237
|
+
help="Existing directory receiving new extension files.",
|
|
238
|
+
)
|
|
239
|
+
|
|
240
|
+
_ext_health = ext_sub.add_parser(
|
|
241
|
+
"healthcheck",
|
|
242
|
+
help="Verify installed extension manifests and renders",
|
|
243
|
+
description="Smoke-test extension installs (non-zero exit on failure).",
|
|
244
|
+
)
|
|
245
|
+
_ext_health.add_argument(
|
|
246
|
+
"extension_name",
|
|
247
|
+
metavar="NAME",
|
|
248
|
+
help="Installed extension name to diagnose.",
|
|
249
|
+
)
|
|
250
|
+
|
|
251
|
+
build_p = sub.add_parser(
|
|
252
|
+
"build",
|
|
253
|
+
help="Install extensions listed in an aggregate build YAML manifest",
|
|
254
|
+
description="Batch installs driven by YAML enumerating URLs or paths.",
|
|
255
|
+
)
|
|
73
256
|
build_sub = build_p.add_subparsers(dest="build_command", required=True)
|
|
74
|
-
|
|
75
|
-
_build_install.
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
257
|
+
|
|
258
|
+
_build_install = build_sub.add_parser(
|
|
259
|
+
"install",
|
|
260
|
+
help="Resolve manifest entries and spawn extension add each",
|
|
261
|
+
description="Iterate manifest entries calling install-extension logic serially.",
|
|
262
|
+
)
|
|
263
|
+
_build_install.add_argument(
|
|
264
|
+
"path",
|
|
265
|
+
metavar="MANIFEST",
|
|
266
|
+
help="YAML file listing extensions to install.",
|
|
267
|
+
)
|
|
268
|
+
_build_install.add_argument(
|
|
269
|
+
"--branch",
|
|
270
|
+
default=None,
|
|
271
|
+
metavar="REV",
|
|
272
|
+
help="Fallback Git revision for entries omitting explicit branch.",
|
|
273
|
+
)
|
|
274
|
+
|
|
275
|
+
_build_list = build_sub.add_parser(
|
|
276
|
+
"list",
|
|
277
|
+
help="Dry-run: print resolved manifest entries without installing",
|
|
278
|
+
description="Normalize manifest and emit YAML of resolved extension specs.",
|
|
279
|
+
)
|
|
280
|
+
_build_list.add_argument(
|
|
281
|
+
"path",
|
|
282
|
+
metavar="MANIFEST",
|
|
283
|
+
help="YAML aggregate manifest describing extension sources.",
|
|
284
|
+
)
|
|
285
|
+
_build_list.add_argument(
|
|
286
|
+
"--branch",
|
|
287
|
+
default=None,
|
|
288
|
+
metavar="REV",
|
|
289
|
+
help="Fallback Git revision applied when entries lack branch.",
|
|
290
|
+
)
|
|
80
291
|
|
|
81
292
|
return parser
|
|
82
293
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
spawn_cli/__init__.py,sha256=4t_crzhrLum--oyowUMxtjBTzUtWp7oRTF22ewEvJG4,49
|
|
2
|
-
spawn_cli/cli.py,sha256=
|
|
2
|
+
spawn_cli/cli.py,sha256=CvOERql_I_KK7YoN4zNAvxZQ8salaiSVddmWu3R0n7Y,13757
|
|
3
3
|
spawn_cli/errors.py,sha256=1OJx7Ss529EeJkD0WLvNy0I9sKqxDX2bXS6i3mnqN2E,230
|
|
4
4
|
spawn_cli/warnings_display.py,sha256=v4iTUTd4lziJ1Ivxh8-_zbcDaGZdZLEiCcQXo39Ftss,1116
|
|
5
5
|
spawn_cli/core/__init__.py,sha256=a5rOQzNZ55nbXJPXwcTVws20MqhoEAHQ5_Cay1h2mDU,211
|
|
@@ -34,8 +34,8 @@ spawn_cli/models/navigation.py,sha256=S25xqUgnq0uVEKXs7UjpCqBQ9PifkeSRogMsLnkXMq
|
|
|
34
34
|
spawn_cli/models/skill.py,sha256=dnzParuZ0xIZ0PcKmS04WFkuiKti_ml5QGusta9aEJw,701
|
|
35
35
|
spawn_cli/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
36
36
|
spawn_cli/resources/default_core_config.yaml,sha256=ecnGtWB3R0eAYEHVkzZWeuh2_wt9EqsFKZf9BurZGUE,95
|
|
37
|
-
spawn_cli-0.1.
|
|
38
|
-
spawn_cli-0.1.
|
|
39
|
-
spawn_cli-0.1.
|
|
40
|
-
spawn_cli-0.1.
|
|
41
|
-
spawn_cli-0.1.
|
|
37
|
+
spawn_cli-0.1.2.dist-info/METADATA,sha256=LNBz-Tqg0FrzMF64ct4stK73C6kKhx4LjXJGZcUx7ds,337
|
|
38
|
+
spawn_cli-0.1.2.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
39
|
+
spawn_cli-0.1.2.dist-info/entry_points.txt,sha256=LPd7krLFNds0otEoDGEJpvDOiubPekGKJvMgcpvQd7M,45
|
|
40
|
+
spawn_cli-0.1.2.dist-info/top_level.txt,sha256=IzK1liuh9tgdhkh6yDvGQvtBDvKYXzSQ86Ty-a50lT8,10
|
|
41
|
+
spawn_cli-0.1.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|