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