-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
/
Copy pathtuist.ts
471 lines (471 loc) · 16.7 KB
/
tuist.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
const completionSpec: Fig.Spec = {
name: "tuist",
description:
"Generate, build and test your Xcode projects. For more info please see https://docs.tuist.io/",
subcommands: [
{
name: "build",
description: "Build the project in the current directory",
args: {
name: "scheme",
description:
"The scheme to be built. By default it builds all the buildable schemes of the project in the current directory",
},
options: [
{
name: "--build-output-path",
description:
"Build the project to a custom directory, example usage: 'tuist build --build-output-path .build':",
},
{
name: "--device",
description:
"Build the project to a specific device, example usage: 'tuist build --device \"iPhone X\"':",
},
{
name: "--os",
description:
"Build the project to a specific OS, example usage: 'tuist build --os 14.0':",
},
],
},
{
name: "cache",
description:
"A set of utilities related to the caching of targets. For more info see https://docs.tuist.io/building-at-scale/caching USAGE: tuist cache <subcommand>",
subcommands: [
{
name: "warm",
description: "Warms the local and remote cache",
options: [
{
name: ["--path", "-p"],
description:
"The path to the directory that contains the project whose targets will be cached",
},
{
name: ["--profile", "-P"],
description:
"The name of the profile to be used when warming up the cache",
},
{
name: ["--xcframeworks", "-x"],
description:
"When passed it caches the targets for simulator and device using xcframeworks",
},
{
name: "--dependencies-only",
description:
"If passed, the command doesn't cache the targets passed in the `--targets` argument, but only their dependencies",
},
],
},
{
name: "print-hashes",
description:
"Print the hashes of the cacheable frameworks in the given project",
options: [
{
name: ["--path", "-p"],
description:
"The path to the directory that contains the project whose targets will be cached",
},
{
name: ["--profile", "-P"],
description:
"The name of the profile to be used when warming up the cache",
},
{
name: ["--xcframeworks", "-x"],
description:
"When passed it caches the targets for simulator and device using xcframeworks",
},
],
},
],
},
{
name: "clean",
args: {
name: "clean-categories",
description:
"The cache and artifact categories to be cleaned. If no category is specified, everything is cleaned. (default: plugins, builds, tests, generatedAutomationProjects, projectDescriptionHelpers, manifests, dependencies)",
},
description:
"Clean all the data generated by Tuist. USAGE: tuist clean [<clean-categories> ...] [--path <path>]",
options: [
{
name: ["--path", "-p"],
description:
"The path to the directory that contains the project that should be cleaned",
},
{
name: "plugins",
description:
"Clean only the plugins cache generated by Tuist, example usage: 'tuist clean plugins':",
},
{
name: "builds",
description:
"Clean only the builds artifacts cache generated by Tuist, example usage: 'tuist clean builds':",
},
{
name: "tests",
description:
"Clean only the tests cache generated by Tuist, example usage: 'tuist clean tests':",
},
{
name: "generatedAutomationProjects",
description:
"Clean only the automation projects cache generated by Tuist, example usage: 'tuist clean generatedAutomationProjects':",
},
{
name: "projectDescriptionHelpers",
description:
"Clean only the project description helpers cache generated by Tuist, example usage: 'tuist clean projectDescriptionHelpers':",
},
{
name: "manifests",
description:
"Clean only the manifests cache generated by Tuist, example usage: 'tuist clean manifests':",
},
],
},
{
name: "fetch",
description:
"Dependencies can be fetched by running the following command. They are stored in your project's `Tuist/Dependencies` directory. For more info see https://docs.tuist.io/commands/dependencies",
options: [
{
name: ["--path", "-p"],
description:
"The path to the directory that contains the workspace or project whose dependencies will be fetched/updated. The default is the current directory",
},
{
name: "--update",
description:
"Clean only the builds artifacts cache generated by Tuist, example usage: 'tuist fetch --update':",
},
],
},
{
name: "edit",
description:
"Editing your projects is easy; position yourself in a directory where there's a project defined and run the edit command. It will open a temporary Xcode project with all the project manifests and the project description helpers, so you will be able to edit the whole project configuration. After making changes you can run the target from Xcode and it will call tuist generate for you. For more info see https://docs.tuist.io/commands/edit",
options: [
{
name: "--permanent",
description:
"The project is deleted automatically once you are done with editing. If you wish to generate and keep the project in the current directory, you can run the command passing the --permanent argument. That will generate a Manifest.xcodeproj project that you can open manually",
},
],
},
{
name: "graph",
description:
"Generates a graph from the workspace or project in the current directory. For more info see https://docs.tuist.io/commands/graph USAGE: tuist graph [--skip-test-targets] [--skip-external-dependencies] [--format <format>] [--algorithm <algorithm>] [<targets> ...] [--path <path>] [--output-path <output-path>]",
args: {
name: "targets",
description:
"A list of targets to filter. Those and their dependent targets will be showed in the graph",
},
options: [
{
name: ["--skip-test-targets", "-t"],
description: "Excludes test targets from the generated graph",
},
{
name: ["--skip-external-dependencies", "-d"],
description:
"Excludes external dependencies from the generated graph",
},
{
name: ["--format", "-f"],
description:
"If you prefer to have the dot or json representations of the graph and render it separately. Available formats: dot, png, json (default: png)",
args: {
name: "format",
suggestions: ["dot", "png", "json"],
default: "png",
},
},
{
name: ["--algorithm", "-a"],
description:
"Available formats: dot, neato, twopi, circo, fdp, sfddp, patchwork (default: dot)",
args: {
name: "format",
suggestions: [
"dot",
"neato",
"twopi",
"circo",
"fdp",
"sfddp",
"patchwork",
],
default: "dot",
},
},
{
name: ["--path", "-p"],
description:
"The path to the directory that contains the definition of the project. Default is current directory",
args: {
name: "project dir",
template: "folders",
},
},
{
name: ["--output-path", "-o"],
description:
"The path to where the image will be exported. When not specified, it exports the image in the current directory",
args: {
name: "output path",
template: "folders",
suggestCurrentToken: true,
},
},
{
name: ["--no-open", "-n"],
description:
"If set, the generated graph is not opened automatically. Default is yes",
},
{
name: ["--platform", "-l"],
description:
"If set, show only the targets for the given platform. Default is all platforms. Available platforms: ios, macos, tvos, watchos",
args: {
name: "platform",
suggestions: ["ios", "macos", "tvos", "watchos"],
},
},
],
},
{
name: "generate",
description:
"Generates an Xcode workspace to start working on the project. For more info see https://docs.tuist.io/commands/generate",
args: {
name: "sources",
description:
"A list of targets to focus on. Other targets will be linked as binaries if possible. If no target is specified, all the project targets will be generated (except external ones, such as Swift packages)",
},
options: [
{
name: ["--path", "-p"],
description:
"The path to the directory that contains the definition of the project. Default is current directory",
args: {
name: "path",
template: "folders",
},
},
{
name: ["--no-open", "-n"],
description:
"Don't open the project after generating it. Default is false",
},
{
name: ["--xcframeworks", "-x"],
description:
"When passed it uses xcframeworks (simulator and device) from the cache instead of frameworks (only simulator). Default is false",
},
{
name: "--no-cache",
description:
"Ignore cached targets, and use their sources instead. Default is false",
},
{
name: ["--profile", "-P"],
description: "The name of the cache profile",
args: {
name: "cache profile",
},
},
],
},
{
name: "migration",
description:
"To help developers with the process of adopting Tuist, Tuist provides a set of commands under tuist migration. For more info see https://docs.tuist.io/commands/migration",
subcommands: [
{
name: "settings-to-xcconfig",
description:
"It's recommended to make .xcconfig files the source of truth for build settings. For that, Tuist provides a tuist migration settings-to-xcconfig command that extracts the build settings from targets and projects",
options: [
{
name: ["--xcodeproj-path", "-p"],
description:
"Required. Path to the Xcode project whose build settings will be extracted",
isRequired: true,
args: {
name: "path",
template: "folders",
},
},
{
name: ["--xcconfig-path", "-x"],
description:
"Required. Path to the Xcode project whose build settings will be extracted",
isRequired: true,
args: {
name: "path",
template: "folders",
},
},
{
name: ["--target", "-t"],
description:
"Optional. The name of the target whose build settings will be extracted. When not passed, it extracts the build settings of the project",
args: {
name: "target",
},
},
],
},
{
name: "check-empty-settings",
description:
"After making .xcconfig files the source of truth for build settings, it's important to ensure that build settings are no longer set to the project. To help with that, Tuist includes a command that fails if the build settings of a project or a target are not empty",
options: [
{
name: ["--xcodeproj-path", "-p"],
description:
"Required. Path to the Xcode project whose build settings will be checked",
},
{
name: ["--target", "-t"],
description:
"Optional. The name of the target whose build settings will be checked. When not passed, it checks the build settings of the project",
},
],
},
{
name: "list-targets",
description:
"When passed it uses xcframeworks (simulator and device) from the cache instead of frameworks (only simulator). Default is false",
options: [
{
name: ["--xcodeproj-path", "-p"],
isRequired: true,
description:
"Required. Path to the Xcode project whose build settings will be checked",
},
],
},
],
},
{
name: "scaffold",
description:
"Generates new project based on a template. For more info see https://docs.tuist.io/commands/scaffold USAGE: tuist scaffold <template> [--json] [--path <path>] <subcommand>",
args: {
name: "template",
description: "Name of template you want to use",
},
subcommands: [
{
name: "list",
description: "Lists available scaffold templates",
},
],
options: [
{
name: ["--path", "-p"],
description:
"The path to the folder where the template will be generated (Default: Current directory)",
args: {
name: "path",
},
},
{
name: "--json",
description: "The output in JSON format",
},
{
name: "--name",
description: "The name of the generate project",
args: {
name: "name",
},
},
{
name: "--platform",
description: "The platform used by the project",
args: {
name: "platform",
},
},
],
},
{
name: "test",
description:
"Tests a project. For more info see https://docs.tuist.io/commands/test USAGE: tuist test [<scheme>] [--clean] [--path <path>] [--device <device>] [--os <os>] [--configuration <configuration>] [--skip-ui-tests] [--result-bundle-path <result-bundle-path>] [--retry-count <retry-count>]",
args: {
name: "scheme",
description:
"The scheme to be tested. By default it tests all the testable targets of the project in the current directory",
},
options: [
{
name: ["--path", "-p"],
description:
"The path to the directory that contains the project to be tested",
args: {
name: "path",
template: "folders",
},
},
{
name: ["--clean", "-c"],
description: "When passed, it cleans the project before testing it",
},
{
name: ["--device", "-d"],
description: "Test on a specific device",
args: {
name: "device",
},
},
{
name: ["--os", "-o"],
description: "Test with a specific version of the OS",
args: {
name: "os",
},
},
{
name: ["--configuration", "-C"],
description: "The configuration to be used when testing the scheme",
},
{
name: "--skip-ui-tests",
description: "When passed, it skips testing UI Tests targets",
},
{
name: ["--result-bundle-path", "-T"],
description: "Path where test result bundle will be saved",
},
{
name: "--retry-count",
description:
"Tests will retry <number> of times until success. Example: if 1 is specified, the test will be retried at most once, hence it will run up to 2 times. (default: 0)",
args: {
name: "times",
default: "0",
},
},
],
},
],
options: [
{
name: ["--help", "-h"],
description: "Show help for tuist",
},
],
};
export default completionSpec;