Run the following to list all available Bit commands (alternatively, use the -h
alias, instead of --help
):
bit --help
Run the following to get help on a specific command:
bit COMMAND --help
Run the following to get help on a specific sub-command:
bit COMMAND SUB_COMMAND --help
Alias: a
Description: Add any subset of files to be tracked as a component(s).
Learn the recommended workflow for tracking directories as components, in the link below.
bit add [path...]
Option | Option alias | Description |
---|---|---|
--id <name> | -i | manually set component id |
--main <file> | -m | define entry point for the components |
--namespace <namespace> | -n | organize component in a namespace |
--override <boolean> | -o | override existing component if exists (default = false) |
--scope <string> | -s | sets the component's scope-name. if not entered, the default-scope will be used |
Description: Manages apps
bit app <sub-command>
Usage: app list
Description: list all registered apps
Option | Option alias | Description |
---|---|---|
--json | -j | return the component data in json format |
Usage: app run <app-name>
Description: run an app (independent of bit's dev server)
Option | Option alias | Description |
---|---|---|
--dev | -d | start the application in dev mode. |
--verbose | -v | showing verbose output for inspection and prints stack trace |
--skip-watch | avoid running the watch process that compiles components in the background | |
--ssr | run app in server side rendering mode. |
Description: list and download components artifacts
artifacts are created on isolated capsules during tag or snap commands.
example of artifacts are dists files generated by a compiler, a JUnit.xml file generated by a tester
and a package.tgz file generated by pkg aspect.
bit artifacts <component-pattern>
Option | Option alias | Description |
---|---|---|
--aspect <aspect-id> | show/download only artifacts generated by this aspect-id | |
--task <task-id> | show/download only artifacts generated by this task-id | |
--files <glob> | show/download only artifacts matching the given files or the glob pattern (wrap glob patterns in quotes) | |
--out-dir <string> | download the files to the specified dir |
Description: EXPERIMENTAL. manage aspects
bit aspect <sub-command>
Usage: aspect list [pattern]
Description: list all aspects configured on component(s)
Option | Option alias | Description |
---|---|---|
--debug | -d | show the origins were the aspects were taken from |
Usage: aspect get <component-name>
Description: list the aspects set on a component, as well as their config and data
Option | Option alias | Description |
---|---|---|
--debug | -d | show the origins were the aspects were taken from |
--json | -j | format as json |
Usage: aspect set <pattern> <aspect-id> [config]
Description: set components with an aspect to extend their development tools, metadata and (possibly) artifacts
Option | Option alias | Description |
---|---|---|
--merge | -m | merge with an existing config if exits. (by default, it replaces the config) |
Usage: aspect unset <pattern> <aspect-id>
Description: unset an aspect from component(s).
Usage: aspect update <aspect-id> [pattern]
Description: update a version of an aspect
Description: run set of tasks for build
bit build [component-pattern]
Option | Option alias | Description |
---|---|---|
--all | -a | DEPRECATED. use --unmodified |
--unmodified | -u | include unmodified components (by default, only new and modified components are built) |
--dev | -d | run the pipeline in dev mode |
--install | install core aspects in capsules | |
--reuse-capsules | avoid deleting the capsules root-dir before starting the build | |
--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) | |
--cache-packages-on-capsule-root | set the package-manager cache on the capsule root | |
--list-tasks <string> | list tasks of an env or a component-id for each one of the pipelines: build, tag and snap | |
--skip-tests | skip running component tests during tag process |
Description: manage capsules
a capsule is a directory containing the component code, isolated from the workspace.
normally, capsules are created during the build process, the component files are copied and the packages are installed
via the configured package-manager. the purpose is to compile/test them in isolation to make sure they will work for
other users after publishing/exporting them.
bit capsule <sub-command>
Usage: capsule list
Description: list the capsules generated for this workspace
Option | Option alias | Description |
---|---|---|
--json | -j | json format |
Usage: capsule create [component-id...]
Description: create capsules for components
Option | Option alias | Description |
---|---|---|
--base-dir <name> | -b | set base dir of all capsules (hashed to create the base dir inside the root dir - host path by default) |
--root-base-dir <name> | -r | set root base dir of all capsules (absolute path to use as root dir) |
--always-new | -a | create new environment for capsule |
--seeders-only | -s | create capsules for the seeders only (not for the entire graph) |
--id <name> | -i | reuse capsule of certain name |
--json | -j | json format |
--install-packages | -d | install packages by the package-manager |
--package-manager <name> | -p | npm, yarn or pnpm, default to npm |
Usage: capsule delete
Description: delete capsules
with no args, only workspace's capsules are deleted
Option | Option alias | Description |
---|---|---|
--scope-aspects | delete scope-aspects capsules | |
--all | -a | delete all capsules for all workspaces and scopes |
Description: check typescript types
bit check-types [component-pattern]
Option | Option alias | Description |
---|---|---|
--all | -a | check-types for all components, not only modified and new |
--strict | in case issues found, exit with code 1 |
Alias: U
Description: switch between component versions or remove local changes
bit checkout <version> [component-pattern]
=> checkout the specified ids (or all components when --all is used) to the specified version
bit checkout head [component-pattern]
=> checkout to the last snap/tag, omit [component-pattern] to checkout head for all
bit checkout latest [component-pattern]
=> checkout to the latest satisfying semver tag, omit [component-pattern] to checkout latest for all
bit checkout reset [component-pattern]
=> remove local modifications from the specified ids (or all components when --all is used)
bit checkout <to> [component-pattern]
Option | Option alias | Description |
---|---|---|
--interactive-merge | -i | when a component is modified and the merge process found conflicts, display options to resolve them |
--ours | -o | in case of a conflict, override the used version with the current modification |
--theirs | -t | in case of a conflict, override the current modification with the specified version |
--manual | -m | in case of a conflict, leave the files with a conflict state to resolve them manually later |
--reset | -r | revert changes that were not snapped/tagged |
--all | -a | all components |
--entire-lane | -e | write also new components that were introduced on the remote lane and do not exist locally |
--verbose | -v | showing verbose output for inspection |
--reset | DEPRECATED. run "bit checkout reset" instead | |
--skip-npm-install | DEPRECATED. use "--skip-dependency-installation" instead | |
--skip-dependency-installation | -x | do not install packages of the imported components |
Alias: cc
Description: clears Bit's cache from current working machine
The following gets removed by this command:
- V8 compiled code (generated the first time Bit is loaded by v8-compile-cache package)
- components cache on the filesystem (mainly the dependencies graph and docs)
- scope's index file, which maps the component-id:object-hash
bit clear-cache
Option | Option alias | Description |
---|---|---|
--remote <remote-name> | -r | clear memory cache from a remote scope |
Description: EXPERIMENTAL. enters bit cli program and generates commands list
bit cli
Usage: cli generate
Description: EXPERIMENTAL. generate an .md file with all commands details
Option | Option alias | Description |
---|---|---|
--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 | |
--json | -j | output the commands info as JSON |
Description: compile components in the workspace
bit compile [component-names...]
Option | Option alias | Description |
---|---|---|
--changed | -c | compile only new and modified components |
--verbose | -v | show more data, such as, dist paths |
--json | -j | return the compile results in json format |
--delete-dist-dir | -d | delete existing dist folder before writing new compiled files |
Description: enable bash/zsh-completion shortcuts for commands and options
bit completion
Description: global config management
https://bit.dev/docs/config/bit-config
bit config
Usage: config set <key> <val>
Description: set a global configuration
Usage: config del <key>
Description: delete given key from global configuration
Usage: config get <key>
Description: get a global configuration
Usage: config list
Description: list all configuration(s)
Description: create a new component (source files and config) using a template.
bit create <template-name> <component-names...>
Option | Option alias | Description |
---|---|---|
--namespace <string> | -n | sets the component's namespace and nested dirs inside the scope |
--scope <string> | -s | sets the component's scope-name. if not entered, the default-scope will be used |
--aspect <string> | -a | aspect-id of the template. helpful when multiple aspects use the same template name |
--path <string> | -p | relative path in the workspace. by default the path is <scope>/<namespace>/<name> |
--env <string> | -e | set the component's environment. (overrides the env from variants and the template) |
Description: EXPERIMENTAL. show dependents of the given component
bit dependents <component-name>
Alias: d
Description: deprecate a component
bit deprecate <component-name>
Option | Option alias | Description |
---|---|---|
--new-id <string> | if replaced by another component, enter the new component id |
Alias: dependencies
Description: manage dependencies
bit deps <sub-command>
Usage: deps get <component-name>
Description: show direct and indirect dependencies of the given component
Option | Option alias | Description |
---|---|---|
--tree | -t | EXPERIMENTAL. render dependencies as a tree, similar to "npm ls" |
Usage: deps remove <component-pattern> <package...>
Description: remove a dependency to component(s)
Option | Option alias | Description |
---|---|---|
--dev | -d | remove from devDependencies |
--peer | -p | remove from peerDependencies |
Usage: deps unset <component-pattern> <package...>
Description: unset a dependency to component(s) that was previously set by "bit deps set"
Option | Option alias | Description |
---|---|---|
--dev | -d | unset from devDependencies |
--peer | -p | unset from peerDependencies |
Usage: deps debug <component-name>
Description: show the immediate dependencies and how their versions were determined
Usage: deps set <component-pattern> <package...>
Description: set a dependency to component(s)
Option | Option alias | Description |
---|---|---|
--dev | -d | add to the devDependencies |
--peer | -p | add to the peerDependencies |
Usage: deps reset <component-pattern>
Description: reset dependencies to the default values (revert any previously "bit deps set")
Usage: deps eject <component-pattern>
Description: write dependencies that were previously set via "bit deps set" into .bitmap
Usage: deps blame <component-name> <dependency-name>
Description: EXPERIMENTAL. find out which snap/tag changed a dependency version
Description: show the diff between the components' source files and config
bit diff => compare all modified components to their model version
bit diff [ids...] => compare the specified components against their modified states
bit diff [id][version] => compare the specified version to used or modified files
bit diff [id][version] [to_version] => compare the specified version files to to_version files
you can use a pattern for multiple ids, such as bit diff "utils/*". (wrap the pattern with quotes to avoid collision with shell commands)
bit diff [values...]
Option | Option alias | Description |
---|---|---|
--verbose | -v | show a more verbose output when possible |
--table | -t | show tables instead of plain text for dependencies diff |
Description: diagnose a bit workspace
bit doctor [diagnosis-name]
Option | Option alias | Description |
---|---|---|
--json | -j | return diagnoses in json format |
--list | list all available diagnoses | |
--save [filePath] | -s | save diagnoses to a file |
Alias: E
Description: replace components maintained in the workspace with their corresponding packages
bit eject <component-pattern>
Option | Option alias | Description |
---|---|---|
--force | -f | ignore local version. remove the components even when they are staged or modified |
--json | -j | print the results in JSON format |
--keep-files | keep the component files in the workspace intact |
Description: eject components configuration (create a component.json
file)
you can use a <pattern>
for multiple component ids, such as bit eject-conf "org.scope/utils/**"
.
use comma to separate patterns and "!" to exclude. e.g. "ui/**, !ui/button"
always wrap the pattern with quotes to avoid collision with shell commands.
use bit pattern --help
to understand patterns better and bit pattern <pattern>
to validate the pattern.
bit eject-conf <pattern>
Option | Option alias | Description |
---|---|---|
--propagate | -p | mark propagate true in the config file |
--override | -o | override file if exist |
Alias: env
Description: list all components maintained by the workspace and their corresponding envs
bit envs
Usage: envs list
Description: list all envs available in the workspace
Usage: envs get <component-name>
Description: show information about a component's env
Option | Option alias | Description |
---|---|---|
--services <string> | show information about the specific services only. for multiple services, separate by a comma and wrap with quotes |
Usage: envs set <component-pattern> <env>
Description: Sets one or more components with a development environment (env)
Usage: envs unset <component-pattern>
Description: un-sets an env from components that were previously set by "bit env set" or by a component template
keep in mind that this doesn't remove envs that are set in the variants.
in only removes envs that appear in the .bitmap file, which were previously configured via "bit env set".
the purpose of this command is to remove the specific settings and let the the variants in workspace.jsonc to control the env.
you can use a <pattern>
for multiple component ids, such as bit env unset "org.scope/utils/**"
.
use comma to separate patterns and "!" to exclude. e.g. "ui/**, !ui/button"
always wrap the pattern with quotes to avoid collision with shell commands.
use bit pattern --help
to understand patterns better and bit pattern <pattern>
to validate the pattern.
Usage: envs replace <current-env> <new-env>
Description: replace an existing env with another env for all components using the old env
Usage: envs update [env-id] [pattern]
Description: update a version of an env for all components using that env
Alias: e
Description: export components from the workspace to remote scopes
bit export => export all staged components to their current scope, if checked out to a lane, export the lane as well
bit export [id...]
=> export the given ids to their current scope
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)
bit export [component-patterns...]
Option | Option alias | Description |
---|---|---|
--eject | -e | replace the exported components with their corresponding packages (to use these components without further maintaining them) |
--all | -a | export all components, including non-staged (useful when components in the remote scope are corrupted or missing) |
--all-versions | export not only staged versions but all of them (useful when versions in the remote scope are corrupted or missing) | |
--origin-directly | EXPERIMENTAL. avoid export to the central hub, instead, export directly to the original scopes. not recommended! | |
--resume <string> | in case the previous export failed and suggested to resume with an export-id, enter the id | |
--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 | |
--json | -j | show output in json format |
Description: EXPERIMENTAL. create a new component out of an existing one (copies source files and config)
bit fork <source-component-id> [target-component-name]
Option | Option alias | Description |
---|---|---|
--scope <string> | -s | default scope for the new component |
--path <string> | -p | relative path in the workspace for the new component. by default the path is <scope>/<namespace>/<name> |
--refactor | -r | update the import/require statements in all dependent components (in the same workspace) |
--skip-dependency-installation | -x | do not install packages of the imported components |
--skip-config | do not copy the config (aspects-config) to the new component. helpful when it fails during aspect loading | |
--rename | rename files and variables/classes according to the new component name |
Description: format components in the development workspace
bit format [component...]
Option | Option alias | Description |
---|---|---|
--changed | -c | format only new and modified components |
--check | will output a human-friendly message and a list of unformatted files, if any | |
--json | -j | return the format results in json format |
Description: list all globals
bit globals
Option | Option alias | Description |
---|---|---|
--json | -j | json format |
Description: EXPERIMENTAL. generate an image file with the dependencies graph
bit graph [id]
Option | Option alias | Description |
---|---|---|
--image <image> | -i | image path. use one of the following extensions: [gif, png, svg, pdf] |
--remote [remoteName] | -r | remote name (name is optional, leave empty when id is specified) |
--all-versions | enter all components versions into the graph, not only latest | |
--layout <name> | GraphVis layout. default to "dot". options are [circo, dot, fdp, neato, osage, patchwork, sfdp, twopi] | |
--json | -j | json format |
Alias: $0
Description: shows help
bit help
Option | Option alias | Description |
---|---|---|
--internal | show internal commands |
Description: import components from their remote scopes to the local workspace
https://bit.dev/docs/components/importing-components
you can use a pattern for multiple ids, such as bit import "utils/*". (wrap the pattern with quotes to avoid collision with shell commands)
bit import [component-patterns...]
Option | Option alias | Description |
---|---|---|
--path <path> | -p | import components into a specific directory (a relative path in the workspace) |
--objects | -o | import components objects to the local scope without checkout (without writing them to the file system). This is a default behavior for import with no id argument |
--display-dependencies | -d | display the imported dependencies |
--override | -O | override local changes |
--verbose | -v | show verbose output for inspection |
--json | -j | return the output as JSON |
--skip-npm-install | DEPRECATED. use "--skip-dependency-installation" instead | |
--skip-dependency-installation | -x | do not install packages of the imported components |
--merge [strategy] | -m | merge local changes with the imported version. strategy should be "theirs", "ours" or "manual" |
--dependencies | EXPERIMENTAL. import all dependencies and write them to the workspace | |
--dependents | EXPERIMENTAL. import components found while traversing from the given ids upwards to the workspace components | |
--save-in-lane | EXPERIMENTAL. when checked out to a lane and the component is not on the remote-lane, save it in the lane (default to save on main) | |
--all-history | relevant for fetching all components objects. avoid optimizations, fetch all history versions, always | |
--fetch-deps | fetch dependencies objects | |
--track-only | do not write any file, just create .bitmap entries of the imported components |
Description: create or reinitialize an empty workspace
https://bit.dev/docs/workspace/creating-workspaces#initialize-a-workspace-on-an-existing-project
bit init [path]
Option | Option alias | Description |
---|---|---|
--bare [name] | -b | initialize an empty bit bare scope |
--shared <groupname> | -s | add group write permissions to a scope properly |
--standalone | -T | do not nest component store within .git directory and do not write config data inside package.json |
--reset | -r | write missing or damaged Bit files |
--reset-new | reset .bitmap file as if the components were newly added and remove all model data (objects) | |
--reset-hard | delete all Bit files and directories, including Bit configuration, tracking and model data. Useful for re-start using Bit from scratch | |
--reset-scope | removes local scope (.bit or .git/bit). snaps that were not exported will be lost. workspace left intact | |
--default-directory <default-directory> | -d | set up default directory to import components into |
--default-scope <default-scope> | set up default scope for all components in the workspace | |
--package-manager <package-manager> | -p | set up package manager (npm or yarn) |
--force | -f | force workspace initialization without clearing local objects |
--harmony | DEPRECATED. no need for this flag. Harmony is the default now | |
--interactive | -I | EXPERIMENTAL. start an interactive process |
Alias: in
Description: installs workspace dependencies
when no package is specified, all workspace dependencies are installed and all workspace components are imported.
bit install [packages...]
Option | Option alias | Description |
---|---|---|
--variants <variants> | -v | add packages to specific variants |
--type [lifecycleType] | -t | "runtime" (default) or "peer" (dev is not a valid option) |
--update | -u | update all dependencies |
--update-existing [updateExisting] | DEPRECATED (not needed anymore, it is the default now). update existing dependencies version and types | |
--save-prefix [savePrefix] | set the prefix to use when adding dependency to workspace.jsonc | |
--skip-dedupe [skipDedupe] | do not dedupe dependencies on installation | |
--skip-import [skipImport] | do not import bit objects post installation | |
--skip-compile [skipCompile] | do not compile components | |
--add-missing-peers [addMissingPeers] | install all missing peer dependencies | |
--no-optional [noOptional] | do not install optional dependencies (works with pnpm only) |
Description: create links in the node_modules directory, to core aspects and to components in the workspace
https://bit.dev/docs/workspace/component-links
bit link [component-names...]
Option | Option alias | Description |
---|---|---|
--json | -j | return the output as JSON |
--verbose | verbose output | |
--rewire | -r | Replace relative paths with module paths in code (e.g. "../foo" => "@bit/foo") |
--target <dir> | EXPERIMENTAL. link to an external directory (similar to npm-link) so other projects could use these components | |
--skip-fetching-objects | skip fetch missing objects from remotes before linking |
Description: lint components in the development workspace
bit lint [component...]
Option | Option alias | Description |
---|---|---|
--changed | -c | lint only new and modified components |
--fix | -f | automatically fix problems |
--fix-type <fixType> | specify the types of fixes to apply (problem, suggestion, layout) | |
--json | -j | return the lint results in json format |
Alias: ls
Description: list components on a workspace, local scope or a remote scope.
https://bit.dev/docs/reference/cli-reference#list
bit list [remote-scope]
Option | Option alias | Description |
---|---|---|
--ids | -i | show only component ids unformatted |
--scope | -s | show only components stored in the local scope, including indirect dependencies |
--outdated | -o | show latest versions from remotes |
--json | -j | show the output in JSON format |
--namespace <string> | -n | show only specified namespace by using wildcards |
Description: show components(s) version history
https://bit.dev/docs/reference/cli-reference#log
bit log <id>
Option | Option alias | Description |
---|---|---|
--remote | -r | show log of a remote component |
--parents | EXPERIMENTAL. show parents and lanes data | |
--one-line | -o | show each log entry in one line |
--json | -j | json format |
Description: EXPERIMENTAL. show file history
bit log-file <filepath>
Option | Option alias | Description |
---|---|---|
--one-line | -o | show each log entry in one line |
Description: log in to Bit cloud
bit login
Option | Option alias | Description |
---|---|---|
--port <port> | -p | port number to open for localhost server (default 8085) |
--suppress-browser-launch | do not open a browser for authentication | |
--npmrc-path <path> | path to npmrc file to configure bit.cloud registry | |
--skip-registry-config | don't configure bit.cloud registry | |
--machine-name <name> | specify machine-name to pair with the token (useful for CI to avoid accidentally revoke the token) |
Description: log the CLI out of Bit
bit logout
Description: merge changes of the remote head into local
merge changes of the remote head into local, optionally use '--abort' or '--resolve
you can use a pattern for multiple ids, such as bit merge "utils/*". (wrap the pattern with quotes to avoid collision with shell commands)
bit merge [ids...]
Option | Option alias | Description |
---|---|---|
--ours | in case of a conflict, override the used version with the current modification | |
--theirs | in case of a conflict, override the current modification with the specified version | |
--manual | in case of a conflict, leave the files with a conflict state to resolve them manually later | |
--abort | EXPERIMENTAL. in case of an unresolved merge, revert to the state before the merge began | |
--resolve | EXPERIMENTAL. mark an unresolved merge as resolved and create a new snap with the changes | |
--no-snap | EXPERIMENTAL. do not auto snap in case the merge completed without conflicts | |
--build | in case of snap during the merge, run the build-pipeline (similar to bit snap --build) | |
--verbose | show details of components that were not merged legitimately | |
--skip-dependency-installation | -x | do not install packages of the imported components |
--message <message> | -m | EXPERIMENTAL. override the default message for the auto snap |
Alias: mv
Description: move a component to a different filesystem path
move files or directories of component(s)
https://bit.dev/docs/workspace/moving-components
bit move <current-component-dir> <new-component-dir>
Description: create a new workspace from a template
bit new <template-name> <workspace-name>
Option | Option alias | Description |
---|---|---|
--aspect <aspect-id> | -a | aspect-id of the template. mandatory for non-core aspects. helpful for core aspects in case of a name collision |
--env <env-id> | env-id of the template | |
--default-scope <scope-name> | -d | set defaultScope in the new workspace.jsonc |
--standalone | DEPRECATED. use --skip-git instead | |
--skip-git | -s | skip generation of Git repository |
--empty | -e | empty workspace with no components (relevant for templates that add components by default) |
--load-from <path-to-template> | path to the workspace containing the template. helpful during a development of a workspace-template |
Description: list the component ids matching the given pattern
this command helps validating a pattern before using it in other commands.
a pattern can be a simple component-id or component-name. e.g. "ui/button".
a pattern can be used with wildcards for multiple component ids, e.g. "org.scope/utils/".
to enter multiple patterns, separate them by a comma, e.g. "ui/, lib/"
to exclude, use "!". e.g. "ui/, !ui/button"
always wrap the pattern with quotes to avoid collision with shell commands.
the matching algorithm is done by multimatch (@see https://github.com/sindresorhus/multimatch)
bit pattern <pattern>
Option | Option alias | Description |
---|---|---|
--json | -j | return the output as JSON |
Description: EXPERIMENTAL. source code refactoring / codemod
bit refactor <sub-command>
Usage: refactor dependency-name <old-id> <new-id>
Description: replace the dependency's old package-name with a new one in the code
the <old-id>
and <new-id>
arguments can be either a component-id or a package-name.
Description: manage set of tracked bit scope(s)
https://bit.dev/docs/scope/remote-scopes
bit remote
Usage: remote add <url>
Description: add a bare-scope as a remote
supported protocols are [file, http].
for example: "http://localhost:3000", "file:///tmp/local-scope"
Option | Option alias | Description |
---|---|---|
--global | -g | configure a remote bit scope |
Usage: remote del <name>
Description: remove a tracked bit remote
Option | Option alias | Description |
---|---|---|
--global | -g | remove a global configured remote scope |
Option | Option alias | Description |
---|---|---|
--global | -g | see globally configured remotes |
Alias: rm
Description: remove component(s) from the workspace, or a remote scope
bit remove <component-pattern>
Option | Option alias | Description |
---|---|---|
--soft | EXPERIMENTAL. mark the component as deleted. after tag/snap and export the remote will be updated | |
--remote | -r | remove a component completely from a remote scope (Careful! this is a permanent change. prefer --soft and tag+export) |
--from-lane | revert to main if exists on currently checked out lane, otherwise, remove it | |
--track | -t | keep tracking component in .bitmap (default = false), helps transform a tagged-component to new |
--delete-files | -d | DEPRECATED (this is now the default). delete local component files |
--keep-files | keep component files (just untrack the component) | |
--force | -f | removes the component from the scope, even if used as a dependency. WARNING: components that depend on this component will corrupt |
--silent | -s | skip confirmation |
Description: EXPERIMENTAL. rename component. if tagged/exported, create a new component and deprecate the original component
bit rename <current-name> <new-name>
Option | Option alias | Description |
---|---|---|
--scope <scope-name> | -s | default scope for the newly created component |
--path <relative-path> | -p | relative path in the workspace. by default the path is <scope>/<namespace>/<name> |
--refactor | -r | update the import/require statements in all dependent components (in the same workspace) |
Description: revert tagged or snapped versions for component(s)
https://bit.dev/docs/components/tags#undoing-a-tag
bit reset [component-pattern]
Option | Option alias | Description |
---|---|---|
--all | -a | revert tag/snap for all tagged/snapped components |
--head | revert the head tag/snap only (by default, all local tags/snaps are reverted) | |
--soft | revert only soft-tags (components tagged with --soft flag) | |
--force | -f | revert the tag even if used as a dependency. WARNING: components that depend on this tag will corrupt |
Alias: c
Description: run an app (independent of bit's dev server)
bit run <app-name>
Option | Option alias | Description |
---|---|---|
--dev | -d | start the application in dev mode. |
--verbose | -v | showing verbose output for inspection and prints stack trace |
--skip-watch | avoid running the watch process that compiles components in the background | |
--ssr | run app in server side rendering mode. |
Description: shows the API schema of a certain component.
you can use a <pattern>
for multiple component ids, such as bit schema "org.scope/utils/**"
.
use comma to separate patterns and "!" to exclude. e.g. "ui/**, !ui/button"
always wrap the pattern with quotes to avoid collision with shell commands.
use bit pattern --help
to understand patterns better and bit pattern <pattern>
to validate the pattern.
bit schema <pattern>
Option | Option alias | Description |
---|---|---|
--json | -j | return the component data in json format |
Description: EXPERIMENTAL. manage the scope-name for components
bit scope <sub-command>
Usage: scope set <scope-name> [component-pattern]
Description: Sets components with a default-scope. If no component is specified, sets the workspace with a default scope
default scopes for components are set in the bitmap file. the default scope for a workspace is set in the workspace.jsonc. a component is set with a scope (as oppose to default scope) only once it is versioned.'
you can use a <pattern>
for multiple component ids, such as bit scope set scope-name "org.scope/utils/**"
.
use comma to separate patterns and "!" to exclude. e.g. "ui/**, !ui/button"
always wrap the pattern with quotes to avoid collision with shell commands.
use bit pattern --help
to understand patterns better and bit pattern <pattern>
to validate the pattern.
Usage: scope rename <current-scope-name> <new-scope-name>
Description: Renames the scope name for all components with the specified 'current scope name'
Option | Option alias | Description |
---|---|---|
--refactor | -r | update the import statements in all dependent components to the new package name (that contains the new scope name) |
Usage: scope rename-owner <current-owner-name> <new-owner-name>
Description: Renames the owner part of the scope-name for all components with the specified 'current owner name'
Option | Option alias | Description |
---|---|---|
--refactor | -r | update the import statements in all dependent components to the new package name (that contains the new owner name) |
Usage: scope fork <original-scope> <new-scope>
Description: fork all components of the original-scope and refactor the source-code to use the new package names
Description: scope config management
bit scope-config
Usage: scope-config set <key> <val>
Description: set a scope configuration
Usage: scope-config del <key>
Description: delete given key from global configuration
Usage: scope-config get <key>
Description: get a scope configuration
Usage: scope-config list
Description: list all scope configuration(s)
Description: EXPERIMENTAL. communicate with bit cli program via http requests
bit server
Option | Option alias | Description |
---|---|---|
--port [port] | -p | port to run the server on |
Description: display the component's essential information
bit show <component-name>
Option | Option alias | Description |
---|---|---|
--json | -j | return the component data in a json format |
--legacy | -l | use the legacy bit show. |
--remote | -r | show a remote component |
--compare | -c | compare current file system component to the latest tagged component [default=latest]. only works in legacy. |
Description: EXPERIMENTAL. create an immutable and exportable component snapshot (no release version)
https://bit.dev/components/snaps
you can use a pattern for multiple ids, such as bit snap "utils/*". (wrap the pattern with quotes to avoid collision with shell commands)
bit snap [component-pattern]
Option | Option alias | Description |
---|---|---|
--message <message> | -m | log message describing the latest changes |
--unmodified | include unmodified components (by default, only new and modified components are snapped) | |
--unmerged | EXPERIMENTAL. complete a merge process by snapping the unmerged components | |
--build | -b | EXPERIMENTAL. not needed for now. run the build pipeline in case the feature-flag build-on-ci is enabled |
--editor [editor] | EXPERIMENTAL. open an editor to write a tag message for each component. optionally, specify the editor-name (defaults to vim). | |
--skip-tests | skip running component tests during snap process | |
--skip-auto-snap | skip auto snapping dependents | |
--disable-snap-pipeline | skip the snap pipeline | |
--force-deploy | run the deploy pipeline although the build failed | |
--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, CustomModuleResolutionUsed, MultipleEnvs, MissingLinksFromNodeModulesToSrc, CircularDependencies, DuplicateComponentAndPackage, MergeConfigHasConflict] to ignore multiple issues, separate them by a comma and wrap with quotes. to ignore all issues, specify "*". |
--all | -a | DEPRECATED (not needed anymore, it is the default now). snap all new and modified components |
--force | -f | DEPRECATED (use "--skip-tests" or "--unmodified" instead). force-snap even if tests are failing and even when component has not changed |
Alias: c
Description: run the ui/development server
bit start [type] [pattern]
Option | Option alias | Description |
---|---|---|
--dev | -d | start UI server in dev mode. |
--port [port-number] | -p | port of the UI server. |
--rebuild | -r | rebuild the UI |
--skip-ui-build | skip building UI | |
--verbose | -v | show verbose output for inspection and prints stack trace |
--no-browser | do not automatically open browser when ready | |
--skip-compilation | skip the auto-compilation before starting the web-server |
Alias: s
Description: present the current status of components in the workspace, and notifies when issues are detected
bit status
Option | Option alias | Description |
---|---|---|
--json | -j | return a json version of the component |
--verbose | show extra data: full snap hashes for staged and divergence point for lanes | |
--lanes | -l | when on a lane, show updates from main and updates from forked lanes |
--strict | in case issues found, exit with code 1 |
Alias: t
Description: create an immutable and exportable component snapshot, tagged with a release version.
if no patterns are provided, it will tag all new and modified components.
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
bit tag [component-patterns...]
Option | Option alias | Description |
---|---|---|
--message <message> | -m | a log message describing latest changes |
--unmodified | -u | include unmodified components (by default, only new and modified components are tagged) |
--editor [editor] | EXPERIMENTAL. open an editor to write a tag message for each component. optionally, specify the editor-name (defaults to vim). | |
--ver <version> | -v | tag with the given version |
--increment <level> | -l | options are: [major, premajor, minor, preminor, patch, prepatch, prerelease], default to patch |
--prerelease-id <id> | prerelease identifier (e.g. "dev" to get "1.0.0-dev.1") | |
--patch | -p | syntactic sugar for "--increment patch" |
--minor | syntactic sugar for "--increment minor" | |
--major | syntactic sugar for "--increment major" | |
--pre-release [identifier] | syntactic sugar for "--increment prerelease" and --prerelease-id <identifier> | |
--snapped | EXPERIMENTAL. tag components that their head is a snap (not a tag) | |
--unmerged | EXPERIMENTAL. complete a merge process by tagging the unmerged components | |
--skip-tests | skip running component tests during tag process | |
--skip-auto-tag | skip auto tagging dependents | |
--soft | do not persist. only keep note of the changes to be made | |
--persist | persist the changes generated by --soft tag | |
--disable-tag-pipeline | skip the tag pipeline to avoid publishing the components | |
--force-deploy | run the tag pipeline although the build failed | |
--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. | |
--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, CustomModuleResolutionUsed, MultipleEnvs, MissingLinksFromNodeModulesToSrc, CircularDependencies, DuplicateComponentAndPackage, MergeConfigHasConflict] to ignore multiple issues, separate them by a comma and wrap with quotes. to ignore all issues, specify "*". |
--ignore-newest-version | -I | ignore existing of newer versions (default = false) |
--build | -b | EXPERIMENTAL. not needed for now. run the pipeline build and complete the tag |
--all [version] | -a | DEPRECATED (not needed anymore, it is the default now). tag all new and modified components |
--scope [version] | -s | DEPRECATED (use "--unmodified" instead). tag all components of the current scope |
--force | -f | DEPRECATED (use "--skip-tests" or "--unmodified" instead). force-tag even if tests are failing and even when component has not changed |
--disable-deploy-pipeline | DEPRECATED. use --disable-tag-pipeline instead |
Description: list templates for "bit create" and "bit new"
list components templates when inside bit-workspace (for bit-create), otherwise, list workspace templates (for bit-new)
bit templates
Option | Option alias | Description |
---|---|---|
--show-all | -s | show hidden templates |
--aspect <aspect-id> | -a | show templates provided by the aspect-id |
Alias: at
Description: test components in the workspace
bit test [component-pattern]
Option | Option alias | Description |
---|---|---|
--watch | -w | start the tester in watch mode. |
--debug | -d | start the tester in debug mode. |
--all | -a | test all components, not only new and modified |
--junit <filepath> | write tests results as JUnit XML format into the specified file path | |
--coverage | show code coverage data | |
--env <id> | -e | test only the given env |
--scope <scope-name> | -s | DEPRECATED. (use the pattern instead, e.g. "scopeName/**"). name of the scope to test |
Description: undeprecate a deprecated component (local/remote)
bit undeprecate <id>
Alias: un
Description: uninstall dependencies
bit uninstall [packages...]
Alias: up
Description: update dependencies
bit update
Option | Option alias | Description |
---|---|---|
--yes | -y | automatically update all outdated packages |
Description: set aspects in the workspace/scope config to make them loadable by the workspace/scope
bit use <component-id>
Description: automatically recompile modified components (on save)
bit watch
Option | Option alias | Description |
---|---|---|
--verbose | -v | show npm verbose output for inspection and print the stack trace |
--skip-pre-compilation | skip the compilation step before starting to watch | |
--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 |
Description: EXPERIMENTAL. write tsconfig.json files in the component directories
bit write-tsconfig
Option | Option alias | Description |
---|---|---|
--clean | -c | delete tsconfig files from the workspace. highly recommended to run it with "--dry-run" first |
--silent | -s | do not prompt for confirmation |
--no-dedupe | write tsconfig.json inside each one of the component's dir, avoid deduping | |
--dry-run | show the paths that tsconfig will be written per env | |
--dry-run-with-tsconfig | use with --json flag. show the tsconfig.json content and the paths it will be written per env | |
--json | -j | json format |