@teambit/harmony.content.cli-reference 1.95.15

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,1255 @@
1
+ ---
2
+ id: cli-all
3
+ title: CLI Commands
4
+ ---
5
+
6
+ # CLI Reference
7
+
8
+ Commands that are marked as workspace only must be executed inside a workspace. Commands that are marked as not workspace only, can be executed from anywhere and will run on a remote server.
9
+
10
+ ## add
11
+
12
+ **Alias**: `a`
13
+ **Workspace only**: yes
14
+ **Description**: add any subset of files to be tracked as a component(s)
15
+ all flags support glob patterns and {PARENT} {FILE_NAME} annotations
16
+ https://bit.dev/docs/components/adding-components
17
+
18
+ `bit add [path...]`
19
+
20
+ | **Option** | **Option alias** | **Description** |
21
+ | ---------------------------------- | :--------------: | ---------------------------------------------------------------------------------------- |
22
+ | `--id <name>` | `-i` | manually set component id |
23
+ | `--main <file>` | `-m` | define entry point for the components |
24
+ | `--tests <file>/"<file>,<file>"` | `-t` | specify test files to track. use quotation marks to list files or use a glob pattern |
25
+ | `--namespace <namespace>` | `-n` | organize component in a namespace |
26
+ | `--exclude <file>/"<file>,<file>"` | `-e` | exclude file from being tracked. use quotation marks to list files or use a glob pattern |
27
+ | `--override <boolean>` | `-o` | override existing component if exists (default = false) |
28
+ | `--scope <string>` | `-s` | sets the component's scope-name. if not entered, the default-scope will be used |
29
+
30
+ ---
31
+
32
+ ## app
33
+
34
+ **Workspace only**: yes
35
+ **Description**: manage applications
36
+
37
+ `bit app <sub-command>`
38
+
39
+ ### app list
40
+
41
+ **Usage**: `app list`
42
+
43
+ **Description**: list all registered applications
44
+
45
+ | **Option** | **Option alias** | **Description** |
46
+ | ---------- | :--------------: | ---------------------------------------- |
47
+ | `--json` | `-j` | return the component data in json format |
48
+
49
+ ---
50
+
51
+ ## artifacts
52
+
53
+ **Workspace only**: yes
54
+ **Description**: EXPERIMENTAL. list and download components artifacts.
55
+ artifacts are created on isolated capsules during tag or snap commands.
56
+ example of artifacts are dists files generated by a compiler, a JUnit.xml file generated by a tester
57
+ and a package.tgz file generated by pkg aspect.
58
+
59
+ `bit artifacts <pattern...>`
60
+
61
+ | **Option** | **Option alias** | **Description** |
62
+ | ---------------------- | :--------------: | -------------------------------------------------------------------------------------------------------- |
63
+ | `--aspect <aspect-id>` | | show/download only artifacts generated by this aspect-id |
64
+ | `--task <task-id>` | | show/download only artifacts generated by this task-id |
65
+ | `--files <glob>` | | show/download only artifacts matching the given files or the glob pattern (wrap glob patterns in quotes) |
66
+ | `--out-dir <string>` | | download the files to the specified dir |
67
+
68
+ ---
69
+
70
+ ## aspect
71
+
72
+ **Workspace only**: yes
73
+ **Description**: EXPERIMENTAL. manage aspects
74
+
75
+ `bit aspect <sub-command>`
76
+
77
+ ### aspect list
78
+
79
+ **Usage**: `aspect list [pattern]`
80
+
81
+ **Description**: list all aspects configured on component(s)
82
+ you can use a `<pattern>` for multiple component ids, such as `bit aspect list "org.scope/utils/**"`. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button"
83
+ always wrap the pattern with quotes to avoid collision with shell commands.
84
+ to validate the pattern before running this command, run `bit pattern <pattern>`.
85
+
86
+ | **Option** | **Option alias** | **Description** |
87
+ | ---------- | :--------------: | ------------------------------------------------- |
88
+ | `--debug` | `-d` | show the origins were the aspects were taken from |
89
+
90
+ ### aspect get
91
+
92
+ **Usage**: `aspect get <component-id>`
93
+
94
+ **Description**: show aspects' data and configuration of the given component
95
+
96
+ | **Option** | **Option alias** | **Description** |
97
+ | ---------- | :--------------: | ------------------------------------------------- |
98
+ | `--debug` | `-d` | show the origins were the aspects were taken from |
99
+ | `--json` | `-j` | format as json |
100
+
101
+ ### aspect set
102
+
103
+ **Usage**: `aspect set <pattern> <aspect-id> [config]`
104
+
105
+ **Description**: set an aspect to component(s) with optional config.
106
+ enter the config as stringified JSON (e.g. '{"foo":"bar"}' ).
107
+ if no config entered, the aspect will be set with empty config ({}).
108
+ you can use a `<pattern>` for multiple component ids, such as `bit aspect set "org.scope/utils/**"`. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button"
109
+ always wrap the pattern with quotes to avoid collision with shell commands.
110
+ to validate the pattern before running this command, run `bit pattern <pattern>`.
111
+
112
+ ### aspect unset
113
+
114
+ **Usage**: `aspect unset <pattern> <aspect-id>`
115
+
116
+ **Description**: unset an aspect from component(s).
117
+ you can use a `<pattern>` for multiple component ids, such as `bit aspect unset "org.scope/utils/**"`. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button"
118
+ always wrap the pattern with quotes to avoid collision with shell commands.
119
+ to validate the pattern before running this command, run `bit pattern <pattern>`.
120
+
121
+ ### aspect update
122
+
123
+ **Usage**: `aspect update <aspect-id> [pattern]`
124
+
125
+ **Description**: update a version of an aspect
126
+ default to all components using the aspect, unless "pattern" is provided.
127
+ you can use a `<pattern>` for multiple component ids, such as `bit aspect update <aspect-id> "org.scope/utils/**"`. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button"
128
+ always wrap the pattern with quotes to avoid collision with shell commands.
129
+ to validate the pattern before running this command, run `bit pattern <pattern>`.
130
+
131
+ examples:
132
+ "bit aspect update scope.org/aspect '**/ui/**'" - update "ui" components that use scope.org/aspect to the latest version
133
+ "bit aspect update scope.org/aspect@2.0.0" - updates all components using scope.org/aspect to version 2.0.0.
134
+
135
+ ---
136
+
137
+ ## build
138
+
139
+ **Workspace only**: yes
140
+ **Description**: run set of tasks for build
141
+
142
+ `bit build [pattern]`
143
+
144
+ | **Option** | **Option alias** | **Description** |
145
+ | ----------------------------------------------------------------------------------------------------------- | :--------------: | ----------------------------------------------------------------------------------------------- |
146
+ | `--all` | `-a` | build all components, not only modified and new |
147
+ | `--dev` | `-d` | run the pipeline in dev mode |
148
+ | `--install` | | install core aspects in capsules |
149
+ | `--reuse-capsules` | | avoid deleting the capsules root-dir before starting the build |
150
+ | `--tasks <string>` | | build the specified task(s) only. for multiple tasks, separate by a comma and wrap with quotes. |
151
+ | specify the task-name (e.g. "TypescriptCompiler") or the task-aspect-id (e.g. teambit.compilation/compiler) |
152
+ | `--cache-packages-on-capsule-root` | | set the package-manager cache on the capsule root |
153
+ | `--list-tasks <string>` | | list tasks of an env or a component-id for each one of the pipelines: build, tag and snap |
154
+
155
+ ---
156
+
157
+ ## capsule
158
+
159
+ **Workspace only**: yes
160
+ **Description**: manage capsules.
161
+ a capsule is a directory contains the component code, isolated from the workspace.
162
+ normally, capsules are created during the build process, the component files are copied and the packages are installed
163
+ via the configured package-manager. the purpose is to compile/test them in isolation to make sure they will work for
164
+ other users after publishing/exporting them.
165
+
166
+ `bit capsule <sub-command>`
167
+
168
+ ### capsule list
169
+
170
+ **Usage**: `capsule list`
171
+
172
+ **Description**: list all capsules
173
+
174
+ | **Option** | **Option alias** | **Description** |
175
+ | ---------- | :--------------: | --------------- |
176
+ | `--json` | `-j` | json format |
177
+
178
+ ### capsule create
179
+
180
+ **Usage**: `capsule create [componentIds...]`
181
+
182
+ **Description**: create capsules
183
+
184
+ | **Option** | **Option alias** | **Description** |
185
+ | -------------------------- | :--------------: | ------------------------------------------------------------------------------------------------------- |
186
+ | `--base-dir <name>` | `-b` | set base dir of all capsules (hashed to create the base dir inside the root dir - host path by default) |
187
+ | `--root-base-dir <name>` | `-r` | set root base dir of all capsules (absolute path to use as root dir) |
188
+ | `--always-new` | `-a` | create new environment for capsule |
189
+ | `--seeders-only` | `-s` | create capsules for the seeders only (not for the entire graph) |
190
+ | `--id <name>` | `-i` | reuse capsule of certain name |
191
+ | `--json` | `-j` | json format |
192
+ | `--install-packages` | `-d` | install packages by the package-manager |
193
+ | `--package-manager <name>` | `-p` | npm, yarn or pnpm, default to npm |
194
+
195
+ ### capsule delete
196
+
197
+ **Usage**: `capsule delete`
198
+
199
+ **Description**: delete capsules. with no args, only workspace's capsules are deleted
200
+
201
+ | **Option** | **Option alias** | **Description** |
202
+ | ----------------- | :--------------: | ------------------------------------------------- |
203
+ | `--scope-aspects` | | delete scope-aspects capsules |
204
+ | `--all` | `-a` | delete all capsules for all workspaces and scopes |
205
+
206
+ ---
207
+
208
+ ## check-types
209
+
210
+ **Workspace only**: yes
211
+ **Description**: check typescript types
212
+
213
+ `bit check-types [pattern]`
214
+
215
+ | **Option** | **Option alias** | **Description** |
216
+ | ---------- | :--------------: | --------------------------------------------------------- |
217
+ | `--all` | `-a` | check-types for all components, not only modified and new |
218
+ | `--strict` | | in case issues found, exit with code 1 |
219
+
220
+ ---
221
+
222
+ ## checkout
223
+
224
+ **Alias**: `U`
225
+ **Workspace only**: yes
226
+ **Description**: switch between component versions or remove local changes
227
+ `bit checkout <version> [ids...]` => checkout the specified ids (or all components when --all is used) to the specified version
228
+ `bit checkout latest [ids...]` => checkout the specified ids (or all components when --all is used) to their latest versions
229
+ `bit checkout [ids...] --reset` => remove local modifications from the specified ids (or all components when --all is used)
230
+ you can use a pattern for multiple ids, such as bit checkout 0.0.1 "utils/\*". (wrap the pattern with quotes to avoid collision with shell commands)
231
+
232
+ `bit checkout [values...]`
233
+
234
+ | **Option** | **Option alias** | **Description** |
235
+ | -------------------------------- | :--------------: | ------------------------------------------------------------------------------------------------------------------------------------------------- |
236
+ | `--interactive-merge` | `-i` | when a component is modified and the merge process found conflicts, display options to resolve them |
237
+ | `--ours` | `-o` | in case of a conflict, override the used version with the current modification |
238
+ | `--theirs` | `-t` | in case of a conflict, override the current modification with the specified version |
239
+ | `--manual` | `-m` | in case of a conflict, leave the files with a conflict state to resolve them manually later |
240
+ | `--reset` | `-r` | remove local changes |
241
+ | `--all` | `-a` | all components |
242
+ | `--verbose` | `-v` | showing verbose output for inspection |
243
+ | `--skip-npm-install` | | DEPRECATED. use "--skip-dependency-installation" instead |
244
+ | `--skip-dependency-installation` | | do not install packages of the imported components |
245
+ | `--ignore-package-json` | | do not generate package.json for the imported component(s). (it automatically enables skip-npm-install and save-dependencies-as-components flags) |
246
+ | `--conf [path]` | | write the configuration file (bit.json) and the envs configuration files (use --conf without path to write to the default dir) |
247
+ | `--ignore-dist` | | do not write dist files (when exist) |
248
+
249
+ ---
250
+
251
+ ## clear-cache
252
+
253
+ **Alias**: `cc`
254
+ **Workspace only**: no
255
+ **Description**: clears Bit's cache from current working machine
256
+ The following gets removed by this command:
257
+
258
+ 1. V8 compiled code (generated the first time Bit is loaded by v8-compile-cache package)
259
+ 2. components cache on the filesystem (mainly the dependencies graph and docs)
260
+ 3. scope's index file, which maps the component-id:object-hash
261
+ https://bit.dev/docs/workspace/clearing-cache
262
+
263
+ `bit clear-cache`
264
+
265
+ | **Option** | **Option alias** | **Description** |
266
+ | ------------------------ | :--------------: | -------------------------------------- |
267
+ | `--remote <remote-name>` | `-r` | clear memory cache from a remote scope |
268
+
269
+ ---
270
+
271
+ ## cli
272
+
273
+ **Workspace only**: yes
274
+ **Description**: EXPERIMENTAL. enters bit cli program and generates commands list
275
+
276
+ `bit cli`
277
+
278
+ ### cli generate
279
+
280
+ **Usage**: `cli generate`
281
+
282
+ **Description**: EXPERIMENTAL. generate an .md file with all commands details
283
+
284
+ | **Option** | **Option alias** | **Description** |
285
+ | ------------ | :--------------: | ------------------------------------------------------------------------------------------------------------------------------ |
286
+ | `--metadata` | | metadata/front-matter to place at the top of the .md file, enter as an object e.g. --metadata.id=cli --metadata.title=commands |
287
+
288
+ ---
289
+
290
+ ## compile
291
+
292
+ **Workspace only**: yes
293
+ **Description**: compile components in the development workspace
294
+
295
+ `bit compile [component...]`
296
+
297
+ | **Option** | **Option alias** | **Description** |
298
+ | ------------------- | :--------------: | ------------------------------------------------------------- |
299
+ | `--changed` | `-c` | compile only new and modified components |
300
+ | `--verbose` | `-v` | show more data, such as, dist paths |
301
+ | `--json` | `-j` | return the compile results in json format |
302
+ | `--delete-dist-dir` | `-d` | delete existing dist folder before writing new compiled files |
303
+
304
+ ---
305
+
306
+ ## completion
307
+
308
+ **Workspace only**: yes
309
+ **Description**: enable bash/zsh-completion shortcuts for commands and options
310
+
311
+ `bit completion`
312
+
313
+ ---
314
+
315
+ ## component-issues
316
+
317
+ **Workspace only**: yes
318
+ **Description**: list available component-issues
319
+
320
+ `bit component-issues`
321
+
322
+ | **Option** | **Option alias** | **Description** |
323
+ | ---------- | :--------------: | --------------- |
324
+ | `--json` | `-j` | json format |
325
+
326
+ ---
327
+
328
+ ## config
329
+
330
+ **Workspace only**: yes
331
+ **Description**: global config management.
332
+ https://bit.dev/docs/config/bit-config
333
+
334
+ `bit config`
335
+
336
+ ### config set
337
+
338
+ **Usage**: `config set <key> <val>`
339
+
340
+ **Description**: set a global configuration
341
+
342
+ ### config del
343
+
344
+ **Usage**: `config del <key>`
345
+
346
+ **Description**: delete given key from global configuration
347
+
348
+ ### config get
349
+
350
+ **Usage**: `config get <key>`
351
+
352
+ **Description**: get a global configuration
353
+
354
+ ### config list
355
+
356
+ **Usage**: `config list`
357
+
358
+ **Description**: list all configuration(s)
359
+
360
+ ---
361
+
362
+ ## create
363
+
364
+ **Workspace only**: yes
365
+ **Description**: create a new component from a template
366
+
367
+ `bit create <templateName> <componentNames...>`
368
+
369
+ | **Option** | **Option alias** | **Description** |
370
+ | ---------------------- | :--------------: | ----------------------------------------------------------------------------------- |
371
+ | `--namespace <string>` | `-n` | sets the component's namespace and nested dirs inside the scope |
372
+ | `--scope <string>` | `-s` | sets the component's scope-name. if not entered, the default-scope will be used |
373
+ | `--aspect <string>` | `-a` | aspect-id of the template. helpful when multiple aspects use the same template name |
374
+ | `--path <string>` | `-p` | relative path in the workspace. by default the path is `<scope>/<namespace>/<name>` |
375
+ | `--env <string>` | `-e` | set the component's environment. (overrides the env from variants and the template) |
376
+
377
+ ---
378
+
379
+ ## dependencies
380
+
381
+ **Workspace only**: yes
382
+ **Description**: EXPERIMENTAL. show dependencies (direct and indirect) of the given component
383
+
384
+ `bit dependencies <id>`
385
+
386
+ | **Option** | **Option alias** | **Description** |
387
+ | ---------- | :--------------: | -------------------------------------------------------------------- |
388
+ | `--debug` | `-d` | show the immediate dependencies and how their version was determined |
389
+
390
+ ---
391
+
392
+ ## dependents
393
+
394
+ **Workspace only**: yes
395
+ **Description**: EXPERIMENTAL. show dependents of the given component
396
+
397
+ `bit dependents <id>`
398
+
399
+ ---
400
+
401
+ ## deprecate
402
+
403
+ **Alias**: `d`
404
+ **Workspace only**: no
405
+ **Description**: deprecate a component
406
+
407
+ `bit deprecate <id>`
408
+
409
+ | **Option** | **Option alias** | **Description** |
410
+ | ------------------- | :--------------: | ------------------------------------------------------------ |
411
+ | `--new-id <string>` | | if replaced by another component, enter the new component id |
412
+
413
+ ---
414
+
415
+ ## diff
416
+
417
+ **Workspace only**: yes
418
+ **Description**: show diff between components files
419
+ bit diff => compare all modified components to their model version
420
+ bit diff [ids...] => compare the specified components against their modified states
421
+ bit diff [id] [version] => compare the specified version to used or modified files
422
+ bit diff [id] [version] [to_version] => compare the specified version files to to_version files
423
+ you can use a pattern for multiple ids, such as bit diff "utils/\*". (wrap the pattern with quotes to avoid collision with shell commands)
424
+
425
+ `bit diff [values...]`
426
+
427
+ | **Option** | **Option alias** | **Description** |
428
+ | ----------- | :--------------: | ------------------------------------------------------- |
429
+ | `--verbose` | `-v` | show a more verbose output when possible |
430
+ | `--table` | `-t` | show tables instead of plain text for dependencies diff |
431
+
432
+ ---
433
+
434
+ ## doctor
435
+
436
+ **Workspace only**: yes
437
+ **Description**: diagnose a bit workspace
438
+
439
+ `bit doctor [diagnosis-name]`
440
+
441
+ | **Option** | **Option alias** | **Description** |
442
+ | ------------------- | :--------------: | ------------------------------- |
443
+ | `--json` | `-j` | return diagnoses in json format |
444
+ | `--list` | | list all available diagnoses |
445
+ | `--save [filePath]` | `-s` | save diagnoses to a file |
446
+
447
+ ---
448
+
449
+ ## eject
450
+
451
+ **Alias**: `E`
452
+ **Workspace only**: yes
453
+ **Description**: replaces the components from the local scope with the corresponding packages
454
+ you can use a `<pattern>` for multiple component ids, such as `bit eject "org.scope/utils/**"`. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button"
455
+ always wrap the pattern with quotes to avoid collision with shell commands.
456
+ to validate the pattern before running this command, run `bit pattern <pattern>`.
457
+
458
+ `bit eject <pattern>`
459
+
460
+ | **Option** | **Option alias** | **Description** |
461
+ | -------------- | :--------------: | --------------------------------------------------------------------------------- |
462
+ | `--force` | `-f` | ignore local version. remove the components even when they are staged or modified |
463
+ | `--json` | `-j` | print the results in JSON format |
464
+ | `--keep-files` | | keep the component files in the workspace intact |
465
+
466
+ ---
467
+
468
+ ## eject-conf
469
+
470
+ **Workspace only**: yes
471
+ **Description**: eject components configuration (create a `component.json` file)
472
+ you can use a `<pattern>` for multiple component ids, such as `bit eject-conf "org.scope/utils/**"`. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button"
473
+ always wrap the pattern with quotes to avoid collision with shell commands.
474
+ to validate the pattern before running this command, run `bit pattern <pattern>`.
475
+
476
+ `bit eject-conf <pattern>`
477
+
478
+ | **Option** | **Option alias** | **Description** |
479
+ | ------------- | :--------------: | -------------------------------------- |
480
+ | `--propagate` | `-p` | mark propagate true in the config file |
481
+ | `--override` | `-o` | override file if exist |
482
+
483
+ ---
484
+
485
+ ## envs
486
+
487
+ **Alias**: `env`
488
+ **Workspace only**: yes
489
+ **Description**: list all components envs
490
+
491
+ `bit envs`
492
+
493
+ ### envs list
494
+
495
+ **Usage**: `envs list`
496
+
497
+ **Description**: list all envs available in the workspace
498
+
499
+ ### envs get
500
+
501
+ **Usage**: `envs get <name>`
502
+
503
+ **Description**: show component's env details
504
+
505
+ ### envs set
506
+
507
+ **Usage**: `envs set <pattern> <env>`
508
+
509
+ **Description**: set an environment for component(s)
510
+ you can use a `<pattern>` for multiple component ids, such as `bit env set "org.scope/utils/**"`. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button"
511
+ always wrap the pattern with quotes to avoid collision with shell commands.
512
+ to validate the pattern before running this command, run `bit pattern <pattern>`.
513
+
514
+ ### envs unset
515
+
516
+ **Usage**: `envs unset <component>`
517
+
518
+ **Description**: unset an environment from component(s)
519
+ you can use a `<pattern>` for multiple component ids, such as `bit env unset "org.scope/utils/**"`. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button"
520
+ always wrap the pattern with quotes to avoid collision with shell commands.
521
+ to validate the pattern before running this command, run `bit pattern <pattern>`.
522
+
523
+ ### envs replace
524
+
525
+ **Usage**: `envs replace <old-env> <new-env>`
526
+
527
+ **Description**: replace an existing env with another env for all components using the old env
528
+
529
+ ---
530
+
531
+ ## export
532
+
533
+ **Alias**: `e`
534
+ **Workspace only**: yes
535
+ **Description**: export components to a remote scope.
536
+ bit export => export all staged components to their current scope, if checked out to a lane, export the lane as well
537
+ `bit export [id...]` => export the given ids to their current scope
538
+
539
+ https://bit.dev/docs/components/exporting-components
540
+ you can use a pattern for multiple ids, such as bit export remote-scope "utils/\*". (wrap the pattern with quotes to avoid collision with shell commands)
541
+
542
+ `bit export [remote] [id...]`
543
+
544
+ | **Option** | **Option alias** | **Description** |
545
+ | ---------------------------- | :--------------: | --------------------------------------------------------------------------------------------------------------------------------------- |
546
+ | `--eject` | `-e` | replaces the exported components from the local scope with the corresponding packages |
547
+ | `--all` | `-a` | export all components include non-staged |
548
+ | `--include-dependencies` | `-d` | LEGACY ONLY. include the component's dependencies as part of the export to the remote scope |
549
+ | `--set-current-scope` | `-s` | LEGACY ONLY. ensure the component's remote scope is set according to the target location |
550
+ | `--rewire` | `-r` | LEGACY ONLY. when exporting to a different or new scope, replace import/require statements in the source code to match the new scope |
551
+ | `--force` | `-f` | force changing a component remote without asking for a confirmation |
552
+ | `--all-versions` | | export not only staged versions but all of them |
553
+ | `--origin-directly` | | HARMONY ONLY. avoid export to the central hub, instead, export directly to the original scopes. not recommended! |
554
+ | `--resume <string>` | | in case the previous export failed and suggested to resume with an export-id, enter the id |
555
+ | `--ignore-missing-artifacts` | | EXPERIMENTAL. don't throw an error when artifact files are missing. not recommended, unless you're sure the artifacts are in the remote |
556
+
557
+ ---
558
+
559
+ ## fork
560
+
561
+ **Workspace only**: no
562
+ **Description**: EXPERIMENTAL. create a new component out of an existing one
563
+ note that [target-name] is the name only without the scope.
564
+ to set the default-scope, please use --scope flag
565
+
566
+ `bit fork <source-id> [target-name]`
567
+
568
+ | **Option** | **Option alias** | **Description** |
569
+ | ------------------ | :--------------: | ----------------------------------------------------------------------------------------------- |
570
+ | `--scope <string>` | `-s` | default scope for the newly created component |
571
+ | `--path <string>` | `-p` | relative path in the workspace. by default the path is `<scope>/<namespace>/<name>` |
572
+ | `--refactor` | `-r` | change the source code of all components using the original component with the new package-name |
573
+
574
+ ---
575
+
576
+ ## format
577
+
578
+ **Workspace only**: yes
579
+ **Description**: format components in the development workspace
580
+
581
+ `bit format [component...]`
582
+
583
+ | **Option** | **Option alias** | **Description** |
584
+ | ----------- | :--------------: | ---------------------------------------------------------------------------- |
585
+ | `--changed` | `-c` | format only new and modified components |
586
+ | `--check` | | will output a human-friendly message and a list of unformatted files, if any |
587
+ | `--json` | `-j` | return the format results in json format |
588
+
589
+ ---
590
+
591
+ ## globals
592
+
593
+ **Workspace only**: yes
594
+ **Description**: list all globals
595
+
596
+ `bit globals`
597
+
598
+ | **Option** | **Option alias** | **Description** |
599
+ | ---------- | :--------------: | --------------- |
600
+ | `--json` | `-j` | json format |
601
+
602
+ ---
603
+
604
+ ## graph
605
+
606
+ **Workspace only**: yes
607
+ **Description**: EXPERIMENTAL. generate an image file with the dependencies graph
608
+
609
+ `bit graph [id]`
610
+
611
+ | **Option** | **Option alias** | **Description** |
612
+ | ----------------------- | :--------------: | ------------------------------------------------------------------------------------------------------ |
613
+ | `--image <image>` | `-i` | image path. use one of the following extensions: [gif, png, svg, pdf] |
614
+ | `--remote [remoteName]` | `-r` | remote name (name is optional, leave empty when id is specified) |
615
+ | `--all-versions` | | enter all components versions into the graph, not only latest |
616
+ | `--layout <name>` | | GraphVis layout. default to "dot". options are [circo, dot, fdp, neato, osage, patchwork, sfdp, twopi] |
617
+
618
+ ---
619
+
620
+ ## help
621
+
622
+ **Alias**: `$0`
623
+ **Workspace only**: yes
624
+ **Description**: shows help
625
+
626
+ `bit help`
627
+
628
+ ---
629
+
630
+ ## import
631
+
632
+ **Workspace only**: yes
633
+ **Description**: import components into your current workspace.
634
+ https://bit.dev/docs/components/importing-components
635
+ you can use a pattern for multiple ids, such as bit import "utils/\*". (wrap the pattern with quotes to avoid collision with shell commands)
636
+
637
+ `bit import [ids...]`
638
+
639
+ | **Option** | **Option alias** | **Description** |
640
+ | -------------------------------- | :--------------: | ------------------------------------------------------------------------------------------------------------------------------- |
641
+ | `--path <path>` | `-p` | import components into a specific directory |
642
+ | `--objects` | `-o` | import components objects only, don't write the components to the file system. This is a default behavior for import with no id |
643
+ | `--display-dependencies` | `-d` | display the imported dependencies |
644
+ | `--override` | `-O` | override local changes |
645
+ | `--verbose` | `-v` | showing verbose output for inspection |
646
+ | `--json` | `-j` | return the output as JSON |
647
+ | `--conf` | | write the configuration file (component.json) of the component (harmony components only) |
648
+ | `--skip-npm-install` | | DEPRECATED. use "--skip-dependency-installation" instead |
649
+ | `--skip-dependency-installation` | | do not install packages of the imported components |
650
+ | `--merge [strategy]` | `-m` | merge local changes with the imported version. strategy should be "theirs", "ours" or "manual" |
651
+ | `--dependencies` | | EXPERIMENTAL. import all dependencies and write them to the workspace |
652
+ | `--dependents` | | EXPERIMENTAL. import component dependents to allow auto-tag updating them upon tag |
653
+ | `--skip-lane` | | EXPERIMENTAL. when checked out to a lane, do not import the component into the lane, save it on main |
654
+ | `--all-history` | | relevant for fetching all components objects. avoid optimizations, fetch all history versions, always |
655
+
656
+ ---
657
+
658
+ ## init
659
+
660
+ **Workspace only**: no
661
+ **Description**: initialize an empty bit scope
662
+ https://bit.dev/docs/workspace/creating-workspaces#initialize-a-workspace-on-an-existing-project
663
+
664
+ `bit init [path]`
665
+
666
+ | **Option** | **Option alias** | **Description** |
667
+ | ----------------------------------------- | :--------------: | -------------------------------------------------------------------------------------------------------------------------------------- |
668
+ | `--bare [name]` | `-b` | initialize an empty bit bare scope |
669
+ | `--shared <groupname>` | `-s` | add group write permissions to a scope properly |
670
+ | `--standalone` | `-T` | do not nest component store within .git directory and do not write config data inside package.json |
671
+ | `--reset` | `-r` | write missing or damaged Bit files |
672
+ | `--reset-new` | | reset .bitmap file as if the components were newly added and remove all model data (objects) |
673
+ | `--reset-hard` | | delete all Bit files and directories, including Bit configuration, tracking and model data. Useful for re-start using Bit from scratch |
674
+ | `--default-directory <default-directory>` | `-d` | set up default directory to import components into |
675
+ | `--package-manager <package-manager>` | `-p` | set up package manager (npm or yarn) |
676
+ | `--force` | `-f` | force workspace initialization without clearing local objects |
677
+ | `--harmony` | | DEPRECATED. no need for this flag. Harmony is the default now |
678
+ | `--interactive` | `-I` | EXPERIMENTAL. start an interactive process |
679
+
680
+ ---
681
+
682
+ ## install
683
+
684
+ **Alias**: `in`
685
+ **Workspace only**: yes
686
+ **Description**: install development workspace dependencies
687
+
688
+ `bit install [packages...]`
689
+
690
+ | **Option** | **Option alias** | **Description** |
691
+ | --------------------------------------- | :--------------: | --------------------------------------------------------------- |
692
+ | `--variants <variants>` | `-v` | add packages to specific variants |
693
+ | `--type [lifecycleType]` | `-t` | "runtime" (default) or "peer" (dev is not a valid option) |
694
+ | `--update-existing [updateExisting]` | `-u` | update existing dependencies version and types |
695
+ | `--save-prefix [savePrefix]` | | set the prefix to use when adding dependency to workspace.jsonc |
696
+ | `--skip-dedupe [skipDedupe]` | | do not dedupe dependencies on installation |
697
+ | `--skip-import [skipImport]` | | do not import bit objects post installation |
698
+ | `--add-missing-peers [addMissingPeers]` | | install all missing peer dependencies |
699
+
700
+ ---
701
+
702
+ ## link
703
+
704
+ **Workspace only**: yes
705
+ **Description**: generate symlinks to resolve module paths for imported components.
706
+ https://bit.dev/docs/workspace/component-links
707
+
708
+ `bit link [ids...]`
709
+
710
+ | **Option** | **Option alias** | **Description** |
711
+ | ------------------------- | :--------------: | -------------------------------------------------------------------------------------------------------------- |
712
+ | `--json` | `-j` | return the output as JSON |
713
+ | `--verbose` | | verbose output |
714
+ | `--rewire` | `-r` | Replace relative paths with module paths in code (e.g. "../foo" => "@bit/foo") |
715
+ | `--target <dir>` | | EXPERIMENTAL. link to an external directory (similar to npm-link) so other projects could use these components |
716
+ | `--skip-fetching-objects` | | skip fetch missing objects from remotes before linking |
717
+
718
+ ---
719
+
720
+ ## lint
721
+
722
+ **Workspace only**: yes
723
+ **Description**: lint components in the development workspace
724
+
725
+ `bit lint [component...]`
726
+
727
+ | **Option** | **Option alias** | **Description** |
728
+ | ---------------------- | :--------------: | ----------------------------------------------------------------- |
729
+ | `--changed` | `-c` | lint only new and modified components |
730
+ | `--fix` | `-f` | automatically fix problems |
731
+ | `--fix-type <fixType>` | | specify the types of fixes to apply (problem, suggestion, layout) |
732
+ | `--json` | `-j` | return the lint results in json format |
733
+
734
+ ---
735
+
736
+ ## list
737
+
738
+ **Alias**: `ls`
739
+ **Workspace only**: no
740
+ **Description**: list components on a local or a remote scope.
741
+ https://bit.dev/docs/reference/cli-reference#list
742
+
743
+ `bit list [remote-scope]`
744
+
745
+ | **Option** | **Option alias** | **Description** |
746
+ | ---------------------- | :--------------: | ------------------------------------------------------------------------------- |
747
+ | `--ids` | `-i` | show only component ids unformatted |
748
+ | `--scope` | `-s` | show only components stored in the local scope, including indirect dependencies |
749
+ | `--bare` | `-b` | DEPRECATED. use --raw instead |
750
+ | `--raw` | `-r` | show raw output (only components ids, no styling) |
751
+ | `--outdated` | `-o` | show latest versions from remotes |
752
+ | `--json` | `-j` | show the output in JSON format |
753
+ | `--namespace <string>` | `-n` | show only specified namespace by using wildcards |
754
+
755
+ ---
756
+
757
+ ## log
758
+
759
+ **Workspace only**: no
760
+ **Description**: show components(s) tag history.
761
+ https://bit.dev/docs/reference/cli-reference#log
762
+
763
+ `bit log <id>`
764
+
765
+ | **Option** | **Option alias** | **Description** |
766
+ | ----------- | :--------------: | ----------------------------------------- |
767
+ | `--remote` | `-r` | show log of a remote component |
768
+ | `--parents` | | EXPERIMENTAL. show parents and lanes data |
769
+
770
+ ---
771
+
772
+ ## login
773
+
774
+ **Workspace only**: no
775
+ **Description**: log the CLI into Bit Cloud
776
+
777
+ `bit login`
778
+
779
+ | **Option** | **Option alias** | **Description** |
780
+ | --------------------------- | :--------------: | -------------------------------------------------------------------------------------------------- |
781
+ | `--port <port>` | `-p` | port number to open for localhost server (default 8085) |
782
+ | `--suppress-browser-launch` | | do not open a browser for authentication |
783
+ | `--npmrc-path <path>` | | path to npmrc file to configure bit.cloud registry |
784
+ | `--skip-registry-config` | | don't configure bit.cloud registry |
785
+ | `--machine-name <string>` | | specify machine-name to pair with the token (useful for CI to avoid accidentally revoke the token) |
786
+
787
+ ---
788
+
789
+ ## logout
790
+
791
+ **Workspace only**: yes
792
+ **Description**: log the CLI out of Bit
793
+
794
+ `bit logout`
795
+
796
+ ---
797
+
798
+ ## merge
799
+
800
+ **Workspace only**: yes
801
+ **Description**: merge changes of different component versions
802
+ `bit merge <version> [ids...]` => merge changes of the given version into the checked out version
803
+ `bit merge [ids...]` => EXPERIMENTAL. merge changes of the remote head into local, optionally use '--abort' or '--resolve'
804
+ you can use a pattern for multiple ids, such as bit merge 0.0.1 "utils/\*". (wrap the pattern with quotes to avoid collision with shell commands)
805
+
806
+ `bit merge [values...]`
807
+
808
+ | **Option** | **Option alias** | **Description** |
809
+ | --------------------- | :--------------: | ------------------------------------------------------------------------------------------- |
810
+ | `--ours` | | in case of a conflict, override the used version with the current modification |
811
+ | `--theirs` | | in case of a conflict, override the current modification with the specified version |
812
+ | `--manual` | | in case of a conflict, leave the files with a conflict state to resolve them manually later |
813
+ | `--abort` | | EXPERIMENTAL. in case of an unresolved merge, revert to the state before the merge began |
814
+ | `--resolve` | | EXPERIMENTAL. mark an unresolved merge as resolved and create a new snap with the changes |
815
+ | `--no-snap` | | EXPERIMENTAL. do not auto snap in case the merge completed without conflicts |
816
+ | `--build` | | in case of snap during the merge, run the build-pipeline (similar to bit snap --build) |
817
+ | `--message <message>` | `-m` | EXPERIMENTAL. override the default message for the auto snap |
818
+
819
+ ---
820
+
821
+ ## move
822
+
823
+ **Alias**: `mv`
824
+ **Workspace only**: yes
825
+ **Description**: move files or directories of component(s)
826
+ https://bit.dev/docs/workspace/moving-components
827
+
828
+ `bit move <existing-dir> <new-dir>`
829
+
830
+ | **Option** | **Option alias** | **Description** |
831
+ | ------------- | :--------------: | ---------------------------------------------------------------------------------------------------------------------------- |
832
+ | `--component` | `-c` | move component files that are spread over multiple directories to one directory. synopsis: `move <component-id> <directory>` |
833
+
834
+ ---
835
+
836
+ ## new
837
+
838
+ **Workspace only**: yes
839
+ **Description**: Create a new workspace from a template
840
+
841
+ `bit new <templateName> <workspaceName>`
842
+
843
+ | **Option** | **Option alias** | **Description** |
844
+ | -------------------------- | :--------------: | --------------------------------------------------------------------------------------------------------------- |
845
+ | `--aspect <string>` | `-a` | aspect-id of the template. mandatory for non-core aspects. helpful for core aspects in case of a name collision |
846
+ | `--default-scope <string>` | `-d` | set defaultScope in the new workspace.jsonc |
847
+ | `--standalone` | | DEPRECATED. use --skip-git instead |
848
+ | `--skip-git` | `-s` | skip generation of Git repository |
849
+ | `--empty` | `-e` | empty workspace with no components (relevant for templates that add components by default) |
850
+ | `--load-from <string>` | | path to the workspace containing the template. helpful during a development of a workspace-template |
851
+
852
+ ---
853
+
854
+ ## pack
855
+
856
+ **Workspace only**: yes
857
+ **Description**: create tar for npm publish
858
+
859
+ `bit pack <componentId> [scopePath]`
860
+
861
+ | **Option** | **Option alias** | **Description** |
862
+ | --------------------- | :--------------: | -------------------------------------------------- |
863
+ | `--out-dir <out-dir>` | `-d` | directory to put the result tar file |
864
+ | `--override` | `-o` | override existing pack file |
865
+ | `--keep` | `-k` | should keep isolated environment [default = false] |
866
+ | `--prefix` | `-p` | keep custom (binding) prefix |
867
+ | `--json` | `-j` | return the output as JSON |
868
+
869
+ ---
870
+
871
+ ## pattern
872
+
873
+ **Workspace only**: yes
874
+ **Description**: list the component ids matching the given pattern
875
+
876
+ `bit pattern <pattern>`
877
+
878
+ | **Option** | **Option alias** | **Description** |
879
+ | ---------- | :--------------: | ------------------------- |
880
+ | `--json` | `-j` | return the output as JSON |
881
+
882
+ ---
883
+
884
+ ## refactor
885
+
886
+ **Workspace only**: yes
887
+ **Description**: EXPERIMENTAL. source code refactoring / codemod
888
+
889
+ `bit refactor <sub-command>`
890
+
891
+ ### refactor dependency-name
892
+
893
+ **Usage**: `refactor dependency-name <old-id> <new-id>`
894
+
895
+ **Description**: replace the dependency's old package-name with a new one in the code
896
+ the `<old-id>` and `<new-id>` arguments can be either a component-id or a package-name.
897
+
898
+ ---
899
+
900
+ ## remote
901
+
902
+ **Workspace only**: yes
903
+ **Description**: manage set of tracked bit scope(s)
904
+ https://bit.dev/docs/scope/remote-scopes
905
+
906
+ `bit remote`
907
+
908
+ ### remote add
909
+
910
+ **Usage**: `remote add <url>`
911
+
912
+ **Description**: add a bare-scope as a remote. supported protocols are [file, http, ssh].
913
+ for example: "http://localhost:3000", "file:///tmp/local-scope", "ssh://user@127.0.0.1:/tmp/local-scope".
914
+ Legacy support [file, ssh]. Harmony supports [file, http].
915
+
916
+ | **Option** | **Option alias** | **Description** |
917
+ | ---------- | :--------------: | ---------------------------- |
918
+ | `--global` | `-g` | configure a remote bit scope |
919
+
920
+ ### remote del
921
+
922
+ **Usage**: `remote del <name>`
923
+
924
+ **Description**: remove a tracked bit remote
925
+
926
+ | **Option** | **Option alias** | **Description** |
927
+ | ---------- | :--------------: | --------------------------------------- |
928
+ | `--global` | `-g` | remove a global configured remote scope |
929
+
930
+ | **Option** | **Option alias** | **Description** |
931
+ | ---------- | :--------------: | ------------------------------- |
932
+ | `--global` | `-g` | see globally configured remotes |
933
+
934
+ ---
935
+
936
+ ## remove
937
+
938
+ **Alias**: `rm`
939
+ **Workspace only**: no
940
+ **Description**: remove a component (local/remote)
941
+ https://bit.dev/docs/components/removing-components
942
+ you can use a pattern for multiple ids, such as bit remove "utils/\*". (wrap the pattern with quotes to avoid collision with shell commands)
943
+
944
+ `bit remove <ids...>`
945
+
946
+ | **Option** | **Option alias** | **Description** |
947
+ | ---------------- | :--------------: | ---------------------------------------------------------------------------------------------------------------------------------- |
948
+ | `--remote` | `-r` | remove a component from a remote scope |
949
+ | `--track` | `-t` | keep tracking component (default = false) |
950
+ | `--delete-files` | `-d` | delete local component files (authored components only. for imported components the files are always deleted) |
951
+ | `--force` | `-f` | removes the component from the scope, even if used as a dependency. WARNING: components that depend on this component will corrupt |
952
+ | `--silent` | `-s` | skip confirmation |
953
+
954
+ ---
955
+
956
+ ## rename
957
+
958
+ **Workspace only**: no
959
+ **Description**: EXPERIMENTAL. rename component. if tagged/exported, create a new component and deprecate the source-component
960
+ the `<target-name>` should include the component-name only, without the scope-name.
961
+ to assign a default-scope to this component, please use "--scope" flag
962
+
963
+ `bit rename <source-name> <target-name>`
964
+
965
+ | **Option** | **Option alias** | **Description** |
966
+ | ------------------ | :--------------: | --------------------------------------------------------------------------------------- |
967
+ | `--scope <string>` | `-s` | default scope for the newly created component |
968
+ | `--path <string>` | `-p` | relative path in the workspace. by default the path is `<scope>/<namespace>/<name>` |
969
+ | `--refactor` | `-r` | change the source code of all components using this component with the new package-name |
970
+
971
+ ---
972
+
973
+ ## resume-export
974
+
975
+ **Workspace only**: yes
976
+ **Description**: resume failed export to persist the pending objects on the given remotes.
977
+ the export-id is the id the client got in the error message during the failure.
978
+ alternatively, exporting to any one of the failed scopes, throws server-is-busy error with the export-id
979
+
980
+ `bit resume-export <export-id> <remotes...>`
981
+
982
+ ---
983
+
984
+ ## run
985
+
986
+ **Alias**: `c`
987
+ **Workspace only**: yes
988
+ **Description**: run an application
989
+
990
+ `bit run <app>`
991
+
992
+ | **Option** | **Option alias** | **Description** |
993
+ | -------------- | :--------------: | -------------------------------------------------------------------------- |
994
+ | `--dev` | `-d` | start the application in dev mode. |
995
+ | `--verbose` | `-v` | showing verbose output for inspection and prints stack trace |
996
+ | `--skip-watch` | | avoid running the watch process that compiles components in the background |
997
+
998
+ ---
999
+
1000
+ ## schema
1001
+
1002
+ **Workspace only**: yes
1003
+ **Description**: shows the API schema of a certain component.
1004
+
1005
+ `bit schema <id>`
1006
+
1007
+ | **Option** | **Option alias** | **Description** |
1008
+ | ---------- | :--------------: | ---------------------------------------- |
1009
+ | `--json` | `-j` | return the component data in json format |
1010
+
1011
+ ---
1012
+
1013
+ ## scope-config
1014
+
1015
+ **Workspace only**: yes
1016
+ **Description**: scope config management
1017
+
1018
+ `bit scope-config`
1019
+
1020
+ ### scope-config set
1021
+
1022
+ **Usage**: `scope-config set <key> <val>`
1023
+
1024
+ **Description**: set a scope configuration
1025
+
1026
+ ### scope-config del
1027
+
1028
+ **Usage**: `scope-config del <key>`
1029
+
1030
+ **Description**: delete given key from global configuration
1031
+
1032
+ ### scope-config get
1033
+
1034
+ **Usage**: `scope-config get <key>`
1035
+
1036
+ **Description**: get a scope configuration
1037
+
1038
+ ### scope-config list
1039
+
1040
+ **Usage**: `scope-config list`
1041
+
1042
+ **Description**: list all scope configuration(s)
1043
+
1044
+ ---
1045
+
1046
+ ## show
1047
+
1048
+ **Workspace only**: yes
1049
+ **Description**: show a component
1050
+
1051
+ `bit show <id>`
1052
+
1053
+ | **Option** | **Option alias** | **Description** |
1054
+ | ----------- | :--------------: | -------------------------------------------------------------------------------------------------------- |
1055
+ | `--json` | `-j` | return the component data in json format |
1056
+ | `--legacy` | `-l` | use the legacy bit show. |
1057
+ | `--remote` | `-r` | show a remote component |
1058
+ | `--compare` | `-c` | compare current file system component to latest tagged component [default=latest]. only works in legacy. |
1059
+
1060
+ ---
1061
+
1062
+ ## start
1063
+
1064
+ **Alias**: `c`
1065
+ **Workspace only**: yes
1066
+ **Description**: Start a dev environment for a workspace or a specific component
1067
+
1068
+ `bit start [type] [pattern]`
1069
+
1070
+ | **Option** | **Option alias** | **Description** |
1071
+ | -------------------- | :--------------: | ------------------------------------------------------------ |
1072
+ | `--dev` | `-d` | start UI server in dev mode. |
1073
+ | `--port [number]` | `-p` | port of the UI server. |
1074
+ | `--rebuild` | `-r` | rebuild the UI |
1075
+ | `--verbose` | `-v` | showing verbose output for inspection and prints stack trace |
1076
+ | `--no-browser` | | do not automatically open browser when ready |
1077
+ | `--skip-compilation` | | skip the auto-compilation before starting the web-server |
1078
+
1079
+ ---
1080
+
1081
+ ## status
1082
+
1083
+ **Alias**: `s`
1084
+ **Workspace only**: yes
1085
+ **Description**: show the working area component(s) status.
1086
+ https://bit.dev/docs/workspace/workspace-status
1087
+
1088
+ `bit status`
1089
+
1090
+ | **Option** | **Option alias** | **Description** |
1091
+ | ---------- | :--------------: | -------------------------------------- |
1092
+ | `--json` | `-j` | return a json version of the component |
1093
+ | `--strict` | | in case issues found, exit with code 1 |
1094
+
1095
+ ---
1096
+
1097
+ ## tag
1098
+
1099
+ **Alias**: `t`
1100
+ **Workspace only**: yes
1101
+ **Description**: record component changes and lock versions.
1102
+ if no ids are provided, it will tag all new and modified components.
1103
+ if component ids are entered, you can specify a version per id using "@" sign, e.g. bit tag foo@1.0.0 bar@minor baz@major
1104
+ https://bit.dev/components/tags
1105
+ you can use a pattern for multiple ids, such as bit tag "utils/\*". (wrap the pattern with quotes to avoid collision with shell commands)
1106
+
1107
+ `bit tag [id...]`
1108
+
1109
+ | **Option** | **Option alias** | **Description** |
1110
+ | ---------------------------- | :--------------: | ----------------------------------------------------------------------------------------------------------------------- |
1111
+ | `--message <message>` | `-m` | log message describing the user changes |
1112
+ | `--unmodified` | | include unmodified components (by default, only new and modified components are tagged) |
1113
+ | `--editor [editor]` | | EXPERIMENTAL. open an editor to edit the tag messages per component, optionally specify the editor-name, default to vim |
1114
+ | `--ver <version>` | `-v` | tag with the given version |
1115
+ | `--patch` | `-p` | increment the patch version number |
1116
+ | `--minor` | | increment the minor version number |
1117
+ | `--major` | | increment the major version number |
1118
+ | `--snapped` | | tag components that their head is a snap (not a tag) |
1119
+ | `--pre-release [identifier]` | | EXPERIMENTAL. increment a pre-release version (e.g. 1.0.0-dev.1) |
1120
+ | `--skip-tests` | | skip running component tests during tag process |
1121
+ | `--skip-auto-tag` | | skip auto tagging dependents |
1122
+ | `--soft` | | do not persist. only keep note of the changes to be made |
1123
+ | `--persist` | | persist the changes generated by --soft tag |
1124
+ | `--disable-tag-pipeline` | | skip the tag pipeline to avoid publishing the components |
1125
+ | `--force-deploy` | | run the tag pipeline although the build failed |
1126
+ | `--increment-by <number>` | | (default to 1) increment semver flag (patch/minor/major) by. e.g. incrementing patch by 2: 0.0.1 -> 0.0.3. |
1127
+ | `--ignore-issues [issues]` | `-i` | ignore component issues (shown in "bit status" as "issues found"), issues to ignore: |
1128
+
1129
+ [MissingPackagesDependenciesOnFs, MissingComponents, UntrackedDependencies, ResolveErrors, RelativeComponents, RelativeComponentsAuthored, ParseErrors, MissingLinks, MissingDists, LegacyInsideHarmony, MissingDependenciesOnFs, MissingCustomModuleResolutionLinks, ImportNonMainFiles, CustomModuleResolutionUsed, MultipleEnvs, MissingLinksFromNodeModulesToSrc, CircularDependencies]
1130
+ to ignore multiple issues, separate them by a comma and wrap with quotes. to ignore all issues, specify "\*".|
1131
+ |`--ignore-newest-version`|`-I`|ignore existing of newer versions (default = false)|
1132
+ |`--build`|`-b`|EXPERIMENTAL. not needed for now. run the pipeline build and complete the tag|
1133
+ |`--all [version]`|`-a`|DEPRECATED (not needed anymore, it is the default now). tag all new and modified components|
1134
+ |`--scope [version]`|`-s`|DEPRECATED (use "--unmodified" instead). tag all components of the current scope|
1135
+ |`--force`|`-f`|DEPRECATED (use "--skip-tests" or "--unmodified" instead). force-tag even if tests are failing and even when component has not changed|
1136
+ |`--disable-deploy-pipeline`| |DEPRECATED. use --disable-tag-pipeline instead|
1137
+
1138
+ ---
1139
+
1140
+ ## templates
1141
+
1142
+ **Workspace only**: yes
1143
+ **Description**: list components templates when inside bit-workspace (for bit-create), otherwise, list workspace templates (for bit-new)
1144
+
1145
+ `bit templates`
1146
+
1147
+ | **Option** | **Option alias** | **Description** |
1148
+ | ------------ | :--------------: | --------------------- |
1149
+ | `--show-all` | `-s` | show hidden templates |
1150
+
1151
+ ---
1152
+
1153
+ ## test
1154
+
1155
+ **Alias**: `at`
1156
+ **Workspace only**: yes
1157
+ **Description**: test set of components in your workspace
1158
+
1159
+ `bit test [pattern]`
1160
+
1161
+ | **Option** | **Option alias** | **Description** |
1162
+ | -------------------- | :--------------: | -------------------------------------------------------------------- |
1163
+ | `--watch` | `-w` | start the tester in watch mode. |
1164
+ | `--debug` | `-d` | start the tester in debug mode. |
1165
+ | `--all` | `-a` | test all components, not only new and modified |
1166
+ | `--junit <filepath>` | | write tests results as JUnit XML format into the specified file path |
1167
+ | `--coverage` | | show code coverage data |
1168
+ | `--env <id>` | `-e` | test only the given env |
1169
+ | `--scope <scope>` | `-s` | name of the scope to test |
1170
+
1171
+ ---
1172
+
1173
+ ## ui-build
1174
+
1175
+ **Alias**: `c`
1176
+ **Workspace only**: yes
1177
+ **Description**: build production assets for deployment.
1178
+
1179
+ `bit ui-build [type]`
1180
+
1181
+ ---
1182
+
1183
+ ## undeprecate
1184
+
1185
+ **Workspace only**: no
1186
+ **Description**: undeprecate a deprecated component (local/remote)
1187
+
1188
+ `bit undeprecate <id>`
1189
+
1190
+ ---
1191
+
1192
+ ## uninstall
1193
+
1194
+ **Alias**: `un`
1195
+ **Workspace only**: yes
1196
+ **Description**: uninstall dependencies
1197
+
1198
+ `bit uninstall [packages...]`
1199
+
1200
+ ---
1201
+
1202
+ ## untag
1203
+
1204
+ **Workspace only**: yes
1205
+ **Description**: revert version(s) tagged for component(s)
1206
+ https://bit.dev/docs/components/tags#undoing-a-tag
1207
+ you can use a pattern for multiple ids, such as bit untag "utils/\*". (wrap the pattern with quotes to avoid collision with shell commands)
1208
+
1209
+ `bit untag [id] [version]`
1210
+
1211
+ | **Option** | **Option alias** | **Description** |
1212
+ | ---------- | :--------------: | ----------------------------------------------------------------------------------------------------- |
1213
+ | `--all` | `-a` | revert tag for all tagged components |
1214
+ | `--soft` | | harmony - revert only soft-tags (components tagged with --soft flag) |
1215
+ | `--force` | `-f` | revert the tag even if used as a dependency. WARNING: components that depend on this tag will corrupt |
1216
+
1217
+ ---
1218
+
1219
+ ## update
1220
+
1221
+ **Alias**: `up`
1222
+ **Workspace only**: yes
1223
+ **Description**: update dependencies
1224
+
1225
+ `bit update`
1226
+
1227
+ | **Option** | **Option alias** | **Description** |
1228
+ | ---------- | :--------------: | ------------------------------------------ |
1229
+ | `--yes` | `-y` | automatically update all outdated packages |
1230
+
1231
+ ---
1232
+
1233
+ ## use
1234
+
1235
+ **Workspace only**: yes
1236
+ **Description**: set up aspects in the workspace/scope config
1237
+
1238
+ `bit use [ids...]`
1239
+
1240
+ ---
1241
+
1242
+ ## watch
1243
+
1244
+ **Workspace only**: yes
1245
+ **Description**: watch a set of components
1246
+
1247
+ `bit watch`
1248
+
1249
+ | **Option** | **Option alias** | **Description** |
1250
+ | ------------------------ | :--------------: | ------------------------------------------------------------------------------------------------------------------------------------------------- |
1251
+ | `--verbose` | `-v` | showing npm verbose output for inspection and prints stack trace |
1252
+ | `--skip-pre-compilation` | | skip the compilation step before starting to watch |
1253
+ | `--check-types [string]` | `-t` | EXPERIMENTAL. show errors/warnings for types. options are [file, project] to investigate only changed file or entire project. defaults to project |
1254
+
1255
+ ---