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