@teambit/harmony.content.cli-reference 2.0.265 → 2.0.267

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cli-reference.mdx CHANGED
@@ -1,37 +1,47 @@
1
- ---
2
- id: cli-all
3
- title: CLI Commands
4
- ---
5
-
6
1
  # CLI Reference
7
2
 
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.
3
+ Run the following to list all available Bit commands (alternatively, use the `-h` alias, instead of `--help`):
4
+
5
+ ```sh
6
+ bit --help
7
+ ```
8
+
9
+ Run the following to get help on a specific command:
10
+
11
+ ```sh
12
+ bit COMMAND --help
13
+ ```
14
+
15
+ Run the following to get help on a specific sub-command:
16
+
17
+ ```sh
18
+ bit COMMAND SUB_COMMAND --help
19
+ ```
9
20
 
10
21
  ## add
11
22
 
12
23
  **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/reference/components/adding-components
24
+ **Description**: Add any subset of files to be tracked as a component(s).
25
+ Learn the recommended workflow for tracking directories as components, in the link below.
17
26
 
18
27
  `bit add [path...]`
19
28
 
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) |
29
+ | **Option** | **Option alias** | **Description** |
30
+ | ------------------------- | :--------------: | ----------------------------------------------------------------------------------------------- |
31
+ | `--id <name>` | `-i` | manually set component id |
32
+ | `--main <file>` | `-m` | define component entry point |
33
+ | `--namespace <namespace>` | `-n` | organize component in a namespace |
34
+ | `--override <boolean>` | `-o` | override existing component if exists (default = false) |
35
+ | `--scope <string>` | `-s` | sets the component's scope. if not entered, the default-scope from workspace.jsonc will be used |
36
+ | `--env <string>` | `-e` | set the component's environment. (overrides the env from variants if exists) |
37
+ | `--json` | `-j` | output as json format |
28
38
 
29
39
  ---
30
40
 
31
41
  ## app
32
42
 
33
- **Workspace only**: yes
34
- **Description**: manage applications
43
+ **Alias**: `apps`
44
+ **Description**: Manages apps
35
45
 
36
46
  `bit app <sub-command>`
37
47
 
@@ -39,23 +49,43 @@ Commands that are marked as workspace only must be executed inside a workspace.
39
49
 
40
50
  **Usage**: `app list`
41
51
 
42
- **Description**: list all registered applications
52
+ **Description**: list all registered apps
43
53
 
44
54
  | **Option** | **Option alias** | **Description** |
45
55
  | ---------- | :--------------: | ---------------------------------------- |
46
56
  | `--json` | `-j` | return the component data in json format |
47
57
 
58
+ ### app run
59
+
60
+ **Usage**: `app run <app-name>`
61
+
62
+ **Description**: locally run an app component (independent of bit's dev server)
63
+
64
+ | **Arg** | **Description** |
65
+ | ---------- | :--------------------------------------------------------------------------------------------------: |
66
+ | `app-name` | the app's name is registered by the app (run 'bit app list' to list the names of the available apps) |
67
+
68
+ | **Option** | **Option alias** | **Description** |
69
+ | ---------------------- | :--------------: | -------------------------------------------------------- |
70
+ | `--dev` | `-d` | start the application in dev mode. |
71
+ | `--port [port-number]` | `-p` | port to run the app on |
72
+ | `--verbose` | `-v` | show verbose output for inspection and print stack trace |
73
+ | `--watch` | `-w` | watch and compile your components upon changes |
74
+
48
75
  ---
49
76
 
50
77
  ## artifacts
51
78
 
52
- **Workspace only**: yes
53
- **Description**: EXPERIMENTAL. list and download components artifacts.
79
+ **Description**: list and download component artifacts
54
80
  artifacts are created on isolated capsules during tag or snap commands.
55
81
  example of artifacts are dists files generated by a compiler, a JUnit.xml file generated by a tester
56
82
  and a package.tgz file generated by pkg aspect.
57
83
 
58
- `bit artifacts <pattern...>`
84
+ `bit artifacts <component-pattern>`
85
+
86
+ | **Arg** | **Description** |
87
+ | ------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
88
+ | `component-pattern` | component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
59
89
 
60
90
  | **Option** | **Option alias** | **Description** |
61
91
  | ---------------------- | :--------------: | -------------------------------------------------------------------------------------------------------- |
@@ -68,8 +98,7 @@ and a package.tgz file generated by pkg aspect.
68
98
 
69
99
  ## aspect
70
100
 
71
- **Workspace only**: yes
72
- **Description**: EXPERIMENTAL. manage aspects
101
+ **Description**: manage aspects
73
102
 
74
103
  `bit aspect <sub-command>`
75
104
 
@@ -77,98 +106,118 @@ and a package.tgz file generated by pkg aspect.
77
106
 
78
107
  **Usage**: `aspect list [pattern]`
79
108
 
80
- **Description**: list all aspects configured on component(s)
81
- 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"
82
- always wrap the pattern with quotes to avoid collision with shell commands.
83
- to validate the pattern before running this command, run `bit pattern <pattern>`.
109
+ **Description**: list all aspects configured on component(s)
110
+
111
+ | **Arg** | **Description** |
112
+ | --------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
113
+ | `pattern` | component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
84
114
 
85
- | **Option** | **Option alias** | **Description** |
86
- | ---------- | :--------------: | ------------------------------------------------- |
87
- | `--debug` | `-d` | show the origins were the aspects were taken from |
115
+ | **Option** | **Option alias** | **Description** |
116
+ | ---------- | :--------------: | -------------------------------------------------- |
117
+ | `--debug` | `-d` | show the origins where the aspects were taken from |
88
118
 
89
119
  ### aspect get
90
120
 
91
- **Usage**: `aspect get <component-id>`
121
+ **Usage**: `aspect get <component-name>`
122
+
123
+ **Description**: list the aspects set on a component, as well as their configs and data
92
124
 
93
- **Description**: show aspects' data and configuration of the given component
125
+ | **Arg** | **Description** |
126
+ | ---------------- | :-----------------------------------------------------: |
127
+ | `component-name` | the component name or component id to fetch aspects for |
94
128
 
95
- | **Option** | **Option alias** | **Description** |
96
- | ---------- | :--------------: | ------------------------------------------------- |
97
- | `--debug` | `-d` | show the origins were the aspects were taken from |
98
- | `--json` | `-j` | format as json |
129
+ | **Option** | **Option alias** | **Description** |
130
+ | ---------- | :--------------: | -------------------------------------------------- |
131
+ | `--debug` | `-d` | show the origins where the aspects were taken from |
132
+ | `--json` | `-j` | format as json |
99
133
 
100
134
  ### aspect set
101
135
 
102
136
  **Usage**: `aspect set <pattern> <aspect-id> [config]`
103
137
 
104
- **Description**: set an aspect to component(s) with optional config.
105
- enter the config as stringified JSON (e.g. '{"foo":"bar"}' ).
106
- if no config entered, the aspect will be set with empty config ({}).
107
- 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"
108
- always wrap the pattern with quotes to avoid collision with shell commands.
109
- to validate the pattern before running this command, run `bit pattern <pattern>`.
138
+ **Description**: set components with an aspect to extend their development tools, metadata and (possibly) artifacts
139
+
140
+ | **Arg** | **Description** |
141
+ | ----------- | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
142
+ | `pattern` | the components to extend. component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
143
+ | `aspect-id` | the aspect's component id |
144
+ | `config` | the aspect config. enter the config as a stringified JSON (e.g. '{"foo":"bar"}' ). when no config is provided, an aspect is set with an empty config ({}). |
145
+
146
+ | **Option** | **Option alias** | **Description** |
147
+ | ---------- | :--------------: | ---------------------------------------------------------------------------------------------- |
148
+ | `--merge` | `-m` | merge with an existing config if exits. (by default, it replaces overlapping existing configs) |
110
149
 
111
150
  ### aspect unset
112
151
 
113
152
  **Usage**: `aspect unset <pattern> <aspect-id>`
114
153
 
115
- **Description**: unset an aspect from component(s).
116
- 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"
117
- always wrap the pattern with quotes to avoid collision with shell commands.
118
- to validate the pattern before running this command, run `bit pattern <pattern>`.
154
+ **Description**: unset an aspect from component(s).
155
+
156
+ | **Arg** | **Description** |
157
+ | ----------- | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
158
+ | `pattern` | the components to target. component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
159
+ | `aspect-id` | the aspect's component id |
119
160
 
120
161
  ### aspect update
121
162
 
122
163
  **Usage**: `aspect update <aspect-id> [pattern]`
123
164
 
124
- **Description**: update a version of an aspect
125
- default to all components using the aspect, unless "pattern" is provided.
126
- 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"
127
- always wrap the pattern with quotes to avoid collision with shell commands.
128
- to validate the pattern before running this command, run `bit pattern <pattern>`.
165
+ **Description**: update a version of an aspect for all or specified components
129
166
 
130
- examples:
131
- "bit aspect update scope.org/aspect '**/ui/**'" - update "ui" components that use scope.org/aspect to the latest version
132
- "bit aspect update scope.org/aspect@2.0.0" - updates all components using scope.org/aspect to version 2.0.0.
167
+ | **Arg** | **Description** |
168
+ | ----------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
169
+ | `aspect-id` | the aspect's component id. optionally, add a version (id@version), otherwise will use the latest version from the remote |
170
+ | `pattern` | the components to update (defaults to all components). component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
133
171
 
134
172
  ---
135
173
 
136
174
  ## build
137
175
 
138
- **Workspace only**: yes
139
- **Description**: run set of tasks for build
176
+ **Description**: run set of tasks for build.
177
+ by default, only new and modified components are built.
178
+ the build takes place in an isolated directories on the filesystem (called "capsules"). the component files are copied to these directories
179
+ and the package-manager installs the dependencies in the capsules root. once done, the build pipeline is running.
180
+ because this process can take a while on a large workspace, some flags are available to shorten the process. See the example section for more info.
140
181
 
141
- `bit build [pattern]`
182
+ `bit build [component-pattern]`
142
183
 
143
- | **Option** | **Option alias** | **Description** |
144
- | ----------------------------------------------------------------------------------------------------------- | :--------------: | ----------------------------------------------------------------------------------------------- |
145
- | `--all` | `-a` | build all components, not only modified and new |
146
- | `--dev` | `-d` | run the pipeline in dev mode |
147
- | `--install` | | install core aspects in capsules |
148
- | `--reuse-capsules` | | avoid deleting the capsules root-dir before starting the build |
149
- | `--tasks <string>` | | build the specified task(s) only. for multiple tasks, separate by a comma and wrap with quotes. |
150
- | specify the task-name (e.g. "TypescriptCompiler") or the task-aspect-id (e.g. teambit.compilation/compiler) |
151
- | `--cache-packages-on-capsule-root` | | set the package-manager cache on the capsule root |
152
- | `--list-tasks <string>` | | list tasks of an env or a component-id for each one of the pipelines: build, tag and snap |
184
+ | **Arg** | **Description** |
185
+ | ------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
186
+ | `component-pattern` | component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
187
+
188
+ | **Option** | **Option alias** | **Description** |
189
+ | ---------------------------------- | :--------------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
190
+ | `--unmodified` | `-u` | include unmodified components (by default, only new and modified components are built) |
191
+ | `--dev` | `-d` | run the pipeline in dev mode |
192
+ | `--install` | | install core aspects in capsules |
193
+ | `--reuse-capsules` | | avoid deleting the capsules root-dir before starting the build |
194
+ | `--rewrite` | | use only with --reuse-capsules. rewrite the component files |
195
+ | `--reinstall` | | use only with --reuse-capsules. rerun the installation |
196
+ | `--tasks <string>` | | build the specified task(s) only. for multiple tasks, separate by a comma and wrap with quotes. specify the task-name (e.g. "TypescriptCompiler") or the task-aspect-id (e.g. teambit.compilation/compiler) |
197
+ | `--cache-packages-on-capsule-root` | | set the package-manager cache on the capsule root |
198
+ | `--list-tasks <string>` | | list tasks of an env or a component-id for each one of the pipelines: build, tag and snap |
199
+ | `--skip-tests` | | skip running component tests during build process |
200
+ | `--fail-fast` | | stop pipeline execution on the first failed task (by default a task is skipped only when its dependency failed) |
201
+ | `--include-snap` | | EXPERIMENTAL. include snap pipeline tasks. Warning: this may deploy/publish if you have such tasks |
202
+ | `--include-tag` | | EXPERIMENTAL. include tag pipeline tasks. Warning: this may deploy/publish if you have such tasks |
153
203
 
154
204
  ---
155
205
 
156
206
  ## capsule
157
207
 
158
- **Workspace only**: yes
159
- **Description**: manage capsules.
160
- a capsule is a directory contains the component code, isolated from the workspace.
208
+ **Description**: manage capsules
209
+ a capsule is a directory containing the component code, isolated from the workspace.
161
210
  normally, capsules are created during the build process, the component files are copied and the packages are installed
162
211
  via the configured package-manager. the purpose is to compile/test them in isolation to make sure they will work for
163
212
  other users after publishing/exporting them.
164
213
 
165
- `bit capsule <sub-command>`
214
+ `bit capsule`
166
215
 
167
216
  ### capsule list
168
217
 
169
218
  **Usage**: `capsule list`
170
219
 
171
- **Description**: list all capsules
220
+ **Description**: list the capsules generated for this workspace
172
221
 
173
222
  | **Option** | **Option alias** | **Description** |
174
223
  | ---------- | :--------------: | --------------- |
@@ -176,9 +225,9 @@ other users after publishing/exporting them.
176
225
 
177
226
  ### capsule create
178
227
 
179
- **Usage**: `capsule create [componentIds...]`
228
+ **Usage**: `capsule create [component-id...]`
180
229
 
181
- **Description**: create capsules
230
+ **Description**: create capsules for components
182
231
 
183
232
  | **Option** | **Option alias** | **Description** |
184
233
  | -------------------------- | :--------------: | ------------------------------------------------------------------------------------------------------- |
@@ -187,6 +236,7 @@ other users after publishing/exporting them.
187
236
  | `--always-new` | `-a` | create new environment for capsule |
188
237
  | `--seeders-only` | `-s` | create capsules for the seeders only (not for the entire graph) |
189
238
  | `--id <name>` | `-i` | reuse capsule of certain name |
239
+ | `--use-hash` | | whether to use hash function (of base dir) as capsules root dir name |
190
240
  | `--json` | `-j` | json format |
191
241
  | `--install-packages` | `-d` | install packages by the package-manager |
192
242
  | `--package-manager <name>` | `-p` | npm, yarn or pnpm, default to npm |
@@ -195,21 +245,29 @@ other users after publishing/exporting them.
195
245
 
196
246
  **Usage**: `capsule delete`
197
247
 
198
- **Description**: delete capsules. with no args, only workspace's capsules are deleted
248
+ **Description**: delete capsules
249
+ with no args, only workspace's capsules are deleted
199
250
 
200
251
  | **Option** | **Option alias** | **Description** |
201
252
  | ----------------- | :--------------: | ------------------------------------------------- |
202
253
  | `--scope-aspects` | | delete scope-aspects capsules |
203
254
  | `--all` | `-a` | delete all capsules for all workspaces and scopes |
204
255
 
256
+ | **Option** | **Option alias** | **Description** |
257
+ | ---------- | :--------------: | --------------- |
258
+ | `--json` | `-j` | json format |
259
+
205
260
  ---
206
261
 
207
262
  ## check-types
208
263
 
209
- **Workspace only**: yes
210
264
  **Description**: check typescript types
211
265
 
212
- `bit check-types [pattern]`
266
+ `bit check-types [component-pattern]`
267
+
268
+ | **Arg** | **Description** |
269
+ | ------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
270
+ | `component-pattern` | component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
213
271
 
214
272
  | **Option** | **Option alias** | **Description** |
215
273
  | ---------- | :--------------: | --------------------------------------------------------- |
@@ -221,43 +279,44 @@ other users after publishing/exporting them.
221
279
  ## checkout
222
280
 
223
281
  **Alias**: `U`
224
- **Workspace only**: yes
225
- **Description**: switch between component versions or remove local changes
226
- `bit checkout <version> [ids...]` => checkout the specified ids (or all components when --all is used) to the specified version
227
- `bit checkout latest [ids...]` => checkout the specified ids (or all components when --all is used) to their latest versions
228
- `bit checkout [ids...] --reset` => remove local modifications from the specified ids (or all components when --all is used)
229
- 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)
230
-
231
- `bit checkout [values...]`
232
-
233
- | **Option** | **Option alias** | **Description** |
234
- | -------------------------------- | :--------------: | ------------------------------------------------------------------------------------------------------------------------------------------------- |
235
- | `--interactive-merge` | `-i` | when a component is modified and the merge process found conflicts, display options to resolve them |
236
- | `--ours` | `-o` | in case of a conflict, override the used version with the current modification |
237
- | `--theirs` | `-t` | in case of a conflict, override the current modification with the specified version |
238
- | `--manual` | `-m` | in case of a conflict, leave the files with a conflict state to resolve them manually later |
239
- | `--reset` | `-r` | remove local changes |
240
- | `--all` | `-a` | all components |
241
- | `--verbose` | `-v` | showing verbose output for inspection |
242
- | `--skip-npm-install` | | DEPRECATED. use "--skip-dependency-installation" instead |
243
- | `--skip-dependency-installation` | | do not install packages of the imported components |
244
- | `--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) |
245
- | `--conf [path]` | | write the configuration file (bit.json) and the envs configuration files (use --conf without path to write to the default dir) |
246
- | `--ignore-dist` | | do not write dist files (when exist) |
282
+ **Description**: switch between component versions or remove local changes
283
+
284
+ `bit checkout <version> [component-pattern]` => checkout the specified ids (or all components when --all is used) to the specified version
285
+ `bit checkout head [component-pattern]` => checkout to the last snap/tag (use --latest if you only want semver tags), omit [component-pattern] to checkout head for all
286
+ `bit checkout latest [component-pattern]` => checkout to the latest satisfying semver tag, omit [component-pattern] to checkout latest for all
287
+ `bit checkout reset [component-pattern]` => remove local modifications from the specified ids (or all components when --all is used). also, if a component dir is deleted from the filesystem, it'll be restored
288
+ when on a lane, "checkout head" only checks out components on this lane. to update main components, run "bit lane merge main"
289
+
290
+ `bit checkout <to> [component-pattern]`
291
+
292
+ | **Arg** | **Description** |
293
+ | ------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
294
+ | `to` | permitted values: [head, latest, reset, specific-version]. 'head' - last snap/tag. 'latest' - semver latest tag. 'reset' - removes local changes |
295
+ | `component-pattern` | component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
296
+
297
+ | **Option** | **Option alias** | **Description** |
298
+ | --------------------------------------- | :--------------: | ---------------------------------------------------------------------------------------------------------------------------------------- |
299
+ | `--interactive-merge` | `-i` | when a component is modified and the merge process found conflicts, display options to resolve them |
300
+ | `--auto-merge-resolve <merge-strategy>` | | in case of merge conflict, resolve according to the provided strategy: [ours, theirs, manual] |
301
+ | `--manual` | | same as "--auto-merge-resolve manual". in case of merge conflict, write the files with the conflict markers |
302
+ | `--all` | `-a` | all components |
303
+ | `--workspace-only` | `-e` | only relevant for 'bit checkout head' when on a lane. don't import components from the remote lane that are not already in the workspace |
304
+ | `--verbose` | `-v` | showing verbose output for inspection |
305
+ | `--skip-dependency-installation` | `-x` | do not auto-install dependencies of the imported components |
306
+ | `--force-ours` | | do not merge, preserve local files as is |
307
+ | `--force-theirs` | | do not merge, just overwrite with incoming files |
247
308
 
248
309
  ---
249
310
 
250
311
  ## clear-cache
251
312
 
252
313
  **Alias**: `cc`
253
- **Workspace only**: no
254
314
  **Description**: clears Bit's cache from current working machine
255
315
  The following gets removed by this command:
256
316
 
257
317
  1. V8 compiled code (generated the first time Bit is loaded by v8-compile-cache package)
258
- 2. components cache on the filesystem (mainly the dependencies graph and reference)
259
- 3. scope's index file, which maps the component-id:object-hash
260
- https://bit.dev/reference/workspace/clearing-cache
318
+ 2. components cache on the filesystem (mainly the dependencies graph and docs)
319
+ 3. scope's index file, which maps the component-id:object-hash
261
320
 
262
321
  `bit clear-cache`
263
322
 
@@ -269,7 +328,6 @@ The following gets removed by this command:
269
328
 
270
329
  ## cli
271
330
 
272
- **Workspace only**: yes
273
331
  **Description**: EXPERIMENTAL. enters bit cli program and generates commands list
274
332
 
275
333
  `bit cli`
@@ -278,20 +336,25 @@ The following gets removed by this command:
278
336
 
279
337
  **Usage**: `cli generate`
280
338
 
281
- **Description**: EXPERIMENTAL. generate an .md file with all commands details
339
+ **Description**: generate an .md file with all commands details
282
340
 
283
341
  | **Option** | **Option alias** | **Description** |
284
342
  | ------------ | :--------------: | ------------------------------------------------------------------------------------------------------------------------------ |
285
343
  | `--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 |
344
+ | `--docs` | | generate the cli-reference.docs.mdx file |
345
+ | `--json` | `-j` | output the commands info as JSON |
286
346
 
287
347
  ---
288
348
 
289
349
  ## compile
290
350
 
291
- **Workspace only**: yes
292
- **Description**: compile components in the development workspace
351
+ **Description**: compile components in the workspace
352
+
353
+ `bit compile [component-names...]`
293
354
 
294
- `bit compile [component...]`
355
+ | **Arg** | **Description** |
356
+ | -------------------- | :---------------------------------------------------------------------: |
357
+ | `component-names...` | a list of component names or component IDs (defaults to all components) |
295
358
 
296
359
  | **Option** | **Option alias** | **Description** |
297
360
  | ------------------- | :--------------: | ------------------------------------------------------------- |
@@ -304,31 +367,16 @@ The following gets removed by this command:
304
367
 
305
368
  ## completion
306
369
 
307
- **Workspace only**: yes
308
370
  **Description**: enable bash/zsh-completion shortcuts for commands and options
309
371
 
310
372
  `bit completion`
311
373
 
312
374
  ---
313
375
 
314
- ## component-issues
315
-
316
- **Workspace only**: yes
317
- **Description**: list available component-issues
318
-
319
- `bit component-issues`
320
-
321
- | **Option** | **Option alias** | **Description** |
322
- | ---------- | :--------------: | --------------- |
323
- | `--json` | `-j` | json format |
324
-
325
- ---
326
-
327
376
  ## config
328
377
 
329
- **Workspace only**: yes
330
- **Description**: global config management.
331
- https://bit.dev/reference/config/bit-config
378
+ **Description**: global config management
379
+ https://bit.dev/reference/config/bit-config
332
380
 
333
381
  `bit config`
334
382
 
@@ -336,7 +384,9 @@ The following gets removed by this command:
336
384
 
337
385
  **Usage**: `config set <key> <val>`
338
386
 
339
- **Description**: set a global configuration
387
+ **Description**: set a global configuration
388
+ to set temporary configuration by env variable, prefix with "BIT*CONFIG", replace "." with "*" and change to upper case.
389
+ for example, "user.token" becomes "BIT_CONFIG_USER_TOKEN"
340
390
 
341
391
  ### config del
342
392
 
@@ -348,7 +398,7 @@ The following gets removed by this command:
348
398
 
349
399
  **Usage**: `config get <key>`
350
400
 
351
- **Description**: get a global configuration
401
+ **Description**: get a value from global configuration
352
402
 
353
403
  ### config list
354
404
 
@@ -360,132 +410,284 @@ The following gets removed by this command:
360
410
 
361
411
  ## create
362
412
 
363
- **Workspace only**: yes
364
- **Description**: create a new component from a template
413
+ **Description**: create a new component (source files and config) using a template.
414
+
415
+ `bit create <template-name> <component-names...>`
365
416
 
366
- `bit create <templateName> <componentNames...>`
417
+ | **Arg** | **Description** |
418
+ | -------------------- | :-----------------------------------------------------------------------------------------------: |
419
+ | `template-name` | the template for generating the component (run 'bit templates' for a list of available templates) |
420
+ | `component-names...` | a list of component names to generate |
367
421
 
368
422
  | **Option** | **Option alias** | **Description** |
369
423
  | ---------------------- | :--------------: | ----------------------------------------------------------------------------------- |
370
424
  | `--namespace <string>` | `-n` | sets the component's namespace and nested dirs inside the scope |
371
425
  | `--scope <string>` | `-s` | sets the component's scope-name. if not entered, the default-scope will be used |
372
426
  | `--aspect <string>` | `-a` | aspect-id of the template. helpful when multiple aspects use the same template name |
427
+ | `--template <string>` | `-t` | env-id of the template. alias for --aspect. |
373
428
  | `--path <string>` | `-p` | relative path in the workspace. by default the path is `<scope>/<namespace>/<name>` |
374
429
  | `--env <string>` | `-e` | set the component's environment. (overrides the env from variants and the template) |
430
+ | `--force` | `-f` | replace existing files at the target location |
375
431
 
376
432
  ---
377
433
 
378
- ## dependencies
434
+ ## delete
379
435
 
380
- **Workspace only**: yes
381
- **Description**: EXPERIMENTAL. show dependencies (direct and indirect) of the given component
436
+ **Description**: mark components as deleted on the remote
437
+ to remove components from your local workspace only, use "bit remove" command.
438
+ this command marks the components as deleted, and after snap/tag and export they will be marked as deleted from the remote scope as well.
382
439
 
383
- `bit dependencies <id>`
440
+ `bit delete <component-pattern>`
384
441
 
385
- | **Option** | **Option alias** | **Description** |
386
- | ---------- | :--------------: | -------------------------------------------------------------------- |
387
- | `--debug` | `-d` | show the immediate dependencies and how their version was determined |
442
+ | **Arg** | **Description** |
443
+ | ------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
444
+ | `component-pattern` | component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
445
+
446
+ | **Option** | **Option alias** | **Description** |
447
+ | ------------------ | :--------------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
448
+ | `--lane` | | when on a lane, delete the component from this lane only. avoid merging it to main or other lanes |
449
+ | `--update-main` | | EXPERIMENTAL. delete component/s on the main lane after merging this lane into main |
450
+ | `--range <string>` | | EXPERIMENTAL. enter a Semver range to delete specific tags (cannot be used for snaps). see https://www.npmjs.com/package/semver#ranges for the range syntax |
451
+ | `--silent` | `-s` | skip confirmation |
452
+ | `--hard` | | NOT-RECOMMENDED. delete a component completely from a remote scope. careful! this is a permanent change that could corrupt dependents. |
453
+ | `--force` | `-f` | relevant for --hard. allow the deletion even if used as a dependency. WARNING: components that depend on this component will corrupt |
388
454
 
389
455
  ---
390
456
 
391
457
  ## dependents
392
458
 
393
- **Workspace only**: yes
394
- **Description**: EXPERIMENTAL. show dependents of the given component
459
+ **Description**: show dependents of the given component
395
460
 
396
- `bit dependents <id>`
461
+ `bit dependents <component-name>`
397
462
 
398
463
  ---
399
464
 
400
465
  ## deprecate
401
466
 
402
467
  **Alias**: `d`
403
- **Workspace only**: no
404
468
  **Description**: deprecate a component
405
469
 
406
- `bit deprecate <id>`
470
+ `bit deprecate <component-name>`
471
+
472
+ | **Arg** | **Description** |
473
+ | ---------------- | :----------------------------: |
474
+ | `component-name` | component name or component id |
407
475
 
408
- | **Option** | **Option alias** | **Description** |
409
- | ------------------- | :--------------: | ------------------------------------------------------------ |
410
- | `--new-id <string>` | | if replaced by another component, enter the new component id |
476
+ | **Option** | **Option alias** | **Description** |
477
+ | ------------------- | :--------------: | --------------------------------------------------------------------------------------------------------------------------------- |
478
+ | `--new-id <string>` | | if replaced by another component, enter the new component id. alternatively use "bit rename --deprecate" to do this automatically |
479
+ | `--range <string>` | | enter a Semver range to deprecate specific versions. see https://www.npmjs.com/package/semver#ranges for the range syntax |
480
+
481
+ ---
482
+
483
+ ## deps
484
+
485
+ **Alias**: `dependencies`
486
+ **Description**: manage dependencies
487
+
488
+ `bit deps <sub-command>`
489
+
490
+ ### deps get
491
+
492
+ **Usage**: `deps get <component-name>`
493
+
494
+ **Description**: show direct and indirect dependencies of the given component
495
+
496
+ | **Arg** | **Description** |
497
+ | ---------------- | :----------------------------: |
498
+ | `component-name` | component name or component id |
499
+
500
+ | **Option** | **Option alias** | **Description** |
501
+ | ---------- | :--------------: | ---------------------------------------------------------------- |
502
+ | `--scope` | | get the data from the scope instead of the workspace |
503
+ | `--tree` | `-t` | EXPERIMENTAL. render dependencies as a tree, similar to "npm ls" |
504
+
505
+ ### deps remove
506
+
507
+ **Usage**: `deps remove <component-pattern> <package...>`
508
+
509
+ **Description**: remove a dependency to component(s)
510
+
511
+ | **Arg** | **Description** |
512
+ | ------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
513
+ | `component-pattern` | component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
514
+ | `package...` | package name with or without a version, e.g. "lodash@1.0.0" or just "lodash" which will remove all lodash instances of any version |
515
+
516
+ | **Option** | **Option alias** | **Description** |
517
+ | ---------- | :--------------: | ---------------------------- |
518
+ | `--dev` | `-d` | remove from devDependencies |
519
+ | `--peer` | `-p` | remove from peerDependencies |
520
+
521
+ ### deps unset
522
+
523
+ **Usage**: `deps unset <component-pattern> <package...>`
524
+
525
+ **Description**: unset a dependency to component(s) that was previously set by "bit deps set"
526
+
527
+ | **Arg** | **Description** |
528
+ | ------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
529
+ | `component-pattern` | component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
530
+ | `package...` | package name with or without a version, e.g. "lodash@1.0.0" or just "lodash" which will remove all lodash instances of any version |
531
+
532
+ | **Option** | **Option alias** | **Description** |
533
+ | ---------- | :--------------: | --------------------------- |
534
+ | `--dev` | `-d` | unset from devDependencies |
535
+ | `--peer` | `-p` | unset from peerDependencies |
536
+
537
+ ### deps debug
538
+
539
+ **Usage**: `deps debug <component-name>`
540
+
541
+ **Description**: show the immediate dependencies and how their versions were determined
542
+
543
+ | **Arg** | **Description** |
544
+ | ---------------- | :----------------------------: |
545
+ | `component-name` | component name or component id |
546
+
547
+ ### deps set
548
+
549
+ **Usage**: `deps set <component-pattern> <package...>`
550
+
551
+ **Description**: set a dependency to component(s)
552
+
553
+ | **Arg** | **Description** |
554
+ | ------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
555
+ | `component-pattern` | component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
556
+ | `package...` | package name with or without a version, e.g. "lodash@1.0.0" or just "lodash" which will be resolved to the latest |
557
+
558
+ | **Option** | **Option alias** | **Description** |
559
+ | ------------ | :--------------: | ------------------------------- |
560
+ | `--dev` | `-d` | add to the devDependencies |
561
+ | `--optional` | `-o` | add to the optionalDependencies |
562
+ | `--peer` | `-p` | add to the peerDependencies |
563
+
564
+ ### deps reset
565
+
566
+ **Usage**: `deps reset <component-pattern>`
567
+
568
+ **Description**: reset dependencies to the default values (revert any previously "bit deps set")
569
+
570
+ | **Arg** | **Description** |
571
+ | ------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
572
+ | `component-pattern` | component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
573
+
574
+ ### deps eject
575
+
576
+ **Usage**: `deps eject <component-pattern>`
577
+
578
+ **Description**: write dependencies that were previously set via "bit deps set" into .bitmap
579
+
580
+ | **Arg** | **Description** |
581
+ | ------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
582
+ | `component-pattern` | component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
583
+
584
+ ### deps blame
585
+
586
+ **Usage**: `deps blame <component-name> <dependency-name>`
587
+
588
+ **Description**: EXPERIMENTAL. find out which snap/tag changed a dependency version
589
+
590
+ | **Arg** | **Description** |
591
+ | ----------------- | :---------------------------------------------------------------------------: |
592
+ | `dependency-name` | package-name. for components, you can use either component-id or package-name |
593
+
594
+ ### deps usage
595
+
596
+ **Usage**: `deps usage <dependency-name>`
597
+
598
+ **Description**: EXPERIMENTAL. find components that use the specified dependency
599
+
600
+ | **Arg** | **Description** |
601
+ | ----------------- | :------------------------------------------------------------------------------------------------------------------------------------------: |
602
+ | `dependency-name` | package-name. for components, you can use either component-id or package-name. if version is specified, it will search for the exact version |
603
+
604
+ | **Option** | **Option alias** | **Description** |
605
+ | ------------------ | :--------------: | ----------------------------------------- |
606
+ | `--depth <number>` | | max display depth of the dependency graph |
411
607
 
412
608
  ---
413
609
 
414
610
  ## diff
415
611
 
416
- **Workspace only**: yes
417
- **Description**: show diff between components files
418
- bit diff => compare all modified components to their model version
419
- bit diff [ids...] => compare the specified components against their modified states
420
- bit diff [id] [version] => compare the specified version to used or modified files
421
- bit diff [id] [version] [to_version] => compare the specified version files to to_version files
422
- you can use a pattern for multiple ids, such as bit diff "utils/\*". (wrap the pattern with quotes to avoid collision with shell commands)
612
+ **Description**: show the diff between the components' current source files and config, and their latest snapshot or tag
613
+
614
+ `bit diff [component-pattern] [version] [to-version]`
423
615
 
424
- `bit diff [values...]`
616
+ | **Arg** | **Description** |
617
+ | ------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
618
+ | `component-pattern` | component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
619
+ | `version` | specific version to compare against |
620
+ | `to-version` | specific version to compare to |
425
621
 
426
622
  | **Option** | **Option alias** | **Description** |
427
623
  | ----------- | :--------------: | ------------------------------------------------------- |
428
- | `--verbose` | `-v` | show a more verbose output when possible |
624
+ | `--verbose` | `-v` | show a more verbose output where possible |
429
625
  | `--table` | `-t` | show tables instead of plain text for dependencies diff |
430
626
 
431
627
  ---
432
628
 
433
629
  ## doctor
434
630
 
435
- **Workspace only**: yes
436
631
  **Description**: diagnose a bit workspace
437
632
 
438
633
  `bit doctor [diagnosis-name]`
439
634
 
440
- | **Option** | **Option alias** | **Description** |
441
- | ------------------- | :--------------: | ------------------------------- |
442
- | `--json` | `-j` | return diagnoses in json format |
443
- | `--list` | | list all available diagnoses |
444
- | `--save [filePath]` | `-s` | save diagnoses to a file |
635
+ | **Option** | **Option alias** | **Description** |
636
+ | ------------------------ | :--------------: | ------------------------------------------------------------------------------------------------- |
637
+ | `--json` | `-j` | return diagnoses in json format |
638
+ | `--list` | | list all available diagnoses |
639
+ | `--save [filePath]` | `-s` | save diagnoses to a file |
640
+ | `--archive [filePath]` | `-a` | archive the workspace including diagnosis info (by default exclude node-modules and include .bit) |
641
+ | `--include-node-modules` | `-n` | relevant for --archive. include node_modules in the archive file |
642
+ | `--include-public` | `-p` | relevant for --archive. include public folder in the archive file |
643
+ | `--exclude-local-scope` | `-e` | relevant for --archive. exclude .bit or .git/bit from the archive file |
445
644
 
446
645
  ---
447
646
 
448
647
  ## eject
449
648
 
450
649
  **Alias**: `E`
451
- **Workspace only**: yes
452
- **Description**: replaces the components from the local scope with the corresponding packages
453
- 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"
454
- always wrap the pattern with quotes to avoid collision with shell commands.
455
- to validate the pattern before running this command, run `bit pattern <pattern>`.
650
+ **Description**: remove component from the workspace and install it instead as a regular npm package.
651
+ By default the component files will be removed from the workspace
456
652
 
457
- `bit eject <pattern>`
653
+ `bit eject <component-pattern>`
458
654
 
459
- | **Option** | **Option alias** | **Description** |
460
- | -------------- | :--------------: | --------------------------------------------------------------------------------- |
461
- | `--force` | `-f` | ignore local version. remove the components even when they are staged or modified |
462
- | `--json` | `-j` | print the results in JSON format |
463
- | `--keep-files` | | keep the component files in the workspace intact |
655
+ | **Arg** | **Description** |
656
+ | ------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
657
+ | `component-pattern` | component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
658
+
659
+ | **Option** | **Option alias** | **Description** |
660
+ | -------------------------------- | :--------------: | -------------------------------------------------------------------------------------------------------------------------------- |
661
+ | `--force` | `-f` | ignore local changes/versions. eject component/s even when they are staged or modified. Note: unexported tags/snaps will be lost |
662
+ | `--skip-dependency-installation` | `-x` | do not auto-install dependencies |
663
+ | `--json` | `-j` | print the results in JSON format |
664
+ | `--keep-files` | | keep the component files in the workspace intact |
464
665
 
465
666
  ---
466
667
 
467
668
  ## eject-conf
468
669
 
469
- **Workspace only**: yes
470
670
  **Description**: eject components configuration (create a `component.json` file)
471
- 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"
472
- always wrap the pattern with quotes to avoid collision with shell commands.
473
- to validate the pattern before running this command, run `bit pattern <pattern>`.
671
+ note this can be reversed at any time by snapping/tagging changes and deleting the component.json file
672
+ you can use a `<pattern>` for multiple component ids, such as `bit eject-conf "org.scope/utils/**"`.
673
+ use comma to separate patterns and '!' to exclude. e.g. 'ui/\*\*, !ui/button'
674
+ use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'.
675
+ always wrap the pattern with single quotes to avoid collision with shell commands.
676
+ use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern.
474
677
 
475
678
  `bit eject-conf <pattern>`
476
679
 
477
- | **Option** | **Option alias** | **Description** |
478
- | ------------- | :--------------: | -------------------------------------- |
479
- | `--propagate` | `-p` | mark propagate true in the config file |
480
- | `--override` | `-o` | override file if exist |
680
+ | **Option** | **Option alias** | **Description** |
681
+ | ------------- | :--------------: | ----------------------------------------------------------------------------------------------------------- |
682
+ | `--propagate` | `-p` | mark propagate true in the config file, so that component.json configs will be merge with workspace configs |
683
+ | `--override` | `-o` | override file if exist |
481
684
 
482
685
  ---
483
686
 
484
687
  ## envs
485
688
 
486
689
  **Alias**: `env`
487
- **Workspace only**: yes
488
- **Description**: list all components envs
690
+ **Description**: list all components maintained by the workspace and their corresponding envs
489
691
 
490
692
  `bit envs`
491
693
 
@@ -493,91 +695,139 @@ to validate the pattern before running this command, run `bit pattern <pattern>`
493
695
 
494
696
  **Usage**: `envs list`
495
697
 
496
- **Description**: list all envs available in the workspace
698
+ **Description**: list all envs currently used in the workspace
497
699
 
498
700
  ### envs get
499
701
 
500
- **Usage**: `envs get <name>`
702
+ **Usage**: `envs get <component-name>`
703
+
704
+ **Description**: show config information from a component's env
705
+
706
+ | **Arg** | **Description** |
707
+ | ---------------- | :-------------------------------------------------------------------------------------: |
708
+ | `component-name` | the 'component name' or 'component id' of the component whose env you'd like to inspect |
501
709
 
502
- **Description**: show component's env details
710
+ | **Option** | **Option alias** | **Description** |
711
+ | --------------------- | :--------------: | ------------------------------------------------------------------------------------------------------------------ |
712
+ | `--services <string>` | | show information about the specific services only. for multiple services, separate by a comma and wrap with quotes |
503
713
 
504
714
  ### envs set
505
715
 
506
- **Usage**: `envs set <pattern> <env>`
716
+ **Usage**: `envs set <component-pattern> <env>`
507
717
 
508
- **Description**: set an environment for component(s)
509
- 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"
510
- always wrap the pattern with quotes to avoid collision with shell commands.
511
- to validate the pattern before running this command, run `bit pattern <pattern>`.
718
+ **Description**: Assigns one or more components a development environment (env)
719
+
720
+ | **Arg** | **Description** |
721
+ | ------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
722
+ | `component-pattern` | component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
723
+ | `env` | the env's component id (include version if not latest, e.g `teambit.community/envs/community-react@1.95.13`) |
512
724
 
513
725
  ### envs unset
514
726
 
515
- **Usage**: `envs unset <component>`
727
+ **Usage**: `envs unset <component-pattern>`
728
+
729
+ **Description**: un-sets an env from components that were previously set by "bit env set" or by a component template
730
+ keep in mind that this doesn't remove envs that are set via variants.
731
+ in only removes envs that appear in the .bitmap file, which were previously configured via "bit env set".
732
+ the purpose of this command is to reset previously assigned envs to either allow variants configure the env or use the base node env.
733
+ you can use a `<pattern>` for multiple component ids, such as `bit env unset "org.scope/utils/**"`.
734
+ use comma to separate patterns and '!' to exclude. e.g. 'ui/\*\*, !ui/button'
735
+ use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'.
736
+ always wrap the pattern with single quotes to avoid collision with shell commands.
737
+ use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern.
516
738
 
517
- **Description**: unset an environment from component(s)
518
- 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"
519
- always wrap the pattern with quotes to avoid collision with shell commands.
520
- to validate the pattern before running this command, run `bit pattern <pattern>`.
739
+ | **Arg** | **Description** |
740
+ | ------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
741
+ | `component-pattern` | component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
521
742
 
522
743
  ### envs replace
523
744
 
524
- **Usage**: `envs replace <old-env> <new-env>`
745
+ **Usage**: `envs replace <current-env> <new-env>`
525
746
 
526
747
  **Description**: replace an existing env with another env for all components using the old env
527
748
 
749
+ | **Arg** | **Description** |
750
+ | ------------- | :----------------------------------------: |
751
+ | `current-env` | the component id of the env to be replaced |
752
+ | `new-env` | the component id of the new env |
753
+
754
+ ### envs update
755
+
756
+ **Usage**: `envs update [env-id] [pattern]`
757
+
758
+ **Description**: update a version of an env for all components using that env
759
+
760
+ | **Arg** | **Description** |
761
+ | --------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
762
+ | `env-id` | the environment id (defaults to all envs). optionally, add a version (id@version), if no version is supplied will use the latest version on the remote. |
763
+ | `pattern` | the components to update (defaults to all components). component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
764
+
528
765
  ---
529
766
 
530
767
  ## export
531
768
 
532
769
  **Alias**: `e`
533
- **Workspace only**: yes
534
- **Description**: export components to a remote scope.
535
- bit export => export all staged components to their current scope, if checked out to a lane, export the lane as well
536
- `bit export [id...]` => export the given ids to their current scope
770
+ **Description**: export components from the workspace to remote scopes
771
+ bit export => export all staged snaps/tags of components to their remote scope. if checked out to a lane, export the lane as well
772
+ `bit export [pattern...]` => export components included by the pattern to their remote scope (we recommend not using a pattern in
773
+ most scenarios so that all changes are exported simultaneously)
774
+ you can use a pattern for multiple ids, such as bit export "utils/\*". (wrap the pattern with quotes to avoid collision with shell commands)
537
775
 
538
- https://bit.dev/reference/components/exporting-components
539
- 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)
776
+ `bit export [component-patterns...]`
540
777
 
541
- `bit export [remote] [id...]`
778
+ | **Arg** | **Description** |
779
+ | ----------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
780
+ | `component-patterns...` | (not recommended) component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
542
781
 
543
782
  | **Option** | **Option alias** | **Description** |
544
783
  | ---------------------------- | :--------------: | --------------------------------------------------------------------------------------------------------------------------------------- |
545
- | `--eject` | `-e` | replaces the exported components from the local scope with the corresponding packages |
546
- | `--all` | `-a` | export all components include non-staged |
547
- | `--include-dependencies` | `-d` | LEGACY ONLY. include the component's dependencies as part of the export to the remote scope |
548
- | `--set-current-scope` | `-s` | LEGACY ONLY. ensure the component's remote scope is set according to the target location |
549
- | `--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 |
550
- | `--force` | `-f` | force changing a component remote without asking for a confirmation |
551
- | `--all-versions` | | export not only staged versions but all of them |
552
- | `--origin-directly` | | HARMONY ONLY. avoid export to the central hub, instead, export directly to the original scopes. not recommended! |
784
+ | `--eject` | `-e` | after export, remove the components from the workspace and install them as packages |
785
+ | `--all` | `-a` | export all components, including non-staged (useful when components in the remote scope are corrupted or missing) |
786
+ | `--all-versions` | | export not only staged versions but all of them (useful when versions in the remote scope are corrupted or missing) |
787
+ | `--origin-directly` | | EXPERIMENTAL. avoid export to the central hub, instead, export directly to the original scopes. not recommended! |
553
788
  | `--resume <string>` | | in case the previous export failed and suggested to resume with an export-id, enter the id |
789
+ | `--head-only` | | EXPERIMENTAL. in case previous export failed and locally it shows exported and only one snap/tag was created, try using this flag |
554
790
  | `--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 |
791
+ | `--fork-lane-new-scope` | | allow exporting a forked lane into a different scope than the original scope |
792
+ | `--open-browser` | | open a browser once the export is completed in the cloud job url |
793
+ | `--json` | `-j` | show output in json format |
555
794
 
556
795
  ---
557
796
 
558
797
  ## fork
559
798
 
560
- **Workspace only**: no
561
- **Description**: EXPERIMENTAL. create a new component out of an existing one
562
- note that [target-name] is the name only without the scope.
563
- to set the default-scope, please use --scope flag
799
+ **Description**: create a new component forked from an existing one (copies source files and configs)
800
+
801
+ `bit fork <source-component-id> [target-component-name]`
564
802
 
565
- `bit fork <source-id> [target-name]`
803
+ | **Arg** | **Description** |
804
+ | ----------------------- | :-----------------------------------------------------------------------------------------------------------------------------------------: |
805
+ | `source-component-id` | the component id of the source component |
806
+ | `target-component-name` | the name for the new component (component name without scope, e.g. name/spaces/my-button). to set a different scope, use the '--scope' flag |
566
807
 
567
- | **Option** | **Option alias** | **Description** |
568
- | ------------------ | :--------------: | ----------------------------------------------------------------------------------------------- |
569
- | `--scope <string>` | `-s` | default scope for the newly created component |
570
- | `--path <string>` | `-p` | relative path in the workspace. by default the path is `<scope>/<namespace>/<name>` |
571
- | `--refactor` | `-r` | change the source code of all components using the original component with the new package-name |
808
+ | **Option** | **Option alias** | **Description** |
809
+ | -------------------------------- | :--------------: | ------------------------------------------------------------------------------------------------------------------- |
810
+ | `--scope <string>` | `-s` | default scope for the new component |
811
+ | `--path <string>` | `-p` | relative path in the workspace for the new component. by default the path is `<scope>/<namespace>/<name>` |
812
+ | `--refactor` | `-r` | update the import/require statements in all dependent components (in the same workspace) |
813
+ | `--skip-dependency-installation` | `-x` | do not install packages of the imported components |
814
+ | `--env <string>` | `-e` | set the environment for the new component |
815
+ | `--skip-config` | | do not copy the config (aspects-config, env, etc) to the new component. helpful when it fails during aspect loading |
816
+ | `--preserve` | | avoid refactoring file and variable/class names according to the new component name |
817
+ | `--no-link` | | avoid saving a reference to the original component |
818
+ | `--ast` | | EXPERIMENTAL. use ast to transform files instead of regex |
572
819
 
573
820
  ---
574
821
 
575
822
  ## format
576
823
 
577
- **Workspace only**: yes
578
824
  **Description**: format components in the development workspace
579
825
 
580
- `bit format [component...]`
826
+ `bit format [component-pattern]`
827
+
828
+ | **Arg** | **Description** |
829
+ | ------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
830
+ | `component-pattern` | component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
581
831
 
582
832
  | **Option** | **Option alias** | **Description** |
583
833
  | ----------- | :--------------: | ---------------------------------------------------------------------------- |
@@ -587,9 +837,32 @@ to set the default-scope, please use --scope flag
587
837
 
588
838
  ---
589
839
 
840
+ ## git
841
+
842
+ **Description**: perform git operations
843
+
844
+ `bit git <sub-command>`
845
+
846
+ ### git set-merge-driver
847
+
848
+ **Usage**: `git set-merge-driver`
849
+
850
+ **Description**: setup bit's git merge driver for bitmap files
851
+
852
+ | **Option** | **Option alias** | **Description** |
853
+ | ---------- | :--------------: | --------------------------------- |
854
+ | `--global` | `-g` | set the git merge driver globally |
855
+
856
+ ### git merge-bitmaps
857
+
858
+ **Usage**: `git merge-bitmaps <ancestor> <current> <other>`
859
+
860
+ **Description**: a special command to merge conflicting bitmap files during git merge
861
+
862
+ ---
863
+
590
864
  ## globals
591
865
 
592
- **Workspace only**: yes
593
866
  **Description**: list all globals
594
867
 
595
868
  `bit globals`
@@ -602,126 +875,448 @@ to set the default-scope, please use --scope flag
602
875
 
603
876
  ## graph
604
877
 
605
- **Workspace only**: yes
606
- **Description**: EXPERIMENTAL. generate an image file with the dependencies graph
878
+ **Description**: generate an image file with the workspace components' dependencies graph
607
879
 
608
880
  `bit graph [id]`
609
881
 
610
882
  | **Option** | **Option alias** | **Description** |
611
883
  | ----------------------- | :--------------: | ------------------------------------------------------------------------------------------------------ |
612
- | `--image <image>` | `-i` | image path. use one of the following extensions: [gif, png, svg, pdf] |
884
+ | `--image <image>` | `-i` | image path and format. use one of the following extensions: [gif, png, svg, pdf] |
613
885
  | `--remote [remoteName]` | `-r` | remote name (name is optional, leave empty when id is specified) |
614
886
  | `--all-versions` | | enter all components versions into the graph, not only latest |
615
887
  | `--layout <name>` | | GraphVis layout. default to "dot". options are [circo, dot, fdp, neato, osage, patchwork, sfdp, twopi] |
888
+ | `--json` | `-j` | json format |
616
889
 
617
890
  ---
618
891
 
619
892
  ## help
620
893
 
621
894
  **Alias**: `$0`
622
- **Workspace only**: yes
623
895
  **Description**: shows help
624
896
 
625
897
  `bit help`
626
898
 
899
+ | **Option** | **Option alias** | **Description** |
900
+ | ------------ | :--------------: | ---------------------- |
901
+ | `--internal` | | show internal commands |
902
+
627
903
  ---
628
904
 
629
905
  ## import
630
906
 
631
- **Workspace only**: yes
632
- **Description**: import components into your current workspace.
633
- https://bit.dev/reference/components/importing-components
634
- you can use a pattern for multiple ids, such as bit import "utils/\*". (wrap the pattern with quotes to avoid collision with shell commands)
635
-
636
- `bit import [ids...]`
637
-
638
- | **Option** | **Option alias** | **Description** |
639
- | -------------------------------- | :--------------: | ------------------------------------------------------------------------------------------------------------------------------- |
640
- | `--path <path>` | `-p` | import components into a specific directory |
641
- | `--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 |
642
- | `--display-dependencies` | `-d` | display the imported dependencies |
643
- | `--override` | `-O` | override local changes |
644
- | `--verbose` | `-v` | showing verbose output for inspection |
645
- | `--json` | `-j` | return the output as JSON |
646
- | `--conf` | | write the configuration file (component.json) of the component (harmony components only) |
647
- | `--skip-npm-install` | | DEPRECATED. use "--skip-dependency-installation" instead |
648
- | `--skip-dependency-installation` | | do not install packages of the imported components |
649
- | `--merge [strategy]` | `-m` | merge local changes with the imported version. strategy should be "theirs", "ours" or "manual" |
650
- | `--dependencies` | | EXPERIMENTAL. import all dependencies and write them to the workspace |
651
- | `--dependents` | | EXPERIMENTAL. import component dependents to allow auto-tag updating them upon tag |
652
- | `--skip-lane` | | EXPERIMENTAL. when checked out to a lane, do not import the component into the lane, save it on main |
653
- | `--all-history` | | relevant for fetching all components objects. avoid optimizations, fetch all history versions, always |
907
+ **Description**: import components from their remote scopes to the local workspace
908
+
909
+ `bit import [component-patterns...]`
910
+
911
+ | **Arg** | **Description** |
912
+ | ----------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
913
+ | `component-patterns...` | component IDs or component patterns (separated by space). Use patterns to import groups of components using a common scope or namespace. E.g., "utils/\*" (wrap with double quotes) |
914
+
915
+ | **Option** | **Option alias** | **Description** |
916
+ | -------------------------------- | :--------------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
917
+ | `--path <path>` | `-p` | import components into a specific directory (a relative path in the workspace) |
918
+ | `--objects` | `-o` | import components objects to the local scope without checkout (without writing them to the file system). This is the default behavior for import with no id argument |
919
+ | `--override` | `-O` | override local changes |
920
+ | `--verbose` | `-v` | show verbose output for inspection |
921
+ | `--json` | `-j` | return the output as JSON |
922
+ | `--skip-dependency-installation` | `-x` | do not auto-install dependencies of the imported components |
923
+ | `--skip-write-config-files` | | do not write config files (such as eslint, tsconfig, prettier, etc...) |
924
+ | `--merge [strategy]` | `-m` | merge local changes with the imported version. strategy should be "theirs", "ours" or "manual" |
925
+ | `--dependencies` | | import all dependencies (bit components only) of imported components and write them to the workspace |
926
+ | `--dependents` | | import components found while traversing from the imported components upwards to the workspace components |
927
+ | `--dependents-via <string>` | | same as --dependents except the traversal must go through the specified component. to specify multiple components, wrap with quotes and separate by a comma |
928
+ | `--dependents-all` | | same as --dependents except not prompting for selecting paths but rather selecting all paths and showing final confirmation before importing |
929
+ | `--dependents-dry-run` | | DEPRECATED. (this is the default now). same as --dependents, except it prints the found dependents and wait for confirmation before importing them |
930
+ | `--silent` | | no prompt for --dependents/--dependents-via flags |
931
+ | `--filter-envs <envs>` | | only import components that have the specified environment (e.g., "teambit.react/react-env") |
932
+ | `--save-in-lane` | | when checked out to a lane and the component is not on the remote-lane, save it in the lane (defaults to save on main) |
933
+ | `--all-history` | | relevant for fetching all components objects. avoid optimizations, fetch all history versions, always |
934
+ | `--fetch-deps` | | fetch dependencies (bit components) objects to the local scope, but dont add to the workspace. Useful to resolve errors about missing dependency data |
935
+ | `--track-only` | | do not write any component files, just create .bitmap entries of the imported components. Useful when the files already exist and just want to re-add the component to the bitmap |
936
+ | `--include-deprecated` | | when importing with patterns, include deprecated components (default to exclude them) |
654
937
 
655
938
  ---
656
939
 
657
940
  ## init
658
941
 
659
- **Workspace only**: no
660
- **Description**: initialize an empty bit scope
661
- https://bit.dev/reference/workspace/creating-workspaces#initialize-a-workspace-on-an-existing-project
942
+ **Description**: create or reinitialize an empty workspace
943
+ if the current directory is already a workspace, it validates that bit files are correct and rewrite them if needed.
662
944
 
663
945
  `bit init [path]`
664
946
 
665
- | **Option** | **Option alias** | **Description** |
666
- | ----------------------------------------- | :--------------: | -------------------------------------------------------------------------------------------------------------------------------------- |
667
- | `--bare [name]` | `-b` | initialize an empty bit bare scope |
668
- | `--shared <groupname>` | `-s` | add group write permissions to a scope properly |
669
- | `--standalone` | `-T` | do not nest component store within .git directory and do not write config data inside package.json |
670
- | `--reset` | `-r` | write missing or damaged Bit files |
671
- | `--reset-new` | | reset .bitmap file as if the components were newly added and remove all model data (objects) |
672
- | `--reset-hard` | | delete all Bit files and directories, including Bit configuration, tracking and model data. Useful for re-start using Bit from scratch |
673
- | `--default-directory <default-directory>` | `-d` | set up default directory to import components into |
674
- | `--package-manager <package-manager>` | `-p` | set up package manager (npm or yarn) |
675
- | `--force` | `-f` | force workspace initialization without clearing local objects |
676
- | `--harmony` | | DEPRECATED. no need for this flag. Harmony is the default now |
677
- | `--interactive` | `-I` | EXPERIMENTAL. start an interactive process |
947
+ | **Option** | **Option alias** | **Description** |
948
+ | ----------------------------------------- | :--------------: | ----------------------------------------------------------------------------------------------------------------------------------------- |
949
+ | `--bare [name]` | `-b` | initialize an empty bit bare scope |
950
+ | `--shared <groupname>` | `-s` | add group write permissions to a scope properly |
951
+ | `--standalone` | `-T` | do not nest component store within .git directory and do not write config data inside package.json |
952
+ | `--no-package-json` | | do not generate package.json |
953
+ | `--reset` | `-r` | write missing or damaged Bit files |
954
+ | `--reset-new` | | reset .bitmap file as if the components were newly added and remove all model data (objects) |
955
+ | `--reset-lane-new` | | same as reset-new, but it only resets components belong to lanes. main components are left intact |
956
+ | `--reset-hard` | | delete all Bit files and directories, including Bit configuration, tracking and model data. Useful for re-starting workspace from scratch |
957
+ | `--reset-scope` | | removes local scope (.bit or .git/bit). tags/snaps that have not been exported will be lost. workspace is left intact |
958
+ | `--default-directory <default-directory>` | `-d` | set the default directory pattern to import/create components into |
959
+ | `--default-scope <default-scope>` | | set the default scope for components in the workspace |
960
+ | `--package-manager <package-manager>` | `-p` | set the package manager (npm or yarn) to be used in the workspace |
961
+ | `--force` | `-f` | force workspace initialization without clearing local objects |
962
+ | `--interactive` | `-I` | EXPERIMENTAL. start an interactive process |
678
963
 
679
964
  ---
680
965
 
681
966
  ## install
682
967
 
683
968
  **Alias**: `in`
684
- **Workspace only**: yes
685
- **Description**: install development workspace dependencies
969
+ **Description**: installs workspace dependencies
970
+ when no package is specified, all workspace dependencies are installed and all workspace components are imported.
686
971
 
687
972
  `bit install [packages...]`
688
973
 
689
- | **Option** | **Option alias** | **Description** |
690
- | --------------------------------------- | :--------------: | --------------------------------------------------------------- |
691
- | `--variants <variants>` | `-v` | add packages to specific variants |
692
- | `--type [lifecycleType]` | `-t` | "runtime" (default) or "peer" (dev is not a valid option) |
693
- | `--update-existing [updateExisting]` | `-u` | update existing dependencies version and types |
694
- | `--save-prefix [savePrefix]` | | set the prefix to use when adding dependency to workspace.jsonc |
695
- | `--skip-dedupe [skipDedupe]` | | do not dedupe dependencies on installation |
696
- | `--skip-import [skipImport]` | | do not import bit objects post installation |
697
- | `--add-missing-peers [addMissingPeers]` | | install all missing peer dependencies |
974
+ | **Arg** | **Description** |
975
+ | ------------- | :-------------------------------------------------: |
976
+ | `packages...` | a list of packages to install (separated by spaces) |
977
+
978
+ | **Option** | **Option alias** | **Description** |
979
+ | ---------------------------- | :--------------: | ------------------------------------------------------------------------------------------------------ |
980
+ | `--type [lifecycleType]` | `-t` | "runtime" (default) or "peer" (dev is not a valid option) |
981
+ | `--update` | `-u` | update all dependencies to latest version according to their semver range |
982
+ | `--update-existing` | | DEPRECATED (not needed anymore, it is the default now). update existing dependencies version and types |
983
+ | `--save-prefix [savePrefix]` | | set the prefix to use when adding dependency to workspace.jsonc |
984
+ | `--skip-dedupe` | | do not dedupe dependencies on installation |
985
+ | `--skip-import` | | do not import bit objects post installation |
986
+ | `--skip-compile` | | do not compile components |
987
+ | `--skip-write-config-files` | | do not write config files (such as eslint, tsconfig, prettier, etc...) |
988
+ | `--add-missing-deps` | `-a` | install all missing dependencies |
989
+ | `--add-missing-peers` | | install all missing peer dependencies |
990
+ | `--recurring-install` | | automatically run install again if there are non loaded old envs in your workspace |
991
+ | `--no-optional [noOptional]` | | do not install optional dependencies (works with pnpm only) |
992
+ | `--lockfile-only` | | dependencies are not written to node_modules. Only the lockfile is updated |
993
+
994
+ ---
995
+
996
+ ## lane
997
+
998
+ **Alias**: `l`
999
+ **Description**: manage lanes - if no sub-command is used, runs "bit lane list"
1000
+
1001
+ `bit lane [sub-command]`
1002
+
1003
+ ### lane list
1004
+
1005
+ **Usage**: `lane list`
1006
+
1007
+ **Description**: list local or remote lanes
1008
+
1009
+ | **Option** | **Option alias** | **Description** |
1010
+ | ------------------------------ | :--------------: | ------------------------------------------------------------- |
1011
+ | `--details` | `-d` | show more details on the state of each component in each lane |
1012
+ | `--json` | `-j` | show lanes' details in a json format |
1013
+ | `--remote <remote-scope-name>` | `-r` | show all remote lanes from the specified scope |
1014
+ | `--merged` | | list only merged lanes |
1015
+ | `--not-merged` | | list only lanes that haven't been merged |
1016
+
1017
+ ### lane switch
1018
+
1019
+ **Usage**: `lane switch <lane>`
1020
+
1021
+ **Description**: switch to the specified lane
1022
+
1023
+ | **Arg** | **Description** |
1024
+ | ------- | :------------------------------------------------------: |
1025
+ | `lane` | lane-name or lane-id (if lane is not local) to switch to |
1026
+
1027
+ | **Option** | **Option alias** | **Description** |
1028
+ | --------------------------------------- | :--------------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1029
+ | `--alias <string>` | `-n` | relevant when the specified lane is a remote lane. create a local alias for the lane (doesnt affect the lane's name on the remote |
1030
+ | `--auto-merge-resolve <merge-strategy>` | | merge local changes with the checked out version. strategy should be "theirs", "ours" or "manual" |
1031
+ | `--get-all` | `-a` | DEPRECATED. this is currently the default behavior |
1032
+ | `--workspace-only` | | checkout only the components in the workspace to the selected lane |
1033
+ | `--skip-dependency-installation` | `-x` | do not install dependencies of the imported components |
1034
+ | `--pattern <component-pattern>` | `-p` | switch only the lane components matching the specified component-pattern. only works when the workspace is empty component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
1035
+ | `--json` | `-j` | return the output as JSON |
1036
+
1037
+ ### lane show
1038
+
1039
+ **Usage**: `lane show [lane-name]`
1040
+
1041
+ **Description**: show lane details. if no lane specified, show the current lane
1042
+
1043
+ | **Option** | **Option alias** | **Description** |
1044
+ | ---------- | :--------------: | ---------------------------------------------------- |
1045
+ | `--json` | `-j` | show the lane details in json format |
1046
+ | `--remote` | `-r` | show details of the remote head of the provided lane |
1047
+
1048
+ ### lane create
1049
+
1050
+ **Usage**: `lane create <lane-name>`
1051
+
1052
+ **Description**: creates a new lane and switches to it
1053
+ a lane created from main (default-lane) is empty until components are snapped.
1054
+ a lane created from another lane contains all the components of the original lane.
1055
+
1056
+ | **Arg** | **Description** |
1057
+ | ----------- | :-----------------------: |
1058
+ | `lane-name` | the name for the new lane |
1059
+
1060
+ | **Option** | **Option alias** | **Description** |
1061
+ | ----------------------------- | :--------------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1062
+ | `--scope <scope-name>` | `-s` | remote scope to which this lane will be exported, default to the workspace.json's defaultScope (can be changed up to first export of the lane with "bit lane change-scope") |
1063
+ | `--remote-scope <scope-name>` | | DEPRECATED. use --scope |
1064
+ | `--alias <name>` | | a local alias to refer to this lane, defaults to the `<lane-name>` (can be added later with "bit lane alias") |
1065
+ | `--fork-lane-new-scope` | | create the new lane in a different scope than its parent lane (if created from another lane) |
1066
+
1067
+ ### lane remove
1068
+
1069
+ **Usage**: `lane remove <lanes...>`
1070
+
1071
+ **Description**: remove or delete lanes
1072
+
1073
+ | **Arg** | **Description** |
1074
+ | ---------- | :---------------------------------------: |
1075
+ | `lanes...` | A list of lane names, separated by spaces |
1076
+
1077
+ | **Option** | **Option alias** | **Description** |
1078
+ | ---------- | :--------------: | ---------------------------------------------------------------------------------------------------------------------------------------- |
1079
+ | `--remote` | `-r` | delete a remote lane. use remote/lane-id syntax e.g. bit lane remove owner.org/my-lane --remote. Delete is immediate, no export required |
1080
+ | `--force` | `-f` | removes/deletes the lane even when the lane is not yet merged to main |
1081
+ | `--silent` | `-s` | skip confirmation |
1082
+
1083
+ ### lane change-scope
1084
+
1085
+ **Usage**: `lane change-scope <remote-scope-name>`
1086
+
1087
+ **Description**: changes the remote scope of a lane
1088
+ NOTE: available only before the lane is exported to the remote
1089
+
1090
+ | **Option** | **Option alias** | **Description** |
1091
+ | ------------------------- | :--------------: | ------------------------------------------------------------------------------------------- |
1092
+ | `--lane-name <lane-name>` | `-l` | the name of the lane to change its remote scope. if not specified, the current lane is used |
1093
+
1094
+ ### lane alias
1095
+
1096
+ **Usage**: `lane alias <lane-name> <alias>`
1097
+
1098
+ **Description**: adds an alias to a lane
1099
+ an alias is a name that can be used locally to refer to a lane. it is saved locally and never reaches the remote.
1100
+ it is useful e.g. when having multiple lanes with the same name, but with different remote scopes.
1101
+
1102
+ ### lane rename
1103
+
1104
+ **Usage**: `lane rename <new-name>`
1105
+
1106
+ **Description**: EXPERIMENTAL. change the lane-name locally
1107
+ the remote will be updated after the next "bit export" command
1108
+
1109
+ | **Option** | **Option alias** | **Description** |
1110
+ | ------------------------- | :--------------: | -------------------------------------------------------------------------- |
1111
+ | `--lane-name <lane-name>` | `-l` | the name of the lane to rename. if not specified, the current lane is used |
1112
+
1113
+ ### lane diff
1114
+
1115
+ **Usage**: `lane diff [values...]`
1116
+
1117
+ **Description**: show diff between lanes
1118
+ bit lane diff => diff between the current lane and default lane. (only inside workspace).
1119
+ bit lane diff to => diff between the current lane (or default-lane when in scope) and "to" lane.
1120
+ bit lane diff from to => diff between "from" lane and "to" lane.
1121
+
1122
+ | **Arg** | **Description** |
1123
+ | ------- | :------------------------------: |
1124
+ | `from` | base lane for comparison |
1125
+ | `to` | lane being compared to base lane |
1126
+
1127
+ | **Option** | **Option alias** | **Description** |
1128
+ | ------------------------------- | :--------------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1129
+ | `--pattern <component-pattern>` | | show lane-diff for components conforming to the specified component-pattern only component-pattern format: component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
1130
+
1131
+ ### lane add-readme
1132
+
1133
+ **Usage**: `lane add-readme <component-name> [lane-name]`
1134
+
1135
+ **Description**: EXPERIMENTAL. sets an existing component as the readme of a lane
1136
+
1137
+ | **Arg** | **Description** |
1138
+ | -------------- | :-------------------------------------------------------------------: |
1139
+ | `component-id` | the component name or id of the component to use as the lane's readme |
1140
+ | `lane-name` | the lane to attach the readme to (defaults to the current lane) |
1141
+
1142
+ ### lane remove-readme
1143
+
1144
+ **Usage**: `lane remove-readme [laneName]`
1145
+
1146
+ **Description**: EXPERIMENTAL. remove lane readme component
1147
+
1148
+ ### lane import
1149
+
1150
+ **Usage**: `lane import <lane>`
1151
+
1152
+ **Description**: import a remote lane to your workspace and switch to that lane
1153
+
1154
+ | **Arg** | **Description** |
1155
+ | ------- | :------------------: |
1156
+ | `lane` | the remote lane name |
1157
+
1158
+ | **Option** | **Option alias** | **Description** |
1159
+ | -------------------------------- | :--------------: | -------------------------------------------------------------------------------------------------------------------------------------- |
1160
+ | `--skip-dependency-installation` | `-x` | do not install dependencies of the imported components |
1161
+ | `--pattern <component-pattern>` | `-p` | import only components from the lane that fit the specified component-pattern to the workspace. works only when the workspace is empty |
1162
+
1163
+ ### lane remove-comp
1164
+
1165
+ **Usage**: `lane remove-comp <component-pattern>`
1166
+
1167
+ **Description**: DEPRECATED. remove components when on a lane
1168
+
1169
+ | **Arg** | **Description** |
1170
+ | ------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
1171
+ | `component-pattern` | component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
1172
+
1173
+ | **Option** | **Option alias** | **Description** |
1174
+ | ------------------ | :--------------: | ------------------------------------------------------------------------------------------------- |
1175
+ | `--workspace-only` | | do not mark the components as removed from the lane. instead, remove them from the workspace only |
1176
+ | `--update-main` | | EXPERIMENTAL. remove, i.e. delete, component/s on the main lane after merging this lane into main |
1177
+
1178
+ ### lane fetch
1179
+
1180
+ **Usage**: `lane fetch [lane-id]`
1181
+
1182
+ **Description**: fetch component objects from lanes. if no lane-id is provided, it fetches from the current lane
1183
+ note, it does not save the remote lanes objects locally, only the refs
1184
+
1185
+ | **Option** | **Option alias** | **Description** |
1186
+ | ---------- | :--------------: | ---------------------- |
1187
+ | `--all` | `-a` | fetch all remote lanes |
1188
+
1189
+ ### lane eject
1190
+
1191
+ **Usage**: `lane eject <component-pattern>`
1192
+
1193
+ **Description**: delete a component from the lane and install it as a package from main
1194
+ NOTE: unlike "bit eject" on main, this command doesn't only remove the component from the
1195
+ workspace, but also mark it as deleted from the lane, so it won't be merged later on.
1196
+
1197
+ | **Arg** | **Description** |
1198
+ | ------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
1199
+ | `component-pattern` | component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
1200
+
1201
+ ### lane merge
1202
+
1203
+ **Usage**: `lane merge <lane> [pattern]`
1204
+
1205
+ **Description**: merge a local or a remote lane to the current lane
1206
+ by default, the provided lane will be fetched from the remote before merging.
1207
+ to merge the lane from the local scope without updating it first, use "--skip-fetch" flag.
1208
+
1209
+ when the current and merge candidate lanes are diverged in history and the files could be merged with no conflicts,
1210
+ these components will be snap-merged to complete the merge. use "no-snap" to opt-out, or "tag" to tag instead.
1211
+
1212
+ in case a component in both ends don't share history (no snap is found in common), the merge will require "--resolve-unrelated" flag.
1213
+ this flag keeps the history of one end and saves a reference to the other end. the decision of which end to keep is determined by the following:
1214
+
1215
+ 1. if the component exists on main, then the history linked to main will be kept.
1216
+ in this case, the strategy of "--resolve-unrelated" only determines which source-code to keep. it's not about the history.
1217
+ 2. if the component doesn't exist on main, then by default, the history of the current lane will be kept.
1218
+ unless "--resolve-unrelated" is set to "theirs", in which case the history of the other lane will be kept.
1219
+ 3. a. an edge case: if the component is deleted on the current lane, the strategy will always be "theirs".
1220
+ so then the history (and the source-code) of the other lane will be kept.
1221
+
1222
+ | **Arg** | **Description** |
1223
+ | --------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
1224
+ | `lane` | lane-name or full lane-id (if remote) to merge to the current lane |
1225
+ | `pattern` | partially merge the lane - only components that match the specified component-pattern Component pattern format: component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
1226
+
1227
+ | **Option** | **Option alias** | **Description** |
1228
+ | --------------------------------------- | :--------------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
1229
+ | `--manual` | | same as "--auto-merge-resolve manual". in case of merge conflict, write the files with the conflict markers |
1230
+ | `--auto-merge-resolve <merge-strategy>` | | in case of a merge conflict, resolve according to the provided strategy: [ours, theirs, manual] |
1231
+ | `--ours` | | DEPRECATED. use --auto-merge-resolve. in case of a conflict, keep local modifications |
1232
+ | `--theirs` | | DEPRECATED. use --auto-merge-resolve. in case of a conflict, override local with incoming changes |
1233
+ | `--workspace` | | merge only lane components that are in the current workspace |
1234
+ | `--no-snap` | | do not auto snap after merge completed without conflicts |
1235
+ | `--tag` | | auto-tag all lane components after merging into main (or tag-merge in case of snap-merge) |
1236
+ | `--build` | | in case of snap during the merge, run the build-pipeline (similar to bit snap --build) |
1237
+ | `--message <message>` | `-m` | override the default message for the auto snap |
1238
+ | `--keep-readme` | | skip deleting the lane readme component after merging |
1239
+ | `--no-squash` | | relevant for merging lanes into main, which by default squashes all lane snaps |
1240
+ | `--squash` | | EXPERIMENTAL. relevant for merging a lane into another non-main lane, which by default does not squash |
1241
+ | `--ignore-config-changes` | | allow merging when components are modified due to config changes (such as dependencies) only and not files |
1242
+ | `--verbose` | | show details of components that were not merged successfully |
1243
+ | `--skip-dependency-installation` | `-x` | do not install dependencies of the imported components |
1244
+ | `--skip-fetch` | | use the local state of target-lane if exits locally, without updating it from the remote |
1245
+ | `--include-deps` | | relevant for "--pattern" and "--workspace". merge also dependencies of the specified components |
1246
+ | `--resolve-unrelated [merge-strategy]` | | relevant when a component on a lane and the component on main have nothing in common. merge-strategy can be "ours" (default) or "theirs" |
1247
+ | `--include-non-lane-comps` | | DEPRECATED (this is now the default). when merging main, include workspace components that are not on the lane (by default only lane components are merged) |
1248
+ | `--exclude-non-lane-comps` | | when merging main into a lane, exclude workspace components that are not on the lane (by default all workspace components are merged) |
1249
+
1250
+ ### lane merge-abort
1251
+
1252
+ **Usage**: `lane merge-abort`
1253
+
1254
+ **Description**: abort the recent lane-merge. revert the lane object and checkout accordingly
1255
+ restore the lane-object to its state before the last "bit lane merge" command.
1256
+ also, checkout the workspace components according to the restored lane state
1257
+
1258
+ | **Option** | **Option alias** | **Description** |
1259
+ | -------------------------------- | :--------------: | -------------------------------------------------------- |
1260
+ | `--verbose` | | show details of components that didn't need to be merged |
1261
+ | `--silent` | `-s` | skip confirmation |
1262
+ | `--skip-dependency-installation` | `-x` | do not install packages of the imported components |
1263
+
1264
+ ### lane merge-move
1265
+
1266
+ **Usage**: `lane merge-move <new-lane-name>`
1267
+
1268
+ **Description**: EXPERIMENT. move the current merge state into a new lane. the current lane will be reset
1269
+ this command is useful when you got a messy merge state that from one hand you don't want
1270
+ to loose the changes, but on the other hand, you want to keep your lane without those changes.
1271
+ this command does the following:
1272
+
1273
+ 1. create a new lane with the current merge state. including all the filesystem changes. (in practice, it leaves the fs intact)
1274
+ 2. reset the current lane to the state before the merge. so then once done with the new lane, you can switch to the current lane and it'll be clean.
1275
+
1276
+ | **Option** | **Option alias** | **Description** |
1277
+ | ---------------------- | :--------------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1278
+ | `--scope <scope-name>` | `-s` | remote scope to which this lane will be exported, default to the workspace.json's defaultScope (can be changed up to first export of the lane with "bit lane change-scope") |
1279
+
1280
+ | **Option** | **Option alias** | **Description** |
1281
+ | ------------------------------ | :--------------: | ------------------------------------------------------------- |
1282
+ | `--details` | `-d` | show more details on the state of each component in each lane |
1283
+ | `--json` | `-j` | show lanes details in json format |
1284
+ | `--remote <remote-scope-name>` | `-r` | show all remote lanes from the specified scope |
1285
+ | `--merged` | | list only merged lanes |
1286
+ | `--not-merged` | | list only lanes that haven't been merged |
698
1287
 
699
1288
  ---
700
1289
 
701
1290
  ## link
702
1291
 
703
- **Workspace only**: yes
704
- **Description**: generate symlinks to resolve module paths for imported components.
705
- https://bit.dev/reference/workspace/component-links
1292
+ **Description**: create links in the node_modules directory, to core aspects and to components in the workspace
706
1293
 
707
- `bit link [ids...]`
1294
+ `bit link [component-names...]`
708
1295
 
709
- | **Option** | **Option alias** | **Description** |
710
- | ------------------------- | :--------------: | -------------------------------------------------------------------------------------------------------------- |
711
- | `--json` | `-j` | return the output as JSON |
712
- | `--verbose` | | verbose output |
713
- | `--rewire` | `-r` | Replace relative paths with module paths in code (e.g. "../foo" => "@bit/foo") |
714
- | `--target <dir>` | | EXPERIMENTAL. link to an external directory (similar to npm-link) so other projects could use these components |
715
- | `--skip-fetching-objects` | | skip fetch missing objects from remotes before linking |
1296
+ | **Arg** | **Description** |
1297
+ | -------------------- | :------------------------------------: |
1298
+ | `component-names...` | names or IDs of the components to link |
1299
+
1300
+ | **Option** | **Option alias** | **Description** |
1301
+ | ------------------------- | :--------------: | ------------------------------------------------------------------------------------------------ |
1302
+ | `--json` | `-j` | return the output as JSON |
1303
+ | `--verbose` | | verbose output |
1304
+ | `--rewire` | `-r` | Replace relative paths with module paths in code (e.g. "../foo" => "@bit/foo") |
1305
+ | `--target <dir>` | | link to an external directory (similar to npm-link) so other projects could use these components |
1306
+ | `--skip-fetching-objects` | | skip fetch missing objects from remotes before linking |
1307
+ | `--peers` | | link peer dependencies of the components too |
716
1308
 
717
1309
  ---
718
1310
 
719
1311
  ## lint
720
1312
 
721
- **Workspace only**: yes
722
1313
  **Description**: lint components in the development workspace
723
1314
 
724
- `bit lint [component...]`
1315
+ `bit lint [component-pattern]`
1316
+
1317
+ | **Arg** | **Description** |
1318
+ | ------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
1319
+ | `component-pattern` | component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
725
1320
 
726
1321
  | **Option** | **Option alias** | **Description** |
727
1322
  | ---------------------- | :--------------: | ----------------------------------------------------------------- |
@@ -735,59 +1330,77 @@ https://bit.dev/reference/workspace/component-links
735
1330
  ## list
736
1331
 
737
1332
  **Alias**: `ls`
738
- **Workspace only**: no
739
- **Description**: list components on a local or a remote scope.
740
- https://bit.dev/reference/reference/cli-reference#list
1333
+ **Description**: list components on a workspace or a remote scope (with flag).
741
1334
 
742
1335
  `bit list [remote-scope]`
743
1336
 
744
- | **Option** | **Option alias** | **Description** |
745
- | ---------------------- | :--------------: | ------------------------------------------------------------------------------- |
746
- | `--ids` | `-i` | show only component ids unformatted |
747
- | `--scope` | `-s` | show only components stored in the local scope, including indirect dependencies |
748
- | `--bare` | `-b` | DEPRECATED. use --raw instead |
749
- | `--raw` | `-r` | show raw output (only components ids, no styling) |
750
- | `--outdated` | `-o` | show latest versions from remotes |
751
- | `--json` | `-j` | show the output in JSON format |
752
- | `--namespace <string>` | `-n` | show only specified namespace by using wildcards |
1337
+ | **Option** | **Option alias** | **Description** |
1338
+ | ---------------------- | :--------------: | --------------------------------------------------------------------------------------------- |
1339
+ | `--ids` | `-i` | show only component ids, unformatted |
1340
+ | `--scope` | `-s` | show only components stored in the local scope, including indirect dependencies |
1341
+ | `--outdated` | `-o` | highlight outdated components, in comparison with their latest remote version (if one exists) |
1342
+ | `--json` | `-j` | show the output in JSON format |
1343
+ | `--namespace <string>` | `-n` | show only components in the specified namespace/s e.g. '-n ui' or '\*/ui' |
753
1344
 
754
1345
  ---
755
1346
 
756
1347
  ## log
757
1348
 
758
- **Workspace only**: no
759
- **Description**: show components(s) tag history.
760
- https://bit.dev/reference/reference/cli-reference#log
1349
+ **Description**: show components(s) version history
761
1350
 
762
1351
  `bit log <id>`
763
1352
 
764
- | **Option** | **Option alias** | **Description** |
765
- | ----------- | :--------------: | ----------------------------------------- |
766
- | `--remote` | `-r` | show log of a remote component |
767
- | `--parents` | | EXPERIMENTAL. show parents and lanes data |
1353
+ | **Arg** | **Description** |
1354
+ | ------- | :----------------------------: |
1355
+ | `id` | component-id or component-name |
1356
+
1357
+ | **Option** | **Option alias** | **Description** |
1358
+ | ---------------- | :--------------: | --------------------------------------------------------------------------------------------- |
1359
+ | `--remote` | `-r` | show log of a remote component |
1360
+ | `--parents` | | show parents and lanes data |
1361
+ | `--one-line` | `-o` | show each log entry in one line |
1362
+ | `--full-hash` | `-f` | show full hash of the snap (default to the first 9 characters for --one-line/--parents flags) |
1363
+ | `--full-message` | `-m` | show full message of the snap (default to the first line for --one-line/--parents flags) |
1364
+ | `--json` | `-j` | json format |
1365
+
1366
+ ---
1367
+
1368
+ ## log-file
1369
+
1370
+ **Description**: EXPERIMENTAL. show file history
1371
+
1372
+ `bit log-file <filepath>`
1373
+
1374
+ | **Arg** | **Description** |
1375
+ | ---------- | :---------------------------------: |
1376
+ | `filepath` | file path relative to the workspace |
1377
+
1378
+ | **Option** | **Option alias** | **Description** |
1379
+ | ------------ | :--------------: | ------------------------------- |
1380
+ | `--one-line` | `-o` | show each log entry in one line |
768
1381
 
769
1382
  ---
770
1383
 
771
1384
  ## login
772
1385
 
773
- **Workspace only**: no
774
- **Description**: log the CLI into Bit Cloud
1386
+ **Description**: log in to Bit cloud
775
1387
 
776
1388
  `bit login`
777
1389
 
778
- | **Option** | **Option alias** | **Description** |
779
- | --------------------------- | :--------------: | -------------------------------------------------------------------------------------------------- |
780
- | `--port <port>` | `-p` | port number to open for localhost server (default 8085) |
781
- | `--suppress-browser-launch` | | do not open a browser for authentication |
782
- | `--npmrc-path <path>` | | path to npmrc file to configure bit.cloud registry |
783
- | `--skip-registry-config` | | don't configure bit.cloud registry |
784
- | `--machine-name <string>` | | specify machine-name to pair with the token (useful for CI to avoid accidentally revoke the token) |
1390
+ | **Option** | **Option alias** | **Description** |
1391
+ | --------------------------- | :--------------: | ---------------------------------------------------------------------------------------------------- |
1392
+ | `--skip-config-update` | | skip writing to the .npmrc file |
1393
+ | `--refresh-token` | | force refresh token even when logged in |
1394
+ | `--cloud-domain <domain>` | `-d` | login cloud domain (default bit.cloud) |
1395
+ | `--port <port>` | `-p` | port number to open for localhost server (default 8085) |
1396
+ | `--no-browser` | | do not open a browser for authentication |
1397
+ | `--machine-name <name>` | | specify machine-name to pair with the token (useful for CI to avoid accidentally revoking the token) |
1398
+ | `--suppress-browser-launch` | | DEPRECATE. use --no-browser instead |
785
1399
 
786
1400
  ---
787
1401
 
788
1402
  ## logout
789
1403
 
790
- **Workspace only**: yes
791
1404
  **Description**: log the CLI out of Bit
792
1405
 
793
1406
  `bit logout`
@@ -796,81 +1409,127 @@ https://bit.dev/reference/workspace/component-links
796
1409
 
797
1410
  ## merge
798
1411
 
799
- **Workspace only**: yes
800
- **Description**: merge changes of different component versions
801
- `bit merge <version> [ids...]` => merge changes of the given version into the checked out version
802
- `bit merge [ids...]` => EXPERIMENTAL. merge changes of the remote head into local, optionally use '--abort' or '--resolve'
803
- 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)
1412
+ **Description**: merge changes of the remote head into local - auto-snaps all merged components
1413
+ merge changes of the remote head into local when they are diverged. when on a lane, merge the remote head of the lane into the local
1414
+ and creates snaps for merged components that have diverged, on the lane.
1415
+ if no ids are specified, all pending-merge components will be merged. (run "bit status" to list them).
1416
+ optionally use '--abort' to revert the last merge. to revert a lane merge, use "bit lane merge-abort" command.
1417
+ you can use a pattern for multiple ids, such as bit merge "utils/\*". (wrap the pattern with quotes to avoid collision with shell commands)
804
1418
 
805
- `bit merge [values...]`
1419
+ `bit merge [ids...]`
806
1420
 
807
- | **Option** | **Option alias** | **Description** |
808
- | --------------------- | :--------------: | ------------------------------------------------------------------------------------------- |
809
- | `--ours` | | in case of a conflict, override the used version with the current modification |
810
- | `--theirs` | | in case of a conflict, override the current modification with the specified version |
811
- | `--manual` | | in case of a conflict, leave the files with a conflict state to resolve them manually later |
812
- | `--abort` | | EXPERIMENTAL. in case of an unresolved merge, revert to the state before the merge began |
813
- | `--resolve` | | EXPERIMENTAL. mark an unresolved merge as resolved and create a new snap with the changes |
814
- | `--no-snap` | | EXPERIMENTAL. do not auto snap in case the merge completed without conflicts |
815
- | `--build` | | in case of snap during the merge, run the build-pipeline (similar to bit snap --build) |
816
- | `--message <message>` | `-m` | EXPERIMENTAL. override the default message for the auto snap |
1421
+ | **Option** | **Option alias** | **Description** |
1422
+ | --------------------------------------- | :--------------: | ----------------------------------------------------------------------------------------------------------------------- |
1423
+ | `--ours` | | DEPRECATED. use --auto-merge-resolve. in case of a conflict, keep the local modification |
1424
+ | `--theirs` | | DEPRECATED. use --auto-merge-resolve. in case of a conflict, override the local modification with the specified version |
1425
+ | `--manual` | | same as "--auto-merge-resolve manual". in case of merge conflict, write the files with the conflict markers |
1426
+ | `--auto-merge-resolve <merge-strategy>` | | in case of a conflict, resolve according to the strategy: [ours, theirs, manual] |
1427
+ | `--abort` | | in case of an unresolved merge, revert to pre-merge state |
1428
+ | `--resolve` | | mark an unresolved merge as resolved and create a new snap with the changes |
1429
+ | `--no-snap` | | do not auto snap even if the merge completed without conflicts |
1430
+ | `--build` | | in case of snap during the merge, run the build-pipeline (similar to bit snap --build) |
1431
+ | `--verbose` | | show details of components that were not merged successfully |
1432
+ | `--skip-dependency-installation` | `-x` | do not install new dependencies resulting from the merge |
1433
+ | `--message <message>` | `-m` | override the default message for the auto snap |
1434
+
1435
+ ---
1436
+
1437
+ ## mini-status
1438
+
1439
+ **Alias**: `ms`
1440
+ **Description**: EXPERIMENTAL. basic status for fast execution
1441
+ shows only modified/new components with code changes. for the full status, use "bit status".
1442
+ this command only checks source code changes, it doesn't check for config/aspect/dependency changes
1443
+
1444
+ `bit mini-status [component-pattern]`
1445
+
1446
+ | **Arg** | **Description** |
1447
+ | ------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
1448
+ | `component-pattern` | component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
1449
+
1450
+ | **Option** | **Option alias** | **Description** |
1451
+ | -------------------------------- | :--------------: | ------------------------------------------------------------------------------------------------------------ |
1452
+ | `--show-issues` | | show component issues (slows down the command) |
1453
+ | `--ignore-circular-dependencies` | `-c` | do not check for circular dependencies to get the results quicker (relevant when --show-issues flag is used) |
1454
+ | `--json` | `-j` | json format |
817
1455
 
818
1456
  ---
819
1457
 
820
1458
  ## move
821
1459
 
822
1460
  **Alias**: `mv`
823
- **Workspace only**: yes
824
- **Description**: move files or directories of component(s)
825
- https://bit.dev/reference/workspace/moving-components
1461
+ **Description**: move a component to a different filesystem path
1462
+ (note: this does NOT affect the component's name or scope, just its location in the workspace)
826
1463
 
827
- `bit move <existing-dir> <new-dir>`
1464
+ `bit move <current-component-dir> <new-component-dir>`
828
1465
 
829
- | **Option** | **Option alias** | **Description** |
830
- | ------------- | :--------------: | ---------------------------------------------------------------------------------------------------------------------------- |
831
- | `--component` | `-c` | move component files that are spread over multiple directories to one directory. synopsis: `move <component-id> <directory>` |
1466
+ | **Arg** | **Description** |
1467
+ | ----------------------- | :--------------------------------------------------------------------------------------------: |
1468
+ | `current-component-dir` | the component's current directory (relative to the workspace root) |
1469
+ | `new-component-dir` | the new directory (relative to the workspace root) to create and move the component's files to |
832
1470
 
833
1471
  ---
834
1472
 
835
1473
  ## new
836
1474
 
837
- **Workspace only**: yes
838
- **Description**: Create a new workspace from a template
1475
+ **Description**: create a new workspace from a template
1476
+
1477
+ `bit new <template-name> <workspace-name>`
839
1478
 
840
- `bit new <templateName> <workspaceName>`
1479
+ | **Arg** | **Description** |
1480
+ | ---------------- | :----------------------------------------------------------------------------------------------------------------------------: |
1481
+ | `template-name` | the name of the workspace template (run 'bit templates' outside of a workspace to get a list of available workspace templates) |
1482
+ | `workspace-name` | the name for the new workspace and workspace directory that will be created |
841
1483
 
842
- | **Option** | **Option alias** | **Description** |
843
- | -------------------------- | :--------------: | --------------------------------------------------------------------------------------------------------------- |
844
- | `--aspect <string>` | `-a` | aspect-id of the template. mandatory for non-core aspects. helpful for core aspects in case of a name collision |
845
- | `--default-scope <string>` | `-d` | set defaultScope in the new workspace.jsonc |
846
- | `--standalone` | | DEPRECATED. use --skip-git instead |
847
- | `--skip-git` | `-s` | skip generation of Git repository |
848
- | `--empty` | `-e` | empty workspace with no components (relevant for templates that add components by default) |
849
- | `--load-from <string>` | | path to the workspace containing the template. helpful during a development of a workspace-template |
1484
+ | **Option** | **Option alias** | **Description** |
1485
+ | -------------------------------- | :--------------: | ----------------------------------------------------------------------------------------------------------------------------------- |
1486
+ | `--aspect <aspect-id>` | `-a` | id of the aspect that registered the template, mandatory for non-core aspects. helpful for core aspects in case of a name collision |
1487
+ | `--template <env-id>` | `-t` | id of the dev environment to use for the template. Alias for --env. |
1488
+ | `--env <env-id>` | | id of the dev environment to use for the template. Alias -t |
1489
+ | `--default-scope <scope-name>` | `-d` | set the default scope for the workspace. used in the generated workspace.jsonc |
1490
+ | `--standalone` | | DEPRECATED. use --skip-git instead |
1491
+ | `--skip-git` | `-s` | skip generation of Git repository in the new workspace |
1492
+ | `--empty` | `-e` | skip template's default component creation (relevant for templates that add components by default) |
1493
+ | `--load-from <path-to-template>` | | local path to the workspace containing the template. Helpful during a development of a workspace-template |
1494
+ | `--current-dir` | `-c` | create the new workspace in current directory (default is to create a new directory, inside the current dir) |
850
1495
 
851
1496
  ---
852
1497
 
853
- ## pack
1498
+ ## npmrc
854
1499
 
855
- **Workspace only**: yes
856
- **Description**: create tar for npm publish
1500
+ **Description**: manage npmrc file with scope, registry, and token information from bit.cloud
857
1501
 
858
- `bit pack <componentId> [scopePath]`
1502
+ `bit npmrc [sub-command]`
859
1503
 
860
- | **Option** | **Option alias** | **Description** |
861
- | --------------------- | :--------------: | -------------------------------------------------- |
862
- | `--out-dir <out-dir>` | `-d` | directory to put the result tar file |
863
- | `--override` | `-o` | override existing pack file |
864
- | `--keep` | `-k` | should keep isolated environment [default = false] |
865
- | `--prefix` | `-p` | keep custom (binding) prefix |
866
- | `--json` | `-j` | return the output as JSON |
1504
+ ### npmrc generate
1505
+
1506
+ **Usage**: `npmrc generate`
1507
+
1508
+ **Description**: update npmrc file with scope, registry, and token information from bit.cloud
1509
+
1510
+ | **Option** | **Option alias** | **Description** |
1511
+ | ----------- | :--------------: | -------------------------------------------------------- |
1512
+ | `--dry-run` | | show the .npmrc file content that will be written |
1513
+ | `--force` | `-f` | force update the .npmrc file even if there are conflicts |
867
1514
 
868
1515
  ---
869
1516
 
870
1517
  ## pattern
871
1518
 
872
- **Workspace only**: yes
873
- **Description**: list the component ids matching the given pattern
1519
+ **Description**: list the component ids matching the given pattern
1520
+ this command helps validating a pattern before using it in other commands.
1521
+ NOTE: always wrap the pattern with quotes to avoid collision with shell commands. depending on your shell, it might be single or double quotes.
1522
+ a pattern can be a simple component-id or component-name. e.g. 'ui/button'.
1523
+ a pattern can be used with wildcards for multiple component ids, e.g. 'org.scope/utils/**' or '**/utils/**' to capture all org/scopes.
1524
+ to enter multiple patterns, separate them by a comma, e.g. 'ui/_, lib/_'
1525
+ to exclude, use '!'. e.g. 'ui/**, !ui/button'
1526
+ the matching algorithm is from multimatch (@see https://github.com/sindresorhus/multimatch).
1527
+
1528
+ to filter by a state or attribute, prefix the pattern with "$". e.g. '$deprecated', '$modified'.
1529
+ list of supported states: [new, modified, deprecated, deleted, snappedOnMain, softTagged, codeModified].
1530
+ to filter by multi-params state/attribute, separate the params with ":", e.g. '$env:teambit.react/react'.
1531
+ list of supported multi-params states: [env].
1532
+ to match a state and another criteria, use " AND " keyword. e.g. '$modified AND teambit.workspace/\*\*'. note that the state must be first.
874
1533
 
875
1534
  `bit pattern <pattern>`
876
1535
 
@@ -880,10 +1539,22 @@ https://bit.dev/reference/workspace/component-links
880
1539
 
881
1540
  ---
882
1541
 
1542
+ ## recover
1543
+
1544
+ **Description**: EXPERIMENTAL. recover component(s) soft-deleted from the workspace, or a remote scope
1545
+
1546
+ `bit recover <component-name>`
1547
+
1548
+ | **Option** | **Option alias** | **Description** |
1549
+ | -------------------------------- | :--------------: | ---------------------------------------------------------------------- |
1550
+ | `--skip-dependency-installation` | `-x` | do not install packages in case of importing components |
1551
+ | `--skip-write-config-files` | | do not write config files (such as eslint, tsconfig, prettier, etc...) |
1552
+
1553
+ ---
1554
+
883
1555
  ## refactor
884
1556
 
885
- **Workspace only**: yes
886
- **Description**: EXPERIMENTAL. source code refactoring / codemod
1557
+ **Description**: source code refactoring / codemod
887
1558
 
888
1559
  `bit refactor <sub-command>`
889
1560
 
@@ -898,9 +1569,7 @@ the `<old-id>` and `<new-id>` arguments can be either a component-id or a packag
898
1569
 
899
1570
  ## remote
900
1571
 
901
- **Workspace only**: yes
902
- **Description**: manage set of tracked bit scope(s)
903
- https://bit.dev/reference/scope/remote-scopes
1572
+ **Description**: manage set of tracked bit scope(s)
904
1573
 
905
1574
  `bit remote`
906
1575
 
@@ -908,9 +1577,9 @@ the `<old-id>` and `<new-id>` arguments can be either a component-id or a packag
908
1577
 
909
1578
  **Usage**: `remote add <url>`
910
1579
 
911
- **Description**: add a bare-scope as a remote. supported protocols are [file, http, ssh].
912
- for example: "http://localhost:3000", "file:///tmp/local-scope", "ssh://user@127.0.0.1:/tmp/local-scope".
913
- Legacy support [file, ssh]. Harmony supports [file, http].
1580
+ **Description**: add a bare-scope as a remote
1581
+ supported protocols are [file, http].
1582
+ for example: "http://localhost:3000", "file:///tmp/local-scope"
914
1583
 
915
1584
  | **Option** | **Option alias** | **Description** |
916
1585
  | ---------- | :--------------: | ---------------------------- |
@@ -922,9 +1591,9 @@ Legacy support [file, ssh]. Harmony supports [file, http].
922
1591
 
923
1592
  **Description**: remove a tracked bit remote
924
1593
 
925
- | **Option** | **Option alias** | **Description** |
926
- | ---------- | :--------------: | --------------------------------------- |
927
- | `--global` | `-g` | remove a global configured remote scope |
1594
+ | **Option** | **Option alias** | **Description** |
1595
+ | ---------- | :--------------: | ----------------------------------------- |
1596
+ | `--global` | `-g` | remove a globally configured remote scope |
928
1597
 
929
1598
  | **Option** | **Option alias** | **Description** |
930
1599
  | ---------- | :--------------: | ------------------------------- |
@@ -935,83 +1604,207 @@ Legacy support [file, ssh]. Harmony supports [file, http].
935
1604
  ## remove
936
1605
 
937
1606
  **Alias**: `rm`
938
- **Workspace only**: no
939
- **Description**: remove a component (local/remote)
940
- https://bit.dev/reference/components/removing-components
941
- you can use a pattern for multiple ids, such as bit remove "utils/\*". (wrap the pattern with quotes to avoid collision with shell commands)
1607
+ **Description**: remove component(s) from the local workspace
1608
+ to mark components as deleted on the remote scope, use "bit delete".
942
1609
 
943
- `bit remove <ids...>`
1610
+ `bit remove <component-pattern>`
944
1611
 
945
- | **Option** | **Option alias** | **Description** |
946
- | ---------------- | :--------------: | ---------------------------------------------------------------------------------------------------------------------------------- |
947
- | `--remote` | `-r` | remove a component from a remote scope |
948
- | `--track` | `-t` | keep tracking component (default = false) |
949
- | `--delete-files` | `-d` | delete local component files (authored components only. for imported components the files are always deleted) |
950
- | `--force` | `-f` | removes the component from the scope, even if used as a dependency. WARNING: components that depend on this component will corrupt |
951
- | `--silent` | `-s` | skip confirmation |
1612
+ | **Arg** | **Description** |
1613
+ | ------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
1614
+ | `component-pattern` | component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
1615
+
1616
+ | **Option** | **Option alias** | **Description** |
1617
+ | -------------- | :--------------: | ---------------------------------------------------------------------------------------------------------------------------------------------- |
1618
+ | `--track` | `-t` | keep tracking component in .bitmap (default = false), helps transform a tagged-component to new |
1619
+ | `--keep-files` | | keep component files (just untrack the component) |
1620
+ | `--force` | `-f` | removes the component from the scope, even if used as a dependency. WARNING: you will need to fix the components that depend on this component |
1621
+ | `--silent` | `-s` | skip confirmation |
952
1622
 
953
1623
  ---
954
1624
 
955
1625
  ## rename
956
1626
 
957
- **Workspace only**: no
958
- **Description**: EXPERIMENTAL. rename component. if tagged/exported, create a new component and deprecate the source-component
959
- the `<target-name>` should include the component-name only, without the scope-name.
960
- to assign a default-scope to this component, please use "--scope" flag
1627
+ **Description**: rename component. if exported, create a new component and delete the original component. otherwise just renames current component
1628
+
1629
+ `bit rename <current-name> <new-name>`
961
1630
 
962
- `bit rename <source-name> <target-name>`
1631
+ | **Arg** | **Description** |
1632
+ | -------------- | :----------------------------------------------------------------------------------------------: |
1633
+ | `current-name` | the current component name (without its scope name) |
1634
+ | `new-name` | the new component name (without its scope name. use --scope to define the new component's scope) |
963
1635
 
964
- | **Option** | **Option alias** | **Description** |
965
- | ------------------ | :--------------: | --------------------------------------------------------------------------------------- |
966
- | `--scope <string>` | `-s` | default scope for the newly created component |
967
- | `--path <string>` | `-p` | relative path in the workspace. by default the path is `<scope>/<namespace>/<name>` |
968
- | `--refactor` | `-r` | change the source code of all components using this component with the new package-name |
1636
+ | **Option** | **Option alias** | **Description** |
1637
+ | ------------------------ | :--------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
1638
+ | `--scope <scope-name>` | `-s` | define the scope for the new component |
1639
+ | `--refactor` | `-r` | update the import/require statements in all dependent components (in the same workspace) |
1640
+ | `--preserve` | | avoid renaming files and variables/classes according to the new component name |
1641
+ | `--ast` | | EXPERIMENTAL. use ast to transform files instead of regex |
1642
+ | `--delete` | | DEPRECATED. this is now the default |
1643
+ | `--deprecate` | | instead of deleting the original component, deprecating it |
1644
+ | `--path <relative-path>` | `-p` | relative path in the workspace to place new component in. by default, the directory of the new component is from your workspace's "defaultScope" value |
969
1645
 
970
1646
  ---
971
1647
 
972
- ## resume-export
1648
+ ## reset
1649
+
1650
+ **Description**: revert tagged or snapped versions for component(s)
1651
+ https://bit.dev/components/tags#undoing-a-tag
973
1652
 
974
- **Workspace only**: yes
975
- **Description**: resume failed export to persist the pending objects on the given remotes.
976
- the export-id is the id the client got in the error message during the failure.
977
- alternatively, exporting to any one of the failed scopes, throws server-is-busy error with the export-id
1653
+ `bit reset [component-pattern]`
978
1654
 
979
- `bit resume-export <export-id> <remotes...>`
1655
+ | **Arg** | **Description** |
1656
+ | ------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
1657
+ | `component-pattern` | component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
1658
+ | `component-version` | the version to untag (semver for tags. hash for snaps) |
1659
+
1660
+ | **Option** | **Option alias** | **Description** |
1661
+ | ------------------ | :--------------: | --------------------------------------------------------------------------------------------------------------- |
1662
+ | `--all` | `-a` | revert all unexported tags/snaps for all components |
1663
+ | `--head` | | revert the head tag/snap only (by default, all local tags/snaps are reverted) |
1664
+ | `--soft` | | revert only soft-tags (components tagged with --soft flag) |
1665
+ | `--force` | `-f` | revert the tag even if it's used as a dependency. WARNING: components that depend on this tag will be corrupted |
1666
+ | `--never-exported` | | reset only components that were never exported |
1667
+
1668
+ ---
1669
+
1670
+ ## revert
1671
+
1672
+ **Description**: replace the current component files by the specified version, leave the version intact
1673
+
1674
+ `bit revert <component-pattern> <to>`
1675
+
1676
+ | **Arg** | **Description** |
1677
+ | ------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
1678
+ | `component-pattern` | component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
1679
+ | `to` | permitted values: [main, specific-version]. 'main' - head version on main. |
1680
+
1681
+ | **Option** | **Option alias** | **Description** |
1682
+ | -------------------------------- | :--------------: | -------------------------------------------------- |
1683
+ | `--verbose` | `-v` | showing verbose output for inspection |
1684
+ | `--skip-dependency-installation` | `-x` | do not install packages of the imported components |
980
1685
 
981
1686
  ---
982
1687
 
983
1688
  ## run
984
1689
 
985
1690
  **Alias**: `c`
986
- **Workspace only**: yes
987
- **Description**: run an application
1691
+ **Description**: locally run an app component (independent of bit's dev server)
1692
+
1693
+ `bit run <app-name>`
988
1694
 
989
- `bit run <app>`
1695
+ | **Arg** | **Description** |
1696
+ | ---------- | :--------------------------------------------------------------------------------------------------: |
1697
+ | `app-name` | the app's name is registered by the app (run 'bit app list' to list the names of the available apps) |
990
1698
 
991
- | **Option** | **Option alias** | **Description** |
992
- | -------------- | :--------------: | -------------------------------------------------------------------------- |
993
- | `--dev` | `-d` | start the application in dev mode. |
994
- | `--verbose` | `-v` | showing verbose output for inspection and prints stack trace |
995
- | `--skip-watch` | | avoid running the watch process that compiles components in the background |
1699
+ | **Option** | **Option alias** | **Description** |
1700
+ | ---------------------- | :--------------: | -------------------------------------------------------- |
1701
+ | `--dev` | `-d` | start the application in dev mode. |
1702
+ | `--port [port-number]` | `-p` | port to run the app on |
1703
+ | `--verbose` | `-v` | show verbose output for inspection and print stack trace |
1704
+ | `--watch` | `-w` | watch and compile your components upon changes |
996
1705
 
997
1706
  ---
998
1707
 
999
1708
  ## schema
1000
1709
 
1001
- **Workspace only**: yes
1002
- **Description**: shows the API schema of a certain component.
1710
+ **Description**: shows the API schema of the specified component/s.
1711
+ you can use a `<pattern>` for multiple component ids, such as `bit schema "org.scope/utils/**"`.
1712
+ use comma to separate patterns and '!' to exclude. e.g. 'ui/\*\*, !ui/button'
1713
+ use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'.
1714
+ always wrap the pattern with single quotes to avoid collision with shell commands.
1715
+ use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern.
1003
1716
 
1004
- `bit schema <id>`
1717
+ `bit schema <pattern>`
1005
1718
 
1006
- | **Option** | **Option alias** | **Description** |
1007
- | ---------- | :--------------: | ---------------------------------------- |
1008
- | `--json` | `-j` | return the component data in json format |
1719
+ | **Option** | **Option alias** | **Description** |
1720
+ | ---------- | :--------------: | ------------------------------------------ |
1721
+ | `--json` | `-j` | return the component schema in json format |
1722
+
1723
+ ---
1724
+
1725
+ ## scope
1726
+
1727
+ **Description**: manage the scope-name for components
1728
+
1729
+ `bit scope <sub-command>`
1730
+
1731
+ ### scope set
1732
+
1733
+ **Usage**: `scope set <scope-name> [component-pattern]`
1734
+
1735
+ **Description**: Sets the scope for specified component/s. If no component is specified, sets the default scope of the workspace
1736
+ default scopes for components are set in the bitmap file. the default scope for a workspace is set in the workspace.jsonc.
1737
+ a component is set with a scope (as oppose to default scope) only once it is versioned.'
1738
+
1739
+ you can use a `<pattern>` for multiple component ids, such as `bit scope set scope-name "org.scope/utils/**"`.
1740
+ use comma to separate patterns and '!' to exclude. e.g. 'ui/\*\*, !ui/button'
1741
+ use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'.
1742
+ always wrap the pattern with single quotes to avoid collision with shell commands.
1743
+ use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern.
1744
+
1745
+ | **Arg** | **Description** |
1746
+ | ------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
1747
+ | `scope-name` | name of the scope to set |
1748
+ | `component-pattern` | component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
1749
+
1750
+ ### scope rename
1751
+
1752
+ **Usage**: `scope rename <current-scope-name> <new-scope-name>`
1753
+
1754
+ **Description**: rename the scope name for all components with the specified 'current scope name'. if exported, create new components and delete the original ones
1755
+ Note: if `<current-scope-name>` is also the defaultScope for the workspace, this command will set `<new-scope-name>`
1756
+ as the defaultScope instead, and that will then be set for all components by default. You may see updates in your .bitmap file
1757
+ as a result of this change
1758
+
1759
+ | **Arg** | **Description** |
1760
+ | -------------------- | :-------------------------------------------------: |
1761
+ | `current-scope-name` | the scope name to be replaced by another scope name |
1762
+ | `new-scope-name` | a new scope name to replace the current scope name |
1763
+
1764
+ | **Option** | **Option alias** | **Description** |
1765
+ | ------------- | :--------------: | --------------------------------------------------------------------------------------------------------------- |
1766
+ | `--preserve` | | avoid renaming files and variables/classes according to the new scope name |
1767
+ | `--refactor` | `-r` | update the import statements in all dependent components to the new package name (i.e. with the new scope name) |
1768
+ | `--deprecate` | | for exported components, instead of deleting the original components, deprecating them |
1769
+
1770
+ ### scope rename-owner
1771
+
1772
+ **Usage**: `scope rename-owner <current-owner-name> <new-owner-name>`
1773
+
1774
+ **Description**: Renames the owner part of the scope-name for all components with the specified 'current owner name'
1775
+
1776
+ | **Arg** | **Description** |
1777
+ | -------------------- | :-------------------------------------------------: |
1778
+ | `current-owner-name` | the owner name to be replaced by another owner name |
1779
+ | `new-owner-name` | a new owner name to replace the current owner name |
1780
+
1781
+ | **Option** | **Option alias** | **Description** |
1782
+ | ------------ | :--------------: | ------------------------------------------------------------------------------------------------------------------- |
1783
+ | `--refactor` | `-r` | update the import statements in all dependent components to the new package name (that contains the new owner name) |
1784
+ | `--ast` | | EXPERIMENTAL. use ast to transform files instead of regex |
1785
+
1786
+ ### scope fork
1787
+
1788
+ **Usage**: `scope fork <original-scope> <new-scope> [pattern]`
1789
+
1790
+ **Description**: fork all components of the original-scope and refactor the source-code to use the new scope name
1791
+ optionally, provide [pattern] to limit the fork to specific components
1792
+
1793
+ | **Arg** | **Description** |
1794
+ | ---------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
1795
+ | `original-scope` | the original scope to fork |
1796
+ | `new-scope` | the new scope to fork to |
1797
+ | `pattern` | component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
1798
+
1799
+ | **Option** | **Option alias** | **Description** |
1800
+ | -------------------------------- | :--------------: | --------------------------------------------------------- |
1801
+ | `--ast` | | EXPERIMENTAL. use ast to transform files instead of regex |
1802
+ | `--skip-dependency-installation` | `-x` | do not install packages of the imported components |
1009
1803
 
1010
1804
  ---
1011
1805
 
1012
1806
  ## scope-config
1013
1807
 
1014
- **Workspace only**: yes
1015
1808
  **Description**: scope config management
1016
1809
 
1017
1810
  `bit scope-config`
@@ -1042,146 +1835,261 @@ alternatively, exporting to any one of the failed scopes, throws server-is-busy
1042
1835
 
1043
1836
  ---
1044
1837
 
1838
+ ## server
1839
+
1840
+ **Description**: EXPERIMENTAL. communicate with bit cli program via http requests
1841
+
1842
+ `bit server`
1843
+
1844
+ | **Option** | **Option alias** | **Description** |
1845
+ | --------------- | :--------------: | ------------------------------------------- |
1846
+ | `--port [port]` | `-p` | port to run the server on |
1847
+ | `--compile` | `-c` | compile components during the watch process |
1848
+
1849
+ ---
1850
+
1851
+ ## set-peer
1852
+
1853
+ **Description**: set a component as always peer
1854
+
1855
+ `bit set-peer <component-id> <range>`
1856
+
1857
+ | **Arg** | **Description** |
1858
+ | -------------- | :-------------------------------------------------------------------------: |
1859
+ | `component-id` | the component to set as always peer |
1860
+ | `range` | the default range to use for the componnent, when added to peerDependencies |
1861
+
1862
+ ---
1863
+
1045
1864
  ## show
1046
1865
 
1047
- **Workspace only**: yes
1048
- **Description**: show a component
1866
+ **Description**: display the component's essential information
1049
1867
 
1050
- `bit show <id>`
1868
+ `bit show <component-name>`
1051
1869
 
1052
- | **Option** | **Option alias** | **Description** |
1053
- | ----------- | :--------------: | -------------------------------------------------------------------------------------------------------- |
1054
- | `--json` | `-j` | return the component data in json format |
1055
- | `--legacy` | `-l` | use the legacy bit show. |
1056
- | `--remote` | `-r` | show a remote component |
1057
- | `--compare` | `-c` | compare current file system component to latest tagged component [default=latest]. only works in legacy. |
1870
+ | **Arg** | **Description** |
1871
+ | ---------------- | :----------------------------: |
1872
+ | `component-name` | component name or component id |
1873
+
1874
+ | **Option** | **Option alias** | **Description** |
1875
+ | ----------- | :--------------: | ------------------------------------------------------------------------------------------------ |
1876
+ | `--json` | `-j` | return the component data in json format |
1877
+ | `--legacy` | `-l` | use the legacy bit show. |
1878
+ | `--remote` | `-r` | show data for a remote component |
1879
+ | `--compare` | `-c` | legacy-only. compare current file system component to its latest tagged version [default=latest] |
1880
+
1881
+ ---
1882
+
1883
+ ## snap
1884
+
1885
+ **Description**: create an immutable and exportable component snapshot (non-release version)
1886
+
1887
+ `bit snap [component-pattern]`
1888
+
1889
+ | **Arg** | **Description** |
1890
+ | ------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
1891
+ | `component-pattern` | component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern.. By default, only new and modified components are snapped (add --unmodified to snap all components in the workspace). |
1892
+
1893
+ | **Option** | **Option alias** | **Description** |
1894
+ | -------------------------- | :--------------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1895
+ | `--message <message>` | `-m` | snap message describing the latest changes - will appear in component history log |
1896
+ | `--unmodified` | `-u` | include unmodified components (by default, only new and modified components are snapped) |
1897
+ | `--unmerged` | | complete a merge process by snapping the unmerged components |
1898
+ | `--build` | `-b` | locally run the build pipeline (i.e. not via rippleCI) and complete the snap |
1899
+ | `--editor [editor]` | | open an editor to write a snap message per component. optionally specify the editor-name (defaults to vim). |
1900
+ | `--skip-tests` | | skip running component tests during snap process |
1901
+ | `--skip-tasks <string>` | | skip the given tasks. for multiple tasks, separate by a comma and wrap with quotes. specify the task-name (e.g. "TypescriptCompiler") or the task-aspect-id (e.g. teambit.compilation/compiler) |
1902
+ | `--skip-auto-snap` | | skip auto snapping dependents |
1903
+ | `--disable-snap-pipeline` | | skip the snap pipeline. this will for instance skip packing and publishing component version for install, and app deployment |
1904
+ | `--ignore-build-errors` | | proceed to snap pipeline even when build pipeline fails |
1905
+ | `--rebuild-deps-graph` | | do not reuse the saved dependencies graph, instead build it from scratch |
1906
+ | `--ignore-issues <issues>` | `-i` | ignore component issues (shown in "bit status" as "issues found"), issues to ignore: [MissingPackagesDependenciesOnFs, MissingManuallyConfiguredPackages, UntrackedDependencies, ResolveErrors, RelativeComponents, RelativeComponentsAuthored, ParseErrors, MissingDists, LegacyInsideHarmony, MissingDependenciesOnFs, ImportNonMainFiles, MultipleEnvs, MissingLinksFromNodeModulesToSrc, CircularDependencies, DuplicateComponentAndPackage, MergeConfigHasConflict, NonLoadedEnv, ExternalEnvWithoutVersion, RemovedDependencies, SelfReference, ImportFromDirectory] to ignore multiple issues, separate them by a comma and wrap with quotes. to ignore all issues, specify "\*". |
1907
+ | `--fail-fast` | | stop pipeline execution on the first failed task (by default a task is skipped only when its dependency failed) |
1058
1908
 
1059
1909
  ---
1060
1910
 
1061
1911
  ## start
1062
1912
 
1063
1913
  **Alias**: `c`
1064
- **Workspace only**: yes
1065
- **Description**: Start a dev environment for a workspace or a specific component
1914
+ **Description**: run the ui/development server
1915
+
1916
+ `bit start [component-pattern]`
1917
+
1918
+ | **Arg** | **Description** |
1919
+ | ------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
1920
+ | `component-pattern` | component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
1921
+
1922
+ | **Option** | **Option alias** | **Description** |
1923
+ | ----------------------- | :--------------: | ------------------------------------------------------------------------------------------------------- |
1924
+ | `--dev` | `-d` | start UI server in dev mode. |
1925
+ | `--port [port-number]` | `-p` | port of the UI server. |
1926
+ | `--rebuild` | `-r` | rebuild the UI (useful e.g. when updating the workspace UI - can use the dev flag for HMR in this case) |
1927
+ | `--skip-ui-build` | | skip building UI |
1928
+ | `--verbose` | `-v` | show verbose output for inspection and prints stack trace |
1929
+ | `--no-browser` | `-n` | do not automatically open browser when ready |
1930
+ | `--skip-compilation` | | skip the auto-compilation before starting the web-server |
1931
+ | `--ui-root-name [type]` | `-u` | name of the ui root to use, e.g. "teambit.scope/scope" or "teambit.workspace/workspace" |
1932
+
1933
+ ---
1934
+
1935
+ ## stash
1936
+
1937
+ **Description**: EXPERIMENTAL. stash modified components
1066
1938
 
1067
- `bit start [type] [pattern]`
1939
+ `bit stash <sub-command>`
1068
1940
 
1069
- | **Option** | **Option alias** | **Description** |
1070
- | -------------------- | :--------------: | ------------------------------------------------------------ |
1071
- | `--dev` | `-d` | start UI server in dev mode. |
1072
- | `--port [number]` | `-p` | port of the UI server. |
1073
- | `--rebuild` | `-r` | rebuild the UI |
1074
- | `--verbose` | `-v` | showing verbose output for inspection and prints stack trace |
1075
- | `--no-browser` | | do not automatically open browser when ready |
1076
- | `--skip-compilation` | | skip the auto-compilation before starting the web-server |
1941
+ ### stash save
1942
+
1943
+ **Usage**: `stash save`
1944
+
1945
+ **Description**: stash modified components
1946
+
1947
+ | **Option** | **Option alias** | **Description** |
1948
+ | -------------------- | :--------------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1949
+ | `--pattern` | `-p` | component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
1950
+ | `--message <string>` | `-m` | message to be attached to the stashed components |
1951
+
1952
+ ### stash load
1953
+
1954
+ **Usage**: `stash load [stash-id]`
1955
+
1956
+ **Description**: apply the changes according to the stash. if no stash-id provided, it loads the latest stash
1957
+
1958
+ | **Option** | **Option alias** | **Description** |
1959
+ | --------------------------------------- | :--------------: | ----------------------------------------------------------------------------------------------------------- |
1960
+ | `--auto-merge-resolve <merge-strategy>` | | in case of merge conflict, resolve according to the provided strategy: [ours, theirs, manual] |
1961
+ | `--manual` | | same as "--auto-merge-resolve manual". in case of merge conflict, write the files with the conflict markers |
1962
+ | `--force-ours` | | do not merge, preserve local files as is |
1963
+ | `--force-theirs` | | do not merge, just overwrite with incoming files |
1964
+
1965
+ ### stash list
1966
+
1967
+ **Usage**: `stash list`
1968
+
1969
+ **Description**: list stash
1970
+
1971
+ | **Option** | **Option alias** | **Description** |
1972
+ | -------------------- | :--------------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1973
+ | `--pattern` | `-p` | component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
1974
+ | `--message <string>` | `-m` | message to be attached to the stashed components |
1077
1975
 
1078
1976
  ---
1079
1977
 
1080
1978
  ## status
1081
1979
 
1082
1980
  **Alias**: `s`
1083
- **Workspace only**: yes
1084
- **Description**: show the working area component(s) status.
1085
- https://bit.dev/reference/workspace/workspace-status
1981
+ **Description**: present the current status of components in the workspace, including indication of detected issues
1086
1982
 
1087
1983
  `bit status`
1088
1984
 
1089
- | **Option** | **Option alias** | **Description** |
1090
- | ---------- | :--------------: | -------------------------------------- |
1091
- | `--json` | `-j` | return a json version of the component |
1092
- | `--strict` | | in case issues found, exit with code 1 |
1985
+ | **Option** | **Option alias** | **Description** |
1986
+ | -------------------------------- | :--------------: | --------------------------------------------------------------------------------------- |
1987
+ | `--json` | `-j` | return a json version of the component |
1988
+ | `--verbose` | | show extra data: full snap hashes for staged components, and divergence point for lanes |
1989
+ | `--lanes` | `-l` | when on a lane, show updates from main and updates from forked lanes |
1990
+ | `--strict` | | in case issues found, exit with code 1 |
1991
+ | `--ignore-circular-dependencies` | `-c` | do not check for circular dependencies to get the results quicker |
1992
+
1993
+ ---
1994
+
1995
+ ## system
1996
+
1997
+ **Description**: system operations
1998
+
1999
+ `bit system <sub-command>`
2000
+
2001
+ ### system log
2002
+
2003
+ **Usage**: `system log`
2004
+
2005
+ **Description**: print debug.log to the screen
1093
2006
 
1094
2007
  ---
1095
2008
 
1096
2009
  ## tag
1097
2010
 
1098
2011
  **Alias**: `t`
1099
- **Workspace only**: yes
1100
- **Description**: record component changes and lock versions.
1101
- if no ids are provided, it will tag all new and modified components.
1102
- 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
1103
- https://bit.dev/reference/components/tags
1104
- you can use a pattern for multiple ids, such as bit tag "utils/\*". (wrap the pattern with quotes to avoid collision with shell commands)
1105
-
1106
- `bit tag [id...]`
1107
-
1108
- | **Option** | **Option alias** | **Description** |
1109
- | ---------------------------- | :--------------: | ----------------------------------------------------------------------------------------------------------------------- |
1110
- | `--message <message>` | `-m` | log message describing the user changes |
1111
- | `--unmodified` | | include unmodified components (by default, only new and modified components are tagged) |
1112
- | `--editor [editor]` | | EXPERIMENTAL. open an editor to edit the tag messages per component, optionally specify the editor-name, default to vim |
1113
- | `--ver <version>` | `-v` | tag with the given version |
1114
- | `--patch` | `-p` | increment the patch version number |
1115
- | `--minor` | | increment the minor version number |
1116
- | `--major` | | increment the major version number |
1117
- | `--snapped` | | tag components that their head is a snap (not a tag) |
1118
- | `--pre-release [identifier]` | | EXPERIMENTAL. increment a pre-release version (e.g. 1.0.0-dev.1) |
1119
- | `--skip-tests` | | skip running component tests during tag process |
1120
- | `--skip-auto-tag` | | skip auto tagging dependents |
1121
- | `--soft` | | do not persist. only keep note of the changes to be made |
1122
- | `--persist` | | persist the changes generated by --soft tag |
1123
- | `--disable-tag-pipeline` | | skip the tag pipeline to avoid publishing the components |
1124
- | `--force-deploy` | | run the tag pipeline although the build failed |
1125
- | `--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. |
1126
- | `--ignore-issues [issues]` | `-i` | ignore component issues (shown in "bit status" as "issues found"), issues to ignore: |
1127
-
1128
- [MissingPackagesDependenciesOnFs, MissingComponents, UntrackedDependencies, ResolveErrors, RelativeComponents, RelativeComponentsAuthored, ParseErrors, MissingLinks, MissingDists, LegacyInsideHarmony, MissingDependenciesOnFs, MissingCustomModuleResolutionLinks, ImportNonMainFiles, CustomModuleResolutionUsed, MultipleEnvs, MissingLinksFromNodeModulesToSrc, CircularDependencies]
1129
- to ignore multiple issues, separate them by a comma and wrap with quotes. to ignore all issues, specify "\*".|
1130
- |`--ignore-newest-version`|`-I`|ignore existing of newer versions (default = false)|
1131
- |`--build`|`-b`|EXPERIMENTAL. not needed for now. run the pipeline build and complete the tag|
1132
- |`--all [version]`|`-a`|DEPRECATED (not needed anymore, it is the default now). tag all new and modified components|
1133
- |`--scope [version]`|`-s`|DEPRECATED (use "--unmodified" instead). tag all components of the current scope|
1134
- |`--force`|`-f`|DEPRECATED (use "--skip-tests" or "--unmodified" instead). force-tag even if tests are failing and even when component has not changed|
1135
- |`--disable-deploy-pipeline`| |DEPRECATED. use --disable-tag-pipeline instead|
2012
+ **Description**: create an immutable and exportable component snapshot, tagged with a release version.
2013
+ if no patterns are provided, it will tag all new and modified components.
2014
+ if patterns are entered, you can specify a version per pattern using "@" sign, e.g. bit tag foo@1.0.0 bar@minor baz@major
2015
+
2016
+ `bit tag [component-patterns...]`
2017
+
2018
+ | **Arg** | **Description** |
2019
+ | ----------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
2020
+ | `component-patterns...` | component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern.. By default, all new and modified are tagged. |
2021
+
2022
+ | **Option** | **Option alias** | **Description** |
2023
+ | ---------------------------- | :--------------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2024
+ | `--message <message>` | `-m` | a log message describing latest changes |
2025
+ | `--unmodified` | `-u` | include unmodified components (by default, only new and modified components are tagged) |
2026
+ | `--editor [editor]` | | open an editor to write a tag message for each component. optionally, specify the editor-name (defaults to vim). |
2027
+ | `--ver <version>` | `-v` | tag with the given version |
2028
+ | `--increment <level>` | `-l` | options are: [major, premajor, minor, preminor, patch, prepatch, prerelease], default to patch |
2029
+ | `--prerelease-id <id>` | | prerelease identifier (e.g. "dev" to get "1.0.0-dev.1") |
2030
+ | `--patch` | `-p` | syntactic sugar for "--increment patch" |
2031
+ | `--minor` | | syntactic sugar for "--increment minor" |
2032
+ | `--major` | | syntactic sugar for "--increment major" |
2033
+ | `--pre-release [identifier]` | | syntactic sugar for "--increment prerelease" and `--prerelease-id <identifier>` |
2034
+ | `--snapped` | | tag only components whose head is a snap (not a tag) |
2035
+ | `--unmerged` | | complete a merge process by tagging the unmerged components |
2036
+ | `--skip-tests` | | skip running component tests during tag process |
2037
+ | `--skip-tasks <string>` | | skip the given tasks. for multiple tasks, separate by a comma and wrap with quotes. specify the task-name (e.g. "TypescriptCompiler") or the task-aspect-id (e.g. teambit.compilation/compiler) |
2038
+ | `--skip-auto-tag` | | skip auto tagging dependents |
2039
+ | `--soft` | | do not persist. only keep note of the changes to be made |
2040
+ | `--persist [skip-build]` | | persist the changes generated by --soft tag. by default, run the build pipeline, unless "skip-build" is provided |
2041
+ | `--disable-tag-pipeline` | | skip the tag pipeline to avoid publishing the components |
2042
+ | `--force-deploy` | | DEPRECATED. use --ignore-build-error instead |
2043
+ | `--ignore-build-errors` | | proceed to tag pipeline even when build pipeline fails |
2044
+ | `--rebuild-deps-graph` | | do not reuse the saved dependencies graph, instead build it from scratch |
2045
+ | `--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. |
2046
+ | `--ignore-issues <issues>` | `-i` | ignore component issues (shown in "bit status" as "issues found"), issues to ignore: [MissingPackagesDependenciesOnFs, MissingManuallyConfiguredPackages, UntrackedDependencies, ResolveErrors, RelativeComponents, RelativeComponentsAuthored, ParseErrors, MissingDists, LegacyInsideHarmony, MissingDependenciesOnFs, ImportNonMainFiles, MultipleEnvs, MissingLinksFromNodeModulesToSrc, CircularDependencies, DuplicateComponentAndPackage, MergeConfigHasConflict, NonLoadedEnv, ExternalEnvWithoutVersion, RemovedDependencies, SelfReference, ImportFromDirectory] to ignore multiple issues, separate them by a comma and wrap with quotes. to ignore all issues, specify "\*". |
2047
+ | `--ignore-newest-version` | `-I` | allow tagging even when the component has newer versions e.g. for hotfixes (default = false) |
2048
+ | `--fail-fast` | | stop pipeline execution on the first failed task (by default a task is skipped only when its dependency failed) |
2049
+ | `--build` | `-b` | locally run the build pipeline (i.e. not via rippleCI) and complete the tag |
1136
2050
 
1137
2051
  ---
1138
2052
 
1139
2053
  ## templates
1140
2054
 
1141
- **Workspace only**: yes
1142
- **Description**: list components templates when inside bit-workspace (for bit-create), otherwise, list workspace templates (for bit-new)
2055
+ **Description**: list available templates for "bit create" and "bit new"
2056
+ list components templates when inside bit-workspace (for bit-create), otherwise, list workspace templates (for bit-new)
1143
2057
 
1144
2058
  `bit templates`
1145
2059
 
1146
- | **Option** | **Option alias** | **Description** |
1147
- | ------------ | :--------------: | --------------------- |
1148
- | `--show-all` | `-s` | show hidden templates |
2060
+ | **Option** | **Option alias** | **Description** |
2061
+ | ---------------------- | :--------------: | ---------------------------------------- |
2062
+ | `--show-all` | `-s` | show hidden templates |
2063
+ | `--aspect <aspect-id>` | `-a` | show templates provided by the aspect-id |
1149
2064
 
1150
2065
  ---
1151
2066
 
1152
2067
  ## test
1153
2068
 
1154
2069
  **Alias**: `at`
1155
- **Workspace only**: yes
1156
- **Description**: test set of components in your workspace
1157
-
1158
- `bit test [pattern]`
1159
-
1160
- | **Option** | **Option alias** | **Description** |
1161
- | -------------------- | :--------------: | -------------------------------------------------------------------- |
1162
- | `--watch` | `-w` | start the tester in watch mode. |
1163
- | `--debug` | `-d` | start the tester in debug mode. |
1164
- | `--all` | `-a` | test all components, not only new and modified |
1165
- | `--junit <filepath>` | | write tests results as JUnit XML format into the specified file path |
1166
- | `--coverage` | | show code coverage data |
1167
- | `--env <id>` | `-e` | test only the given env |
1168
- | `--scope <scope>` | `-s` | name of the scope to test |
2070
+ **Description**: test components in the workspace. by default only runs tests for new and modified components
1169
2071
 
1170
- ---
1171
-
1172
- ## ui-build
2072
+ `bit test [component-pattern]`
1173
2073
 
1174
- **Alias**: `c`
1175
- **Workspace only**: yes
1176
- **Description**: build production assets for deployment.
2074
+ | **Arg** | **Description** |
2075
+ | ------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
2076
+ | `component-pattern` | component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
1177
2077
 
1178
- `bit ui-build [type]`
2078
+ | **Option** | **Option alias** | **Description** |
2079
+ | ---------------------- | :--------------: | --------------------------------------------------------------------------------------- |
2080
+ | `--watch` | `-w` | start the tester in watch mode. |
2081
+ | `--debug` | `-d` | start the tester in debug mode. |
2082
+ | `--all` | `-a` | DEPRECATED. (use --unmodified) |
2083
+ | `--unmodified` | `-u` | test all components, not only new and modified |
2084
+ | `--junit <filepath>` | | write tests results as JUnit XML format into the specified file path |
2085
+ | `--coverage` | | show code coverage data |
2086
+ | `--env <id>` | `-e` | test only components assigned the given env |
2087
+ | `--scope <scope-name>` | `-s` | DEPRECATED. (use the pattern instead, e.g. "scopeName/\*\*"). name of the scope to test |
1179
2088
 
1180
2089
  ---
1181
2090
 
1182
2091
  ## undeprecate
1183
2092
 
1184
- **Workspace only**: no
1185
2093
  **Description**: undeprecate a deprecated component (local/remote)
1186
2094
 
1187
2095
  `bit undeprecate <id>`
@@ -1191,64 +2099,205 @@ to ignore multiple issues, separate them by a comma and wrap with quotes. to ign
1191
2099
  ## uninstall
1192
2100
 
1193
2101
  **Alias**: `un`
1194
- **Workspace only**: yes
1195
2102
  **Description**: uninstall dependencies
1196
2103
 
1197
2104
  `bit uninstall [packages...]`
1198
2105
 
1199
2106
  ---
1200
2107
 
1201
- ## untag
2108
+ ## unuse
1202
2109
 
1203
- **Workspace only**: yes
1204
- **Description**: revert version(s) tagged for component(s)
1205
- https://bit.dev/reference/components/tags#undoing-a-tag
1206
- you can use a pattern for multiple ids, such as bit untag "utils/\*". (wrap the pattern with quotes to avoid collision with shell commands)
2110
+ **Description**: unset aspects in the workspace config (opposite of "use" command)
1207
2111
 
1208
- `bit untag [id] [version]`
2112
+ `bit unuse <component-id>`
1209
2113
 
1210
- | **Option** | **Option alias** | **Description** |
1211
- | ---------- | :--------------: | ----------------------------------------------------------------------------------------------------- |
1212
- | `--all` | `-a` | revert tag for all tagged components |
1213
- | `--soft` | | harmony - revert only soft-tags (components tagged with --soft flag) |
1214
- | `--force` | `-f` | revert the tag even if used as a dependency. WARNING: components that depend on this tag will corrupt |
2114
+ | **Arg** | **Description** |
2115
+ | -------------- | :----------------------------: |
2116
+ | `component-id` | the component ID of the aspect |
1215
2117
 
1216
2118
  ---
1217
2119
 
1218
2120
  ## update
1219
2121
 
1220
2122
  **Alias**: `up`
1221
- **Workspace only**: yes
1222
- **Description**: update dependencies
2123
+ **Description**: update dependencies. By default, dependencies are updated to the highest semver compatible versions.
1223
2124
 
1224
- `bit update`
2125
+ `bit update [package-patterns...]`
1225
2126
 
1226
- | **Option** | **Option alias** | **Description** |
1227
- | ---------- | :--------------: | ------------------------------------------ |
1228
- | `--yes` | `-y` | automatically update all outdated packages |
2127
+ | **Arg** | **Description** |
2128
+ | --------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
2129
+ | `package-patterns...` | a string list of package names, or patterns (separated by spaces or commas), e.g. "@teambit/**,@my-org/ui/**". The patterns should be in glob format. By default, all packages are selected. |
2130
+
2131
+ | **Option** | **Option alias** | **Description** |
2132
+ | ---------- | :--------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
2133
+ | `--yes` | `-y` | automatically update all outdated versions for packages specified in pattern (all if no pattern supplied) - use carefully as could result in breaking updates for dependencies |
2134
+ | `--patch` | | update to the latest patch version. Semver rules are ignored |
2135
+ | `--minor` | | update to the latest minor version. Semver rules are ignored |
2136
+ | `--major` | | update to the latest major version. Semver rules are ignored |
2137
+ | `--semver` | | update to the newest version respecting semver |
1229
2138
 
1230
2139
  ---
1231
2140
 
1232
2141
  ## use
1233
2142
 
1234
- **Workspace only**: yes
1235
- **Description**: set up aspects in the workspace/scope config
2143
+ **Description**: set aspects in the workspace/scope config to make them loadable by the workspace/scope
2144
+
2145
+ `bit use <component-id>`
2146
+
2147
+ | **Arg** | **Description** |
2148
+ | -------------- | :----------------------------: |
2149
+ | `component-id` | the component ID of the aspect |
2150
+
2151
+ ---
2152
+
2153
+ ## version
2154
+
2155
+ **Description**: shows bit version
2156
+
2157
+ `bit version`
2158
+
2159
+ | **Option** | **Option alias** | **Description** |
2160
+ | ---------- | :--------------: | --------------------------------- |
2161
+ | `--json` | `-j` | return the version in json format |
2162
+
2163
+ ---
2164
+
2165
+ ## version-history
2166
+
2167
+ **Alias**: `vh`
2168
+ **Description**: manage the version-history of components
2169
+
2170
+ `bit version-history <sub-command>`
2171
+
2172
+ ### version-history graph
2173
+
2174
+ **Usage**: `version-history graph <component-id>`
2175
+
2176
+ **Description**: generate a graph of the version history of a component and save as an SVG file
2177
+
2178
+ | **Option** | **Option alias** | **Description** |
2179
+ | ----------------- | :--------------: | ------------------------------------------------------------------------------------------------------ |
2180
+ | `--short-hash` | `-s` | show only 9 chars of the hash |
2181
+ | `--mark <string>` | `-m` | paint the given node-ids in the graph in red color, for multiple, separate by commas |
2182
+ | `--png` | | save the graph as a png file instead of svg. requires "graphviz" to be installed |
2183
+ | `--layout <name>` | `-l` | GraphVis layout. default to "dot". options are [circo, dot, fdp, neato, osage, patchwork, sfdp, twopi] |
2184
+
2185
+ ### version-history show
2186
+
2187
+ **Usage**: `version-history show <component-id>`
2188
+
2189
+ **Description**: show the version-history of a component
2190
+
2191
+ | **Option** | **Option alias** | **Description** |
2192
+ | -------------- | :--------------: | ----------------------------- |
2193
+ | `--short-hash` | `-s` | show only 9 chars of the hash |
2194
+ | `--json` | `-j` | json format |
1236
2195
 
1237
- `bit use [ids...]`
2196
+ ### version-history build
2197
+
2198
+ **Usage**: `version-history build <component-pattern>`
2199
+
2200
+ **Description**: rebuild the version history of a component. helpful when it got corrupted for some reason
2201
+
2202
+ | **Arg** | **Description** |
2203
+ | ------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
2204
+ | `component-pattern` | component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/\*\*, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
2205
+
2206
+ | **Option** | **Option alias** | **Description** |
2207
+ | -------------------- | :--------------: | ----------------------------------------------------------------------------------------- |
2208
+ | `--from-snap <snap>` | | build the version history from a specific snap. the pattern must be a single component-id |
2209
+ | `--from-all-lanes` | | build the version history from the heads of all lanes that include this component |
2210
+ | `--delete-existing` | | delete the existing version history before building it |
2211
+ | `--remote <scope>` | | make the change on the remote scope |
1238
2212
 
1239
2213
  ---
1240
2214
 
1241
2215
  ## watch
1242
2216
 
1243
- **Workspace only**: yes
1244
- **Description**: watch a set of components
2217
+ **Description**: automatically recompile modified components (on save)
2218
+ by default, the watcher doesn't use polling, to keep the CPU idle.
2219
+ if this doesn't work well for you, run "bit config set watch_use_polling true" to use polling.
1245
2220
 
1246
2221
  `bit watch`
1247
2222
 
1248
2223
  | **Option** | **Option alias** | **Description** |
1249
2224
  | ------------------------ | :--------------: | ------------------------------------------------------------------------------------------------------------------------------------------------- |
1250
- | `--verbose` | `-v` | showing npm verbose output for inspection and prints stack trace |
1251
- | `--skip-pre-compilation` | | skip the compilation step before starting to watch |
2225
+ | `--verbose` | `-v` | show all watch events and compiler verbose output |
2226
+ | `--skip-pre-compilation` | | skip compilation step before starting to watch |
1252
2227
  | `--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 |
2228
+ | `--import` | `-i` | helpful when using git. import component objects if .bitmap changed not by bit |
2229
+
2230
+ ---
2231
+
2232
+ ## whoami
2233
+
2234
+ **Description**: display the currently logged in user
2235
+
2236
+ `bit whoami`
2237
+
2238
+ ---
2239
+
2240
+ ## why
2241
+
2242
+ **Description**: EXPERIMENTAL. find components that use the specified dependency
2243
+
2244
+ `bit why <dependency-name>`
2245
+
2246
+ | **Arg** | **Description** |
2247
+ | ----------------- | :------------------------------------------------------------------------------------------------------------------------------------------: |
2248
+ | `dependency-name` | package-name. for components, you can use either component-id or package-name. if version is specified, it will search for the exact version |
2249
+
2250
+ | **Option** | **Option alias** | **Description** |
2251
+ | ------------------ | :--------------: | ----------------------------------------- |
2252
+ | `--depth <number>` | | max display depth of the dependency graph |
2253
+
2254
+ ---
2255
+
2256
+ ## ws-config
2257
+
2258
+ **Alias**: `workspace-config`
2259
+ **Description**: manage workspace config files
2260
+
2261
+ `bit ws-config <sub-command>`
2262
+
2263
+ ### ws-config write
2264
+
2265
+ **Usage**: `ws-config write`
2266
+
2267
+ **Description**: write config files in the workspace. useful for IDEs
2268
+
2269
+ | **Option** | **Option alias** | **Description** |
2270
+ | ------------------------ | :--------------: | ---------------------------------------------------------------------------------------------------------------------------- |
2271
+ | `--clean` | `-c` | delete existing config files from the workspace. highly recommended to run it with "--dry-run" first |
2272
+ | `--writers <writers>` | `-w` | only write config files for the given writers. use comma to separate multiple writers. use ws-config list to see all writers |
2273
+ | `--silent` | `-s` | do not prompt for confirmation |
2274
+ | `--no-dedupe` | | write configs inside each one of the component's dir, avoid deduping |
2275
+ | `--dry-run` | | show the paths that configs will be written per env |
2276
+ | `--dry-run-with-content` | | use with --json flag. show the config content and the paths that will be written per env |
2277
+ | `--verbose` | `-v` | showing verbose output for writing |
2278
+ | `--json` | `-j` | json format |
2279
+
2280
+ ### ws-config clean
2281
+
2282
+ **Usage**: `ws-config clean`
2283
+
2284
+ **Description**: clean (delete) written config files in the workspace. useful for IDEs
2285
+
2286
+ | **Option** | **Option alias** | **Description** |
2287
+ | --------------------- | :--------------: | ---------------------------------------------------------------------------------------------------------------------------- |
2288
+ | `--silent` | `-s` | do not prompt for confirmation |
2289
+ | `--writers <writers>` | `-w` | only clean config files for the given writers. use comma to separate multiple writers. use ws-config list to see all writers |
2290
+ | `--dry-run` | | show the paths of configs that will be cleaned |
2291
+ | `--json` | `-j` | json format |
2292
+
2293
+ ### ws-config list
2294
+
2295
+ **Usage**: `ws-config list`
2296
+
2297
+ **Description**: list config writers
2298
+
2299
+ | **Option** | **Option alias** | **Description** |
2300
+ | ---------- | :--------------: | --------------- |
2301
+ | `--json` | `-j` | json format |
1253
2302
 
1254
2303
  ---