@rom-weaver/cli 0.10.2 → 0.11.1

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.
@@ -0,0 +1,763 @@
1
+
2
+ use builtin;
3
+ use str;
4
+
5
+ set edit:completion:arg-completer[rom-weaver] = {|@words|
6
+ fn spaces {|n|
7
+ builtin:repeat $n ' ' | str:join ''
8
+ }
9
+ fn cand {|text desc|
10
+ edit:complex-candidate $text &display=$text' '(spaces (- 14 (wcswidth $text)))$desc
11
+ }
12
+ var command = 'rom-weaver'
13
+ for word $words[1..-1] {
14
+ if (str:has-prefix $word '-') {
15
+ break
16
+ }
17
+ set command = $command';'$word
18
+ }
19
+ var completions = [
20
+ &'rom-weaver'= {
21
+ cand --log-level 'How much rom-weaver logs to stderr. Separate from the normal output [default: off]'
22
+ cand --json 'Print one JSON object per line instead of human-readable output'
23
+ cand --progress 'Show progress even when output is piped to a file or another program'
24
+ cand --no-progress 'Hide progress'
25
+ cand -v 'Log more: -v for info, -vv for debug, -vvv for trace'
26
+ cand --verbose 'Log more: -v for info, -vv for debug, -vvv for trace'
27
+ cand -q 'Log errors only'
28
+ cand --quiet 'Log errors only'
29
+ cand --dep-trace 'Also log trace output from bundled libraries (for bug reports)'
30
+ cand --color 'Keep colors even when output is piped'
31
+ cand --no-color 'Turn colors off'
32
+ cand -h 'Print help (see more with ''--help'')'
33
+ cand --help 'Print help (see more with ''--help'')'
34
+ cand -V 'Print version'
35
+ cand --version 'Print version'
36
+ cand probe 'Identify a file: its format, its platform, and any header it carries'
37
+ cand inspect 'Identify a file: its format, its platform, and any header it carries'
38
+ cand extract 'Unpack an archive or disc image'
39
+ cand checksum 'Compute checksums for a file, or for a ROM inside an archive'
40
+ cand ingest 'Sort a file into ROMs and patches, unpacking and hashing along the way'
41
+ cand compress 'Pack files into an archive or a compressed disc image'
42
+ cand trim 'Cut the padding off a ROM, or put it back'
43
+ cand patch 'Apply, create, or check ROM patches'
44
+ cand bundle 'Build and read rom-weaver-bundle.json patch recipes'
45
+ cand tools 'One-off recovery tools'
46
+ cand plan-extract-batch 'Plan a memory-/thread-aware concurrent extraction schedule from per-job source sizes (no I/O)'
47
+ cand weave 'Apply one or more patches to a ROM, in order (same as `patch apply`)'
48
+ cand completions 'Print a tab-completion script for your shell'
49
+ cand help 'Print this message or the help of the given subcommand(s)'
50
+ }
51
+ &'rom-weaver;probe'= {
52
+ cand -i 'File to identify. Use - to read from stdin'
53
+ cand --input 'File to identify. Use - to read from stdin'
54
+ cand -s 'Pick which file inside the archive to use, by exact name, prefix, or glob (repeatable)'
55
+ cand --select 'Pick which file inside the archive to use, by exact name, prefix, or glob (repeatable)'
56
+ cand --filter 'Consider only files that look like a rom or a patch, judged by extension (repeatable, comma-separable)'
57
+ cand --log-level 'How much rom-weaver logs to stderr. Separate from the normal output [default: off]'
58
+ cand --no-extract 'Do not look inside archives; identify the file itself'
59
+ cand --no-ignore 'Also consider files normally skipped inside archives: readmes, images, checksum sidecars, and OS clutter such as .DS_Store'
60
+ cand --json 'Print one JSON object per line instead of human-readable output'
61
+ cand --progress 'Show progress even when output is piped to a file or another program'
62
+ cand --no-progress 'Hide progress'
63
+ cand -v 'Log more: -v for info, -vv for debug, -vvv for trace'
64
+ cand --verbose 'Log more: -v for info, -vv for debug, -vvv for trace'
65
+ cand -q 'Log errors only'
66
+ cand --quiet 'Log errors only'
67
+ cand --dep-trace 'Also log trace output from bundled libraries (for bug reports)'
68
+ cand --color 'Keep colors even when output is piped'
69
+ cand --no-color 'Turn colors off'
70
+ cand -h 'Print help (see more with ''--help'')'
71
+ cand --help 'Print help (see more with ''--help'')'
72
+ }
73
+ &'rom-weaver;inspect'= {
74
+ cand -i 'File to identify. Use - to read from stdin'
75
+ cand --input 'File to identify. Use - to read from stdin'
76
+ cand -s 'Pick which file inside the archive to use, by exact name, prefix, or glob (repeatable)'
77
+ cand --select 'Pick which file inside the archive to use, by exact name, prefix, or glob (repeatable)'
78
+ cand --filter 'Consider only files that look like a rom or a patch, judged by extension (repeatable, comma-separable)'
79
+ cand --log-level 'How much rom-weaver logs to stderr. Separate from the normal output [default: off]'
80
+ cand --no-extract 'Do not look inside archives; identify the file itself'
81
+ cand --no-ignore 'Also consider files normally skipped inside archives: readmes, images, checksum sidecars, and OS clutter such as .DS_Store'
82
+ cand --json 'Print one JSON object per line instead of human-readable output'
83
+ cand --progress 'Show progress even when output is piped to a file or another program'
84
+ cand --no-progress 'Hide progress'
85
+ cand -v 'Log more: -v for info, -vv for debug, -vvv for trace'
86
+ cand --verbose 'Log more: -v for info, -vv for debug, -vvv for trace'
87
+ cand -q 'Log errors only'
88
+ cand --quiet 'Log errors only'
89
+ cand --dep-trace 'Also log trace output from bundled libraries (for bug reports)'
90
+ cand --color 'Keep colors even when output is piped'
91
+ cand --no-color 'Turn colors off'
92
+ cand -h 'Print help (see more with ''--help'')'
93
+ cand --help 'Print help (see more with ''--help'')'
94
+ }
95
+ &'rom-weaver;extract'= {
96
+ cand -i 'Archive or disc image to unpack'
97
+ cand --input 'Archive or disc image to unpack'
98
+ cand -s 'Extract only these files, by exact name, prefix, or glob (repeatable). For example: --select ''game.disc0?.bin'''
99
+ cand --select 'Extract only these files, by exact name, prefix, or glob (repeatable). For example: --select ''game.disc0?.bin'''
100
+ cand --filter 'Extract only files that look like a rom or a patch, judged by extension (repeatable, comma-separable)'
101
+ cand -o 'Directory to write the extracted files into'
102
+ cand --output 'Directory to write the extracted files into'
103
+ cand --checksum 'Also hash every extracted file (repeatable, comma-separable)'
104
+ cand --checksum-rom 'Like --checksum, but hash only the ROMs and skip sidecar files. Ignored when --checksum is also given'
105
+ cand -j 'How many threads to use at most. auto uses every core; a format may still use fewer'
106
+ cand --threads 'How many threads to use at most. auto uses every core; a format may still use fewer'
107
+ cand --log-level 'How much rom-weaver logs to stderr. Separate from the normal output [default: off]'
108
+ cand --split-bin 'Write a CD-format CHD as a CUE plus one BIN per track (*.trackNN.bin), rather than one merged BIN'
109
+ cand --no-ignore 'Also consider files normally skipped inside archives: readmes, images, checksum sidecars, and OS clutter such as .DS_Store'
110
+ cand --no-nested-extract 'Stop after one layer; leave any archive found inside the input packed'
111
+ cand --force 'Overwrite files already in the output directory (without this, extraction stops instead)'
112
+ cand --probe 'Also report the format and platform of what was extracted, and fail if a lone payload matches no known platform'
113
+ cand --json 'Print one JSON object per line instead of human-readable output'
114
+ cand --progress 'Show progress even when output is piped to a file or another program'
115
+ cand --no-progress 'Hide progress'
116
+ cand -v 'Log more: -v for info, -vv for debug, -vvv for trace'
117
+ cand --verbose 'Log more: -v for info, -vv for debug, -vvv for trace'
118
+ cand -q 'Log errors only'
119
+ cand --quiet 'Log errors only'
120
+ cand --dep-trace 'Also log trace output from bundled libraries (for bug reports)'
121
+ cand --color 'Keep colors even when output is piped'
122
+ cand --no-color 'Turn colors off'
123
+ cand -h 'Print help (see more with ''--help'')'
124
+ cand --help 'Print help (see more with ''--help'')'
125
+ }
126
+ &'rom-weaver;checksum'= {
127
+ cand -i 'File to hash. Use - to read from stdin'
128
+ cand --input 'File to hash. Use - to read from stdin'
129
+ cand -a 'Which checksum to compute: crc32, md5, sha1, sha256, blake3, crc32c, crc16, or adler32 (repeatable, comma-separable)'
130
+ cand --algo 'Which checksum to compute: crc32, md5, sha1, sha256, blake3, crc32c, crc16, or adler32 (repeatable, comma-separable)'
131
+ cand -s 'Pick which file inside the archive to use, by exact name, prefix, or glob (repeatable)'
132
+ cand --select 'Pick which file inside the archive to use, by exact name, prefix, or glob (repeatable)'
133
+ cand --filter 'Consider only files that look like a rom or a patch, judged by extension (repeatable, comma-separable)'
134
+ cand --start 'Start hashing at this byte offset, counting from 0'
135
+ cand --length 'How many bytes to hash from --start. Defaults to the rest of the file'
136
+ cand -j 'How many threads to use at most. auto uses every core; a format may still use fewer'
137
+ cand --threads 'How many threads to use at most. auto uses every core; a format may still use fewer'
138
+ cand --log-level 'How much rom-weaver logs to stderr. Separate from the normal output [default: off]'
139
+ cand --no-extract 'Do not look inside archives; hash the file itself'
140
+ cand --no-ignore 'Also consider files normally skipped inside archives: readmes, images, checksum sidecars, and OS clutter such as .DS_Store'
141
+ cand --no-trim-fix 'Skip the extra checksums computed for how a trimmable ROM would hash trimmed or untrimmed'
142
+ cand --probe 'Also report the platform of the hashed bytes, and fail if it matches no known platform'
143
+ cand --json 'Print one JSON object per line instead of human-readable output'
144
+ cand --progress 'Show progress even when output is piped to a file or another program'
145
+ cand --no-progress 'Hide progress'
146
+ cand -v 'Log more: -v for info, -vv for debug, -vvv for trace'
147
+ cand --verbose 'Log more: -v for info, -vv for debug, -vvv for trace'
148
+ cand -q 'Log errors only'
149
+ cand --quiet 'Log errors only'
150
+ cand --dep-trace 'Also log trace output from bundled libraries (for bug reports)'
151
+ cand --color 'Keep colors even when output is piped'
152
+ cand --no-color 'Turn colors off'
153
+ cand -h 'Print help (see more with ''--help'')'
154
+ cand --help 'Print help (see more with ''--help'')'
155
+ }
156
+ &'rom-weaver;ingest'= {
157
+ cand -i 'File to sort into ROMs and patches'
158
+ cand --input 'File to sort into ROMs and patches'
159
+ cand -o 'Directory to write anything unpacked along the way into'
160
+ cand --output 'Directory to write anything unpacked along the way into'
161
+ cand -s 'Pick which ROM to use when the archive holds more than one, by exact name, prefix, or glob (repeatable)'
162
+ cand --select 'Pick which ROM to use when the archive holds more than one, by exact name, prefix, or glob (repeatable)'
163
+ cand --sidecar-name 'Optional loose patch names to match against `source` without ingesting it. This keeps the browser''s sibling-sidecar lookup on the ingest command surface while reusing Rust''s matcher'
164
+ cand --split-bin 'For a multi-track CD-format CHD, write one BIN per track (--split-bin) or one merged BIN (--split-bin false). Omit to be asked'
165
+ cand --checksum 'Which checksums to compute for each ROM found (repeatable, comma-separable) [default: crc32,md5,sha1]'
166
+ cand -j 'How many threads to use at most. auto uses every core; a format may still use fewer'
167
+ cand --threads 'How many threads to use at most. auto uses every core; a format may still use fewer'
168
+ cand --log-level 'How much rom-weaver logs to stderr. Separate from the normal output [default: off]'
169
+ cand --sidecar-only 'sidecar-only'
170
+ cand --no-ignore 'Also consider files normally skipped inside archives: readmes, images, checksum sidecars, and OS clutter such as .DS_Store'
171
+ cand --no-nested-extract 'Stop after one layer; leave any archive found inside the input packed'
172
+ cand --json 'Print one JSON object per line instead of human-readable output'
173
+ cand --progress 'Show progress even when output is piped to a file or another program'
174
+ cand --no-progress 'Hide progress'
175
+ cand -v 'Log more: -v for info, -vv for debug, -vvv for trace'
176
+ cand --verbose 'Log more: -v for info, -vv for debug, -vvv for trace'
177
+ cand -q 'Log errors only'
178
+ cand --quiet 'Log errors only'
179
+ cand --dep-trace 'Also log trace output from bundled libraries (for bug reports)'
180
+ cand --color 'Keep colors even when output is piped'
181
+ cand --no-color 'Turn colors off'
182
+ cand -h 'Print help (see more with ''--help'')'
183
+ cand --help 'Print help (see more with ''--help'')'
184
+ }
185
+ &'rom-weaver;compress'= {
186
+ cand -i 'File to put in the archive; repeat for each one. For a disc image, pass the .cue or .gdi alone and its tracks come along'
187
+ cand --input 'File to put in the archive; repeat for each one. For a disc image, pass the .cue or .gdi alone and its tracks come along'
188
+ cand -f 'Output format, such as zip, 7z, chd, rvz, or z3ds [default: from the --output extension]'
189
+ cand --format 'Output format, such as zip, 7z, chd, rvz, or z3ds [default: from the --output extension]'
190
+ cand -o 'Where to write the archive'
191
+ cand --output 'Where to write the archive'
192
+ cand --codec 'Compression method to use, as codec or codec:level (repeatable, comma-separable)'
193
+ cand --level 'How hard to compress: min, very-low, low, medium, high, very-high, or max'
194
+ cand -j 'How many threads to use at most. auto uses every core; a format may still use fewer'
195
+ cand --threads 'How many threads to use at most. auto uses every core; a format may still use fewer'
196
+ cand --log-level 'How much rom-weaver logs to stderr. Separate from the normal output [default: off]'
197
+ cand --json 'Print one JSON object per line instead of human-readable output'
198
+ cand --progress 'Show progress even when output is piped to a file or another program'
199
+ cand --no-progress 'Hide progress'
200
+ cand -v 'Log more: -v for info, -vv for debug, -vvv for trace'
201
+ cand --verbose 'Log more: -v for info, -vv for debug, -vvv for trace'
202
+ cand -q 'Log errors only'
203
+ cand --quiet 'Log errors only'
204
+ cand --dep-trace 'Also log trace output from bundled libraries (for bug reports)'
205
+ cand --color 'Keep colors even when output is piped'
206
+ cand --no-color 'Turn colors off'
207
+ cand -h 'Print help (see more with ''--help'')'
208
+ cand --help 'Print help (see more with ''--help'')'
209
+ }
210
+ &'rom-weaver;trim'= {
211
+ cand -i 'File or folder to trim. Repeat for each one'
212
+ cand --input 'File or folder to trim. Repeat for each one'
213
+ cand -o 'Where to write the trimmed file. Only valid with a single trimmable input'
214
+ cand --output 'Where to write the trimmed file. Only valid with a single trimmable input'
215
+ cand -e 'Save next to each original under this extension. {ext} stands for the original one, as in trim.{ext}'
216
+ cand --extension 'Save next to each original under this extension. {ext} stands for the original one, as in trim.{ext}'
217
+ cand -j 'How many threads to use at most. auto uses every core; a format may still use fewer'
218
+ cand --threads 'How many threads to use at most. auto uses every core; a format may still use fewer'
219
+ cand --log-level 'How much rom-weaver logs to stderr. Separate from the normal output [default: off]'
220
+ cand --in-place 'Overwrite the original instead of writing a new file'
221
+ cand -n 'Report what would be trimmed without writing anything'
222
+ cand --dry-run 'Report what would be trimmed without writing anything'
223
+ cand --revert 'Pad a trimmed file back to full size (NDS, GBA, and 3DS only)'
224
+ cand --untrim 'Pad a trimmed file back to full size (NDS, GBA, and 3DS only)'
225
+ cand --restore 'Pad a trimmed file back to full size (NDS, GBA, and 3DS only)'
226
+ cand --no-recursive 'When an input is a folder, look only at its top level'
227
+ cand --no-filter 'Consider every file inside an archive, not just the ones that look like ROMs'
228
+ cand --no-extract 'Do not look inside archives; trim only the files named directly'
229
+ cand --revert-marker 'Add a small footer recording what was cut, so --revert can restore the original exactly'
230
+ cand --reversible 'Add a small footer recording what was cut, so --revert can restore the original exactly'
231
+ cand --json 'Print one JSON object per line instead of human-readable output'
232
+ cand --progress 'Show progress even when output is piped to a file or another program'
233
+ cand --no-progress 'Hide progress'
234
+ cand -v 'Log more: -v for info, -vv for debug, -vvv for trace'
235
+ cand --verbose 'Log more: -v for info, -vv for debug, -vvv for trace'
236
+ cand -q 'Log errors only'
237
+ cand --quiet 'Log errors only'
238
+ cand --dep-trace 'Also log trace output from bundled libraries (for bug reports)'
239
+ cand --color 'Keep colors even when output is piped'
240
+ cand --no-color 'Turn colors off'
241
+ cand -h 'Print help (see more with ''--help'')'
242
+ cand --help 'Print help (see more with ''--help'')'
243
+ }
244
+ &'rom-weaver;patch'= {
245
+ cand --log-level 'How much rom-weaver logs to stderr. Separate from the normal output [default: off]'
246
+ cand --json 'Print one JSON object per line instead of human-readable output'
247
+ cand --progress 'Show progress even when output is piped to a file or another program'
248
+ cand --no-progress 'Hide progress'
249
+ cand -v 'Log more: -v for info, -vv for debug, -vvv for trace'
250
+ cand --verbose 'Log more: -v for info, -vv for debug, -vvv for trace'
251
+ cand -q 'Log errors only'
252
+ cand --quiet 'Log errors only'
253
+ cand --dep-trace 'Also log trace output from bundled libraries (for bug reports)'
254
+ cand --color 'Keep colors even when output is piped'
255
+ cand --no-color 'Turn colors off'
256
+ cand -h 'Print help'
257
+ cand --help 'Print help'
258
+ cand apply 'Apply one or more patches to a ROM, in order'
259
+ cand weave 'Apply one or more patches to a ROM, in order'
260
+ cand validate 'Check that patches would apply cleanly, without writing anything'
261
+ cand create 'Build a patch from an original ROM and a changed one'
262
+ cand help 'Print this message or the help of the given subcommand(s)'
263
+ }
264
+ &'rom-weaver;patch;apply'= {
265
+ cand -i 'ROM to patch. May be an archive, a disc sheet (.cue/.gdi), or a bundle'
266
+ cand --input 'ROM to patch. May be an archive, a disc sheet (.cue/.gdi), or a bundle'
267
+ cand -s 'Pick which file to use when the ROM or a patch is inside an archive, by exact name, prefix, or glob (repeatable)'
268
+ cand --select 'Pick which file to use when the ROM or a patch is inside an archive, by exact name, prefix, or glob (repeatable)'
269
+ cand --target 'For a .cue or .gdi input, which track gets the patch. Matched like --select and must hit exactly one track'
270
+ cand --filter 'Consider only files that look like a rom or a patch, judged by extension (repeatable, comma-separable)'
271
+ cand --patch 'Patch to apply. Repeat once per patch; they run in the order given'
272
+ cand -o 'Where to write the patched ROM. Optional when a bundle already names the output'
273
+ cand --output 'Where to write the patched ROM. Optional when a bundle already names the output'
274
+ cand --bundle 'Follow a rom-weaver-bundle.json recipe: a file path, or an http(s) URL'
275
+ cand --with 'Turn on a bundle patch the bundle leaves off by default, matched by name or file name (repeatable)'
276
+ cand --without 'Turn off a bundle patch, matched by name or file name (repeatable)'
277
+ cand --compress-format 'Format to compress the patched ROM into [default: from the --output extension]'
278
+ cand --compress-codec 'Compression method to use, as codec or codec:level (repeatable, comma-separable)'
279
+ cand --compress-level 'How hard to compress: min, very-low, low, medium, high, very-high, or max [default: max]'
280
+ cand --assume-in 'Take this checksum on trust instead of reading the ROM to compute it, as in crc32=1234abcd (repeatable, comma-separable)'
281
+ cand --expect-in 'Stop unless the ROM about to be patched has this checksum, as in crc32=1234abcd (repeatable, comma-separable)'
282
+ cand --patch-header 'Whether a patch applies to the ROM with or without its copier header: auto, keep, or strip [default: auto]'
283
+ cand --patch-basis 'Which ROM the preceding --patch was built against: auto, base, or previous [default: auto]'
284
+ cand --output-header 'Whether the finished ROM keeps its copier header: auto, keep, or strip [default: auto]'
285
+ cand --n64-byte-order 'Byte order to put an N64 ROM in for each patch: auto, keep, big-endian, little-endian, or byte-swapped [default: auto]'
286
+ cand --expect-out 'Fail unless the patched ROM has this checksum, as in sha1=abc... (repeatable, comma-separable)'
287
+ cand --code 'Game Genie or GameShark/Pro Action Replay code to bake into the ROM. Repeat for each code'
288
+ cand --code-system 'Console the --code values are for (nes, snes, genesis, gameboy), when the ROM header does not say'
289
+ cand --code-kind 'Which cheat scheme the --code values use: auto, game-genie, or gameshark/par'
290
+ cand --emit-bundle 'Also write a rom-weaver-bundle.json recording this run, so someone else can repeat it'
291
+ cand -j 'How many threads to use at most. auto uses every core; a format may still use fewer'
292
+ cand --threads 'How many threads to use at most. auto uses every core; a format may still use fewer'
293
+ cand --log-level 'How much rom-weaver logs to stderr. Separate from the normal output [default: off]'
294
+ cand --no-extract 'Do not look inside archives; treat the input and every patch as raw files'
295
+ cand --no-ignore 'Also consider files normally skipped inside archives: readmes, images, checksum sidecars, and OS clutter such as .DS_Store'
296
+ cand --no-compress 'Write a plain ROM instead of compressing the result'
297
+ cand --repair-checksum 'Recompute the ROM''s internal header checksum afterwards, so the console does not reject it (SNES, NES, GB, GBA, Mega Drive, SMS, N64, NDS)'
298
+ cand --ignore-checksum-validation 'Apply the patch even when its own checksums do not match. Can produce a broken ROM'
299
+ cand --tui 'Ask for each patch''s name, version, and author, then apply and write a bundle. Needs a terminal'
300
+ cand --json 'Print one JSON object per line instead of human-readable output'
301
+ cand --progress 'Show progress even when output is piped to a file or another program'
302
+ cand --no-progress 'Hide progress'
303
+ cand -v 'Log more: -v for info, -vv for debug, -vvv for trace'
304
+ cand --verbose 'Log more: -v for info, -vv for debug, -vvv for trace'
305
+ cand -q 'Log errors only'
306
+ cand --quiet 'Log errors only'
307
+ cand --dep-trace 'Also log trace output from bundled libraries (for bug reports)'
308
+ cand --color 'Keep colors even when output is piped'
309
+ cand --no-color 'Turn colors off'
310
+ cand -h 'Print help (see more with ''--help'')'
311
+ cand --help 'Print help (see more with ''--help'')'
312
+ }
313
+ &'rom-weaver;patch;weave'= {
314
+ cand -i 'ROM to patch. May be an archive, a disc sheet (.cue/.gdi), or a bundle'
315
+ cand --input 'ROM to patch. May be an archive, a disc sheet (.cue/.gdi), or a bundle'
316
+ cand -s 'Pick which file to use when the ROM or a patch is inside an archive, by exact name, prefix, or glob (repeatable)'
317
+ cand --select 'Pick which file to use when the ROM or a patch is inside an archive, by exact name, prefix, or glob (repeatable)'
318
+ cand --target 'For a .cue or .gdi input, which track gets the patch. Matched like --select and must hit exactly one track'
319
+ cand --filter 'Consider only files that look like a rom or a patch, judged by extension (repeatable, comma-separable)'
320
+ cand --patch 'Patch to apply. Repeat once per patch; they run in the order given'
321
+ cand -o 'Where to write the patched ROM. Optional when a bundle already names the output'
322
+ cand --output 'Where to write the patched ROM. Optional when a bundle already names the output'
323
+ cand --bundle 'Follow a rom-weaver-bundle.json recipe: a file path, or an http(s) URL'
324
+ cand --with 'Turn on a bundle patch the bundle leaves off by default, matched by name or file name (repeatable)'
325
+ cand --without 'Turn off a bundle patch, matched by name or file name (repeatable)'
326
+ cand --compress-format 'Format to compress the patched ROM into [default: from the --output extension]'
327
+ cand --compress-codec 'Compression method to use, as codec or codec:level (repeatable, comma-separable)'
328
+ cand --compress-level 'How hard to compress: min, very-low, low, medium, high, very-high, or max [default: max]'
329
+ cand --assume-in 'Take this checksum on trust instead of reading the ROM to compute it, as in crc32=1234abcd (repeatable, comma-separable)'
330
+ cand --expect-in 'Stop unless the ROM about to be patched has this checksum, as in crc32=1234abcd (repeatable, comma-separable)'
331
+ cand --patch-header 'Whether a patch applies to the ROM with or without its copier header: auto, keep, or strip [default: auto]'
332
+ cand --patch-basis 'Which ROM the preceding --patch was built against: auto, base, or previous [default: auto]'
333
+ cand --output-header 'Whether the finished ROM keeps its copier header: auto, keep, or strip [default: auto]'
334
+ cand --n64-byte-order 'Byte order to put an N64 ROM in for each patch: auto, keep, big-endian, little-endian, or byte-swapped [default: auto]'
335
+ cand --expect-out 'Fail unless the patched ROM has this checksum, as in sha1=abc... (repeatable, comma-separable)'
336
+ cand --code 'Game Genie or GameShark/Pro Action Replay code to bake into the ROM. Repeat for each code'
337
+ cand --code-system 'Console the --code values are for (nes, snes, genesis, gameboy), when the ROM header does not say'
338
+ cand --code-kind 'Which cheat scheme the --code values use: auto, game-genie, or gameshark/par'
339
+ cand --emit-bundle 'Also write a rom-weaver-bundle.json recording this run, so someone else can repeat it'
340
+ cand -j 'How many threads to use at most. auto uses every core; a format may still use fewer'
341
+ cand --threads 'How many threads to use at most. auto uses every core; a format may still use fewer'
342
+ cand --log-level 'How much rom-weaver logs to stderr. Separate from the normal output [default: off]'
343
+ cand --no-extract 'Do not look inside archives; treat the input and every patch as raw files'
344
+ cand --no-ignore 'Also consider files normally skipped inside archives: readmes, images, checksum sidecars, and OS clutter such as .DS_Store'
345
+ cand --no-compress 'Write a plain ROM instead of compressing the result'
346
+ cand --repair-checksum 'Recompute the ROM''s internal header checksum afterwards, so the console does not reject it (SNES, NES, GB, GBA, Mega Drive, SMS, N64, NDS)'
347
+ cand --ignore-checksum-validation 'Apply the patch even when its own checksums do not match. Can produce a broken ROM'
348
+ cand --tui 'Ask for each patch''s name, version, and author, then apply and write a bundle. Needs a terminal'
349
+ cand --json 'Print one JSON object per line instead of human-readable output'
350
+ cand --progress 'Show progress even when output is piped to a file or another program'
351
+ cand --no-progress 'Hide progress'
352
+ cand -v 'Log more: -v for info, -vv for debug, -vvv for trace'
353
+ cand --verbose 'Log more: -v for info, -vv for debug, -vvv for trace'
354
+ cand -q 'Log errors only'
355
+ cand --quiet 'Log errors only'
356
+ cand --dep-trace 'Also log trace output from bundled libraries (for bug reports)'
357
+ cand --color 'Keep colors even when output is piped'
358
+ cand --no-color 'Turn colors off'
359
+ cand -h 'Print help (see more with ''--help'')'
360
+ cand --help 'Print help (see more with ''--help'')'
361
+ }
362
+ &'rom-weaver;patch;validate'= {
363
+ cand -i 'ROM to check the patches against. May be an archive'
364
+ cand --input 'ROM to check the patches against. May be an archive'
365
+ cand -s 'Pick which file to use when the ROM or a patch is inside an archive, by exact name, prefix, or glob (repeatable)'
366
+ cand --select 'Pick which file to use when the ROM or a patch is inside an archive, by exact name, prefix, or glob (repeatable)'
367
+ cand --filter 'Consider only files that look like a rom or a patch, judged by extension (repeatable, comma-separable)'
368
+ cand --patch 'Patch to check. Repeat once per patch; they are checked in the order given'
369
+ cand --assume-in 'Take this checksum on trust instead of reading the ROM to compute it, as in crc32=1234abcd (repeatable, comma-separable)'
370
+ cand --expect-in 'Fail unless the ROM matches: a checksum (crc32=1234abcd), an exact size (size=N), or a floor (min-size=N). Repeatable, comma-separable'
371
+ cand --n64-byte-order 'Byte order to put an N64 ROM in before checking: auto, keep, big-endian, little-endian, or byte-swapped [default: auto]'
372
+ cand --patch-basis 'Which ROM the preceding --patch was built against: auto, base, or previous [default: auto]'
373
+ cand --patch-input-check 'Checksum the preceding --patch expects to see going in, when the patch does not carry one (comma-separable; empty means none)'
374
+ cand --patch-output-check 'Checksum the preceding --patch should produce, when the patch does not carry one (comma-separable; empty means none)'
375
+ cand -j 'How many threads to use at most. auto uses every core; a format may still use fewer'
376
+ cand --threads 'How many threads to use at most. auto uses every core; a format may still use fewer'
377
+ cand --log-level 'How much rom-weaver logs to stderr. Separate from the normal output [default: off]'
378
+ cand --no-extract 'Do not look inside archives; treat the input and every patch as raw files'
379
+ cand --no-ignore 'Also consider files normally skipped inside archives: readmes, images, checksum sidecars, and OS clutter such as .DS_Store'
380
+ cand --strip-header 'Remove the ROM''s copier header before checking (A78, LNX, NES, FDS, SMC signatures, plus the SNES and PCE size rules)'
381
+ cand --ignore-checksum-validation 'Report a patch as usable even when its own checksums do not match'
382
+ cand --independent 'Check every patch against the original ROM rather than as a chain, and report a verdict for each instead of stopping at the first failure'
383
+ cand --plan 'Report the order the patches would run in and what each would be checked against, without reading the ROM more than needed'
384
+ cand --json 'Print one JSON object per line instead of human-readable output'
385
+ cand --progress 'Show progress even when output is piped to a file or another program'
386
+ cand --no-progress 'Hide progress'
387
+ cand -v 'Log more: -v for info, -vv for debug, -vvv for trace'
388
+ cand --verbose 'Log more: -v for info, -vv for debug, -vvv for trace'
389
+ cand -q 'Log errors only'
390
+ cand --quiet 'Log errors only'
391
+ cand --dep-trace 'Also log trace output from bundled libraries (for bug reports)'
392
+ cand --color 'Keep colors even when output is piped'
393
+ cand --no-color 'Turn colors off'
394
+ cand -h 'Print help (see more with ''--help'')'
395
+ cand --help 'Print help (see more with ''--help'')'
396
+ }
397
+ &'rom-weaver;patch;create'= {
398
+ cand --original 'The unmodified ROM'
399
+ cand --modified 'The changed ROM. Leave out when using --code, which produces the changed ROM for you'
400
+ cand -f 'Patch format, such as bps, ips, or xdelta [default: from the --output extension]'
401
+ cand --format 'Patch format, such as bps, ips, or xdelta [default: from the --output extension]'
402
+ cand -o 'Where to write the patch. Required unless --plan is used'
403
+ cand --output 'Where to write the patch. Required unless --plan is used'
404
+ cand --assume-in 'Take the original ROM''s checksum on trust rather than reading the file, as in crc32=1234abcd (repeatable, comma-separable)'
405
+ cand --code 'Build the patch from a Game Genie or GameShark/Pro Action Replay code instead of a second ROM. Repeat for each code; cannot be used with --modified'
406
+ cand --code-system 'Console the --code values are for (nes, snes, genesis, gameboy), when the ROM header does not say'
407
+ cand --code-kind 'Which cheat scheme the --code values use: auto, game-genie, or gameshark/par'
408
+ cand -j 'How many threads to use at most. auto uses every core; a format may still use fewer'
409
+ cand --threads 'How many threads to use at most. auto uses every core; a format may still use fewer'
410
+ cand --solid-system 'SOLID patches only: console the ROM is for'
411
+ cand --solid-game 'SOLID patches only: name of the game'
412
+ cand --solid-hack 'SOLID patches only: name of the hack'
413
+ cand --solid-version 'SOLID patches only: version of the hack. Switches the patch to its extended header'
414
+ cand --solid-author 'SOLID patches only: who made the hack. Switches the patch to its extended header'
415
+ cand --solid-contact 'SOLID patches only: how to reach the author. Switches the patch to its extended header'
416
+ cand --solid-comment 'SOLID patches only: free-form note. Switches the patch to its extended header'
417
+ cand --xdelta-secondary 'xdelta patches only: compress the patch''s own contents'
418
+ cand --log-level 'How much rom-weaver logs to stderr. Separate from the normal output [default: off]'
419
+ cand --plan 'Only report which formats suit these two ROMs; write nothing'
420
+ cand --ignore-checksum-validation 'Write the patch even when the format''s own consistency checks fail, and leave its checksums out'
421
+ cand --checksum-name 'Put the original ROM''s crc32 in the patch file name, as [crc32:HEX]'
422
+ cand --solid-extended 'SOLID patches only: use the extended header even with none of the extended fields filled in'
423
+ cand --json 'Print one JSON object per line instead of human-readable output'
424
+ cand --progress 'Show progress even when output is piped to a file or another program'
425
+ cand --no-progress 'Hide progress'
426
+ cand -v 'Log more: -v for info, -vv for debug, -vvv for trace'
427
+ cand --verbose 'Log more: -v for info, -vv for debug, -vvv for trace'
428
+ cand -q 'Log errors only'
429
+ cand --quiet 'Log errors only'
430
+ cand --dep-trace 'Also log trace output from bundled libraries (for bug reports)'
431
+ cand --color 'Keep colors even when output is piped'
432
+ cand --no-color 'Turn colors off'
433
+ cand -h 'Print help (see more with ''--help'')'
434
+ cand --help 'Print help (see more with ''--help'')'
435
+ }
436
+ &'rom-weaver;patch;help'= {
437
+ cand apply 'Apply one or more patches to a ROM, in order'
438
+ cand validate 'Check that patches would apply cleanly, without writing anything'
439
+ cand create 'Build a patch from an original ROM and a changed one'
440
+ cand help 'Print this message or the help of the given subcommand(s)'
441
+ }
442
+ &'rom-weaver;patch;help;apply'= {
443
+ }
444
+ &'rom-weaver;patch;help;validate'= {
445
+ }
446
+ &'rom-weaver;patch;help;create'= {
447
+ }
448
+ &'rom-weaver;patch;help;help'= {
449
+ }
450
+ &'rom-weaver;bundle'= {
451
+ cand --log-level 'How much rom-weaver logs to stderr. Separate from the normal output [default: off]'
452
+ cand --json 'Print one JSON object per line instead of human-readable output'
453
+ cand --progress 'Show progress even when output is piped to a file or another program'
454
+ cand --no-progress 'Hide progress'
455
+ cand -v 'Log more: -v for info, -vv for debug, -vvv for trace'
456
+ cand --verbose 'Log more: -v for info, -vv for debug, -vvv for trace'
457
+ cand -q 'Log errors only'
458
+ cand --quiet 'Log errors only'
459
+ cand --dep-trace 'Also log trace output from bundled libraries (for bug reports)'
460
+ cand --color 'Keep colors even when output is piped'
461
+ cand --no-color 'Turn colors off'
462
+ cand -h 'Print help'
463
+ cand --help 'Print help'
464
+ cand create 'Write a rom-weaver-bundle.json recipe from local ROM and patch files'
465
+ cand parse 'Read a rom-weaver-bundle.json recipe and report what it points at'
466
+ cand schema 'Print the rom-weaver-bundle.json JSON Schema, for editors and hand-authoring'
467
+ cand help 'Print this message or the help of the given subcommand(s)'
468
+ }
469
+ &'rom-weaver;bundle;create'= {
470
+ cand -i 'ROM the patches apply to. Its checksums and size are read from the file and recorded in the bundle'
471
+ cand --input 'ROM the patches apply to. Its checksums and size are read from the file and recorded in the bundle'
472
+ cand --assume-in 'Take the ROM''s checksum and size on trust rather than reading it, as in crc32=1234abcd,size=1048576 (repeatable, comma-separable)'
473
+ cand --rom-url 'Where the ROM can be downloaded from. With --input, the local file still supplies the checksums; on its own, the bundle records only this url'
474
+ cand --rom-name 'File name to show for the ROM, and to base the output name on'
475
+ cand --patch 'Patch to list in the bundle. Repeat once per patch, in the order they should be applied'
476
+ cand --patch-id 'Identifier for the preceding --patch that stays the same across releases, so a replacement keeps its settings'
477
+ cand --patch-version 'Version of the preceding --patch, in whatever form its author uses'
478
+ cand --patch-name 'Name to show for the preceding --patch'
479
+ cand --patch-description 'What the preceding --patch does'
480
+ cand --patch-author 'Who made the preceding --patch'
481
+ cand --patch-label 'Short status note for the preceding --patch, such as beta or recommended'
482
+ cand --patch-optional 'Mark the preceding --patch optional, so it starts switched off and needs --with to run'
483
+ cand --patch-source-url 'Where the preceding --patch can be downloaded from. The local file is still read to build the bundle'
484
+ cand --patch-header 'Whether the preceding --patch applies to the ROM with or without its copier header: auto, keep, or strip'
485
+ cand --patch-basis 'Which ROM the preceding --patch was built against: base (the bundle''s ROM) or previous (the patch before it). Use auto to leave it out and let apply infer it'
486
+ cand --patch-expect-in 'Checksum the ROM should have before the preceding --patch runs. Recorded only when it differs from the bundle''s ROM checksums (repeatable, comma-separable)'
487
+ cand --patch-expect-out 'Checksum the ROM should have after the preceding --patch runs. Recorded only when it differs from the final output checksums (repeatable, comma-separable)'
488
+ cand --expect-out 'Checksum the ROM should have once every patch has run, so users can confirm they got the right result (repeatable, comma-separable)'
489
+ cand --output-name 'File name the bundle suggests for the patched ROM'
490
+ cand --output-header 'Whether the patched ROM should keep its copier header: auto, keep, or strip'
491
+ cand -o 'Where to write the bundle. Name it rom-weaver-bundle.json, or add .gz or .zst to compress it'
492
+ cand --output 'Where to write the bundle. Name it rom-weaver-bundle.json, or add .gz or .zst to compress it'
493
+ cand --bundle 'Also pack the bundle and its ROM and patches into one shareable archive, such as release.zip'
494
+ cand --bundle-rom 'Pack this file into --bundle as the ROM, while --input supplies the checksums and metadata'
495
+ cand --checksum 'Which checksums to record for the ROM (repeatable) [default: crc32,md5,sha1]'
496
+ cand --from 'Build the bundle from a hand-written rom-weaver-bundle.json instead of flags. Use - to read it from stdin'
497
+ cand --schema-ref 'Record this $schema URL in the bundle so editors can validate it. Left out unless asked for'
498
+ cand -j 'How many threads to use at most. auto uses every core; a format may still use fewer'
499
+ cand --threads 'How many threads to use at most. auto uses every core; a format may still use fewer'
500
+ cand --log-level 'How much rom-weaver logs to stderr. Separate from the normal output [default: off]'
501
+ cand --no-bundle-rom 'Keep the ROM out of --bundle and record only its checksums, so whoever applies the bundle brings their own copy'
502
+ cand --json 'Print one JSON object per line instead of human-readable output'
503
+ cand --progress 'Show progress even when output is piped to a file or another program'
504
+ cand --no-progress 'Hide progress'
505
+ cand -v 'Log more: -v for info, -vv for debug, -vvv for trace'
506
+ cand --verbose 'Log more: -v for info, -vv for debug, -vvv for trace'
507
+ cand -q 'Log errors only'
508
+ cand --quiet 'Log errors only'
509
+ cand --dep-trace 'Also log trace output from bundled libraries (for bug reports)'
510
+ cand --color 'Keep colors even when output is piped'
511
+ cand --no-color 'Turn colors off'
512
+ cand -h 'Print help (see more with ''--help'')'
513
+ cand --help 'Print help (see more with ''--help'')'
514
+ }
515
+ &'rom-weaver;bundle;parse'= {
516
+ cand -i 'Bundle file, or an archive with a bundle at its root'
517
+ cand --input 'Bundle file, or an archive with a bundle at its root'
518
+ cand -s 'Handle only the bundle entries whose file name matches this exact name, prefix, or glob (repeatable)'
519
+ cand --select 'Handle only the bundle entries whose file name matches this exact name, prefix, or glob (repeatable)'
520
+ cand --filter 'Handle only the bundle''s rom entry or only its patch entries (repeatable, comma-separable)'
521
+ cand -o 'Directory to unpack the bundle''s files into. Without it, files packed in an archive are listed but not written out'
522
+ cand --output 'Directory to unpack the bundle''s files into. Without it, files packed in an archive are listed but not written out'
523
+ cand -j 'How many threads to use at most. auto uses every core; a format may still use fewer'
524
+ cand --threads 'How many threads to use at most. auto uses every core; a format may still use fewer'
525
+ cand --log-level 'How much rom-weaver logs to stderr. Separate from the normal output [default: off]'
526
+ cand --no-extract 'Report what the bundle contains without unpacking any of it'
527
+ cand --json 'Print one JSON object per line instead of human-readable output'
528
+ cand --progress 'Show progress even when output is piped to a file or another program'
529
+ cand --no-progress 'Hide progress'
530
+ cand -v 'Log more: -v for info, -vv for debug, -vvv for trace'
531
+ cand --verbose 'Log more: -v for info, -vv for debug, -vvv for trace'
532
+ cand -q 'Log errors only'
533
+ cand --quiet 'Log errors only'
534
+ cand --dep-trace 'Also log trace output from bundled libraries (for bug reports)'
535
+ cand --color 'Keep colors even when output is piped'
536
+ cand --no-color 'Turn colors off'
537
+ cand -h 'Print help (see more with ''--help'')'
538
+ cand --help 'Print help (see more with ''--help'')'
539
+ }
540
+ &'rom-weaver;bundle;schema'= {
541
+ cand --log-level 'How much rom-weaver logs to stderr. Separate from the normal output [default: off]'
542
+ cand --json 'Print one JSON object per line instead of human-readable output'
543
+ cand --progress 'Show progress even when output is piped to a file or another program'
544
+ cand --no-progress 'Hide progress'
545
+ cand -v 'Log more: -v for info, -vv for debug, -vvv for trace'
546
+ cand --verbose 'Log more: -v for info, -vv for debug, -vvv for trace'
547
+ cand -q 'Log errors only'
548
+ cand --quiet 'Log errors only'
549
+ cand --dep-trace 'Also log trace output from bundled libraries (for bug reports)'
550
+ cand --color 'Keep colors even when output is piped'
551
+ cand --no-color 'Turn colors off'
552
+ cand -h 'Print help (see more with ''--help'')'
553
+ cand --help 'Print help (see more with ''--help'')'
554
+ }
555
+ &'rom-weaver;bundle;help'= {
556
+ cand create 'Write a rom-weaver-bundle.json recipe from local ROM and patch files'
557
+ cand parse 'Read a rom-weaver-bundle.json recipe and report what it points at'
558
+ cand schema 'Print the rom-weaver-bundle.json JSON Schema, for editors and hand-authoring'
559
+ cand help 'Print this message or the help of the given subcommand(s)'
560
+ }
561
+ &'rom-weaver;bundle;help;create'= {
562
+ }
563
+ &'rom-weaver;bundle;help;parse'= {
564
+ }
565
+ &'rom-weaver;bundle;help;schema'= {
566
+ }
567
+ &'rom-weaver;bundle;help;help'= {
568
+ }
569
+ &'rom-weaver;tools'= {
570
+ cand --log-level 'How much rom-weaver logs to stderr. Separate from the normal output [default: off]'
571
+ cand --json 'Print one JSON object per line instead of human-readable output'
572
+ cand --progress 'Show progress even when output is piped to a file or another program'
573
+ cand --no-progress 'Hide progress'
574
+ cand -v 'Log more: -v for info, -vv for debug, -vvv for trace'
575
+ cand --verbose 'Log more: -v for info, -vv for debug, -vvv for trace'
576
+ cand -q 'Log errors only'
577
+ cand --quiet 'Log errors only'
578
+ cand --dep-trace 'Also log trace output from bundled libraries (for bug reports)'
579
+ cand --color 'Keep colors even when output is piped'
580
+ cand --no-color 'Turn colors off'
581
+ cand -h 'Print help'
582
+ cand --help 'Print help'
583
+ cand ppf-undo 'Undo a PPF3 patch, using the undo data stored inside it'
584
+ cand help 'Print this message or the help of the given subcommand(s)'
585
+ }
586
+ &'rom-weaver;tools;ppf-undo'= {
587
+ cand -i 'The already-patched ROM to undo'
588
+ cand --input 'The already-patched ROM to undo'
589
+ cand --patch 'The PPF3 patch that was applied. It must carry undo data'
590
+ cand -o 'Where to write the restored ROM'
591
+ cand --output 'Where to write the restored ROM'
592
+ cand --log-level 'How much rom-weaver logs to stderr. Separate from the normal output [default: off]'
593
+ cand --json 'Print one JSON object per line instead of human-readable output'
594
+ cand --progress 'Show progress even when output is piped to a file or another program'
595
+ cand --no-progress 'Hide progress'
596
+ cand -v 'Log more: -v for info, -vv for debug, -vvv for trace'
597
+ cand --verbose 'Log more: -v for info, -vv for debug, -vvv for trace'
598
+ cand -q 'Log errors only'
599
+ cand --quiet 'Log errors only'
600
+ cand --dep-trace 'Also log trace output from bundled libraries (for bug reports)'
601
+ cand --color 'Keep colors even when output is piped'
602
+ cand --no-color 'Turn colors off'
603
+ cand -h 'Print help (see more with ''--help'')'
604
+ cand --help 'Print help (see more with ''--help'')'
605
+ }
606
+ &'rom-weaver;tools;help'= {
607
+ cand ppf-undo 'Undo a PPF3 patch, using the undo data stored inside it'
608
+ cand help 'Print this message or the help of the given subcommand(s)'
609
+ }
610
+ &'rom-weaver;tools;help;ppf-undo'= {
611
+ }
612
+ &'rom-weaver;tools;help;help'= {
613
+ }
614
+ &'rom-weaver;plan-extract-batch'= {
615
+ cand --job-size 'Source size in bytes for one job; repeat once per job, in input order'
616
+ cand -j 'How many threads to use at most. auto uses every core; a format may still use fewer'
617
+ cand --threads 'How many threads to use at most. auto uses every core; a format may still use fewer'
618
+ cand --max-concurrency 'Hard cap on jobs running at once; defaults to the thread budget'
619
+ cand --total-memory-bytes 'Total memory budget concurrent jobs may reserve (e.g. browser device memory); defaults to the platform''s physical memory'
620
+ cand --memory-ceiling-bytes 'Combined working-set ceiling to plan against, used verbatim (no fraction/clamp). The browser passes its own resolved, mobile-capped ceiling here; when set it overrides --total-memory-bytes'
621
+ cand --log-level 'How much rom-weaver logs to stderr. Separate from the normal output [default: off]'
622
+ cand --json 'Print one JSON object per line instead of human-readable output'
623
+ cand --progress 'Show progress even when output is piped to a file or another program'
624
+ cand --no-progress 'Hide progress'
625
+ cand -v 'Log more: -v for info, -vv for debug, -vvv for trace'
626
+ cand --verbose 'Log more: -v for info, -vv for debug, -vvv for trace'
627
+ cand -q 'Log errors only'
628
+ cand --quiet 'Log errors only'
629
+ cand --dep-trace 'Also log trace output from bundled libraries (for bug reports)'
630
+ cand --color 'Keep colors even when output is piped'
631
+ cand --no-color 'Turn colors off'
632
+ cand -h 'Print help'
633
+ cand --help 'Print help'
634
+ }
635
+ &'rom-weaver;weave'= {
636
+ cand -i 'ROM to patch. May be an archive, a disc sheet (.cue/.gdi), or a bundle'
637
+ cand --input 'ROM to patch. May be an archive, a disc sheet (.cue/.gdi), or a bundle'
638
+ cand -s 'Pick which file to use when the ROM or a patch is inside an archive, by exact name, prefix, or glob (repeatable)'
639
+ cand --select 'Pick which file to use when the ROM or a patch is inside an archive, by exact name, prefix, or glob (repeatable)'
640
+ cand --target 'For a .cue or .gdi input, which track gets the patch. Matched like --select and must hit exactly one track'
641
+ cand --filter 'Consider only files that look like a rom or a patch, judged by extension (repeatable, comma-separable)'
642
+ cand --patch 'Patch to apply. Repeat once per patch; they run in the order given'
643
+ cand -o 'Where to write the patched ROM. Optional when a bundle already names the output'
644
+ cand --output 'Where to write the patched ROM. Optional when a bundle already names the output'
645
+ cand --bundle 'Follow a rom-weaver-bundle.json recipe: a file path, or an http(s) URL'
646
+ cand --with 'Turn on a bundle patch the bundle leaves off by default, matched by name or file name (repeatable)'
647
+ cand --without 'Turn off a bundle patch, matched by name or file name (repeatable)'
648
+ cand --compress-format 'Format to compress the patched ROM into [default: from the --output extension]'
649
+ cand --compress-codec 'Compression method to use, as codec or codec:level (repeatable, comma-separable)'
650
+ cand --compress-level 'How hard to compress: min, very-low, low, medium, high, very-high, or max [default: max]'
651
+ cand --assume-in 'Take this checksum on trust instead of reading the ROM to compute it, as in crc32=1234abcd (repeatable, comma-separable)'
652
+ cand --expect-in 'Stop unless the ROM about to be patched has this checksum, as in crc32=1234abcd (repeatable, comma-separable)'
653
+ cand --patch-header 'Whether a patch applies to the ROM with or without its copier header: auto, keep, or strip [default: auto]'
654
+ cand --patch-basis 'Which ROM the preceding --patch was built against: auto, base, or previous [default: auto]'
655
+ cand --output-header 'Whether the finished ROM keeps its copier header: auto, keep, or strip [default: auto]'
656
+ cand --n64-byte-order 'Byte order to put an N64 ROM in for each patch: auto, keep, big-endian, little-endian, or byte-swapped [default: auto]'
657
+ cand --expect-out 'Fail unless the patched ROM has this checksum, as in sha1=abc... (repeatable, comma-separable)'
658
+ cand --code 'Game Genie or GameShark/Pro Action Replay code to bake into the ROM. Repeat for each code'
659
+ cand --code-system 'Console the --code values are for (nes, snes, genesis, gameboy), when the ROM header does not say'
660
+ cand --code-kind 'Which cheat scheme the --code values use: auto, game-genie, or gameshark/par'
661
+ cand --emit-bundle 'Also write a rom-weaver-bundle.json recording this run, so someone else can repeat it'
662
+ cand -j 'How many threads to use at most. auto uses every core; a format may still use fewer'
663
+ cand --threads 'How many threads to use at most. auto uses every core; a format may still use fewer'
664
+ cand --log-level 'How much rom-weaver logs to stderr. Separate from the normal output [default: off]'
665
+ cand --no-extract 'Do not look inside archives; treat the input and every patch as raw files'
666
+ cand --no-ignore 'Also consider files normally skipped inside archives: readmes, images, checksum sidecars, and OS clutter such as .DS_Store'
667
+ cand --no-compress 'Write a plain ROM instead of compressing the result'
668
+ cand --repair-checksum 'Recompute the ROM''s internal header checksum afterwards, so the console does not reject it (SNES, NES, GB, GBA, Mega Drive, SMS, N64, NDS)'
669
+ cand --ignore-checksum-validation 'Apply the patch even when its own checksums do not match. Can produce a broken ROM'
670
+ cand --tui 'Ask for each patch''s name, version, and author, then apply and write a bundle. Needs a terminal'
671
+ cand --json 'Print one JSON object per line instead of human-readable output'
672
+ cand --progress 'Show progress even when output is piped to a file or another program'
673
+ cand --no-progress 'Hide progress'
674
+ cand -v 'Log more: -v for info, -vv for debug, -vvv for trace'
675
+ cand --verbose 'Log more: -v for info, -vv for debug, -vvv for trace'
676
+ cand -q 'Log errors only'
677
+ cand --quiet 'Log errors only'
678
+ cand --dep-trace 'Also log trace output from bundled libraries (for bug reports)'
679
+ cand --color 'Keep colors even when output is piped'
680
+ cand --no-color 'Turn colors off'
681
+ cand -h 'Print help (see more with ''--help'')'
682
+ cand --help 'Print help (see more with ''--help'')'
683
+ }
684
+ &'rom-weaver;completions'= {
685
+ cand --log-level 'How much rom-weaver logs to stderr. Separate from the normal output [default: off]'
686
+ cand --json 'Print one JSON object per line instead of human-readable output'
687
+ cand --progress 'Show progress even when output is piped to a file or another program'
688
+ cand --no-progress 'Hide progress'
689
+ cand -v 'Log more: -v for info, -vv for debug, -vvv for trace'
690
+ cand --verbose 'Log more: -v for info, -vv for debug, -vvv for trace'
691
+ cand -q 'Log errors only'
692
+ cand --quiet 'Log errors only'
693
+ cand --dep-trace 'Also log trace output from bundled libraries (for bug reports)'
694
+ cand --color 'Keep colors even when output is piped'
695
+ cand --no-color 'Turn colors off'
696
+ cand -h 'Print help (see more with ''--help'')'
697
+ cand --help 'Print help (see more with ''--help'')'
698
+ }
699
+ &'rom-weaver;help'= {
700
+ cand probe 'Identify a file: its format, its platform, and any header it carries'
701
+ cand extract 'Unpack an archive or disc image'
702
+ cand checksum 'Compute checksums for a file, or for a ROM inside an archive'
703
+ cand ingest 'Sort a file into ROMs and patches, unpacking and hashing along the way'
704
+ cand compress 'Pack files into an archive or a compressed disc image'
705
+ cand trim 'Cut the padding off a ROM, or put it back'
706
+ cand patch 'Apply, create, or check ROM patches'
707
+ cand bundle 'Build and read rom-weaver-bundle.json patch recipes'
708
+ cand tools 'One-off recovery tools'
709
+ cand plan-extract-batch 'Plan a memory-/thread-aware concurrent extraction schedule from per-job source sizes (no I/O)'
710
+ cand weave 'Apply one or more patches to a ROM, in order (same as `patch apply`)'
711
+ cand completions 'Print a tab-completion script for your shell'
712
+ cand help 'Print this message or the help of the given subcommand(s)'
713
+ }
714
+ &'rom-weaver;help;probe'= {
715
+ }
716
+ &'rom-weaver;help;extract'= {
717
+ }
718
+ &'rom-weaver;help;checksum'= {
719
+ }
720
+ &'rom-weaver;help;ingest'= {
721
+ }
722
+ &'rom-weaver;help;compress'= {
723
+ }
724
+ &'rom-weaver;help;trim'= {
725
+ }
726
+ &'rom-weaver;help;patch'= {
727
+ cand apply 'Apply one or more patches to a ROM, in order'
728
+ cand validate 'Check that patches would apply cleanly, without writing anything'
729
+ cand create 'Build a patch from an original ROM and a changed one'
730
+ }
731
+ &'rom-weaver;help;patch;apply'= {
732
+ }
733
+ &'rom-weaver;help;patch;validate'= {
734
+ }
735
+ &'rom-weaver;help;patch;create'= {
736
+ }
737
+ &'rom-weaver;help;bundle'= {
738
+ cand create 'Write a rom-weaver-bundle.json recipe from local ROM and patch files'
739
+ cand parse 'Read a rom-weaver-bundle.json recipe and report what it points at'
740
+ cand schema 'Print the rom-weaver-bundle.json JSON Schema, for editors and hand-authoring'
741
+ }
742
+ &'rom-weaver;help;bundle;create'= {
743
+ }
744
+ &'rom-weaver;help;bundle;parse'= {
745
+ }
746
+ &'rom-weaver;help;bundle;schema'= {
747
+ }
748
+ &'rom-weaver;help;tools'= {
749
+ cand ppf-undo 'Undo a PPF3 patch, using the undo data stored inside it'
750
+ }
751
+ &'rom-weaver;help;tools;ppf-undo'= {
752
+ }
753
+ &'rom-weaver;help;plan-extract-batch'= {
754
+ }
755
+ &'rom-weaver;help;weave'= {
756
+ }
757
+ &'rom-weaver;help;completions'= {
758
+ }
759
+ &'rom-weaver;help;help'= {
760
+ }
761
+ ]
762
+ $completions[$command]
763
+ }