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