CLI Reference

Run the following to list all available Bit commands (alternatively, use the -h alias, instead of --help):

bit --help
CopiedCopy

Run the following to get help on a specific command:

bit COMMAND --help
CopiedCopy

Run the following to get help on a specific sub-command:

bit COMMAND SUB_COMMAND --help
CopiedCopy

add

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...]

OptionOption aliasDescription
--id <name>-imanually set component id
--main <file>-mdefine entry point for the components
--namespace <namespace>-norganize component in a namespace
--override <boolean>-ooverride existing component if exists (default = false)
--scope <string>-ssets the component's scope-name. if not entered, the default-scope will be used

app

Description: Manages apps

bit app <sub-command>

app list

Usage: app list

Description: list all registered apps

OptionOption aliasDescription
--json-jreturn the component data in json format

app run

Usage: app run <app-name>

Description: run an app (independent of bit's dev server)

OptionOption aliasDescription
--dev-dstart the application in dev mode.
--verbose-vshowing verbose output for inspection and prints stack trace
--skip-watchavoid running the watch process that compiles components in the background
--ssrrun app in server side rendering mode.

artifacts

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>

OptionOption aliasDescription
--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

aspect

Description: EXPERIMENTAL. manage aspects

bit aspect <sub-command>

aspect list

Usage: aspect list [pattern]

Description: list all aspects configured on component(s)

OptionOption aliasDescription
--debug-dshow the origins were the aspects were taken from

aspect get

Usage: aspect get <component-name>

Description: list the aspects set on a component, as well as their config and data

OptionOption aliasDescription
--debug-dshow the origins were the aspects were taken from
--json-jformat as json

aspect set

Usage: aspect set <pattern> <aspect-id> [config]

Description: set components with an aspect to extend their development tools, metadata and (possibly) artifacts

OptionOption aliasDescription
--merge-mmerge with an existing config if exits. (by default, it replaces the config)

aspect unset

Usage: aspect unset <pattern> <aspect-id>

Description: unset an aspect from component(s).

aspect update

Usage: aspect update <aspect-id> [pattern]

Description: update a version of an aspect


build

Description: run set of tasks for build

bit build [component-pattern]

OptionOption aliasDescription
--all-aDEPRECATED. use --unmodified
--unmodified-uinclude unmodified components (by default, only new and modified components are built)
--dev-drun the pipeline in dev mode
--installinstall core aspects in capsules
--reuse-capsulesavoid 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-rootset 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-testsskip running component tests during tag process

capsule

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>

capsule list

Usage: capsule list

Description: list the capsules generated for this workspace

OptionOption aliasDescription
--json-jjson format

capsule create

Usage: capsule create [component-id...]

Description: create capsules for components

OptionOption aliasDescription
--base-dir <name>-bset base dir of all capsules (hashed to create the base dir inside the root dir - host path by default)
--root-base-dir <name>-rset root base dir of all capsules (absolute path to use as root dir)
--always-new-acreate new environment for capsule
--seeders-only-screate capsules for the seeders only (not for the entire graph)
--id <name>-ireuse capsule of certain name
--json-jjson format
--install-packages-dinstall packages by the package-manager
--package-manager <name>-pnpm, yarn or pnpm, default to npm

capsule delete

Usage: capsule delete

Description: delete capsules
with no args, only workspace's capsules are deleted

OptionOption aliasDescription
--scope-aspectsdelete scope-aspects capsules
--all-adelete all capsules for all workspaces and scopes

check-types

Description: check typescript types

bit check-types [component-pattern]

OptionOption aliasDescription
--all-acheck-types for all components, not only modified and new
--strictin case issues found, exit with code 1

checkout

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]

OptionOption aliasDescription
--interactive-merge-iwhen a component is modified and the merge process found conflicts, display options to resolve them
--ours-oin case of a conflict, override the used version with the current modification
--theirs-tin case of a conflict, override the current modification with the specified version
--manual-min case of a conflict, leave the files with a conflict state to resolve them manually later
--reset-rrevert changes that were not snapped/tagged
--all-aall components
--entire-lane-ewrite also new components that were introduced on the remote lane and do not exist locally
--verbose-vshowing verbose output for inspection
--resetDEPRECATED. run "bit checkout reset" instead
--skip-npm-installDEPRECATED. use "--skip-dependency-installation" instead
--skip-dependency-installation-xdo not install packages of the imported components

clear-cache

Alias: cc
Description: clears Bit's cache from current working machine
The following gets removed by this command:

  1. V8 compiled code (generated the first time Bit is loaded by v8-compile-cache package)
  2. components cache on the filesystem (mainly the dependencies graph and docs)
  3. scope's index file, which maps the component-id:object-hash

bit clear-cache

OptionOption aliasDescription
--remote <remote-name>-rclear memory cache from a remote scope

cli

Description: EXPERIMENTAL. enters bit cli program and generates commands list

bit cli

cli generate

Usage: cli generate

Description: EXPERIMENTAL. generate an .md file with all commands details

OptionOption aliasDescription
--metadatametadata/front-matter to place at the top of the .md file, enter as an object e.g. --metadata.id=cli --metadata.title=commands
--json-joutput the commands info as JSON

compile

Description: compile components in the workspace

bit compile [component-names...]

OptionOption aliasDescription
--changed-ccompile only new and modified components
--verbose-vshow more data, such as, dist paths
--json-jreturn the compile results in json format
--delete-dist-dir-ddelete existing dist folder before writing new compiled files

completion

Description: enable bash/zsh-completion shortcuts for commands and options

bit completion


config

Description: global config management
https://bit.dev/docs/config/bit-config

bit config

config set

Usage: config set <key> <val>

Description: set a global configuration

config del

Usage: config del <key>

Description: delete given key from global configuration

config get

Usage: config get <key>

Description: get a global configuration

config list

Usage: config list

Description: list all configuration(s)


create

Description: create a new component (source files and config) using a template.

bit create <template-name> <component-names...>

OptionOption aliasDescription
--namespace <string>-nsets the component's namespace and nested dirs inside the scope
--scope <string>-ssets the component's scope-name. if not entered, the default-scope will be used
--aspect <string>-aaspect-id of the template. helpful when multiple aspects use the same template name
--path <string>-prelative path in the workspace. by default the path is <scope>/<namespace>/<name>
--env <string>-eset the component's environment. (overrides the env from variants and the template)

dependents

Description: EXPERIMENTAL. show dependents of the given component

bit dependents <component-name>


deprecate

Alias: d
Description: deprecate a component

bit deprecate <component-name>

OptionOption aliasDescription
--new-id <string>if replaced by another component, enter the new component id

deps

Alias: dependencies
Description: manage dependencies

bit deps <sub-command>

deps get

Usage: deps get <component-name>

Description: show direct and indirect dependencies of the given component

OptionOption aliasDescription
--tree-tEXPERIMENTAL. render dependencies as a tree, similar to "npm ls"

deps remove

Usage: deps remove <component-pattern> <package...>

Description: remove a dependency to component(s)

OptionOption aliasDescription
--dev-dremove from devDependencies
--peer-premove from peerDependencies

deps unset

Usage: deps unset <component-pattern> <package...>

Description: unset a dependency to component(s) that was previously set by "bit deps set"

OptionOption aliasDescription
--dev-dunset from devDependencies
--peer-punset from peerDependencies

deps debug

Usage: deps debug <component-name>

Description: show the immediate dependencies and how their versions were determined

deps set

Usage: deps set <component-pattern> <package...>

Description: set a dependency to component(s)

OptionOption aliasDescription
--dev-dadd to the devDependencies
--peer-padd to the peerDependencies

deps reset

Usage: deps reset <component-pattern>

Description: reset dependencies to the default values (revert any previously "bit deps set")

deps eject

Usage: deps eject <component-pattern>

Description: write dependencies that were previously set via "bit deps set" into .bitmap

deps blame

Usage: deps blame <component-name> <dependency-name>

Description: EXPERIMENTAL. find out which snap/tag changed a dependency version


diff

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...]

OptionOption aliasDescription
--verbose-vshow a more verbose output when possible
--table-tshow tables instead of plain text for dependencies diff

doctor

Description: diagnose a bit workspace

bit doctor [diagnosis-name]

OptionOption aliasDescription
--json-jreturn diagnoses in json format
--listlist all available diagnoses
--save [filePath]-ssave diagnoses to a file

eject

Alias: E
Description: replace components maintained in the workspace with their corresponding packages

bit eject <component-pattern>

OptionOption aliasDescription
--force-fignore local version. remove the components even when they are staged or modified
--json-jprint the results in JSON format
--keep-fileskeep the component files in the workspace intact

eject-conf

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>

OptionOption aliasDescription
--propagate-pmark propagate true in the config file
--override-ooverride file if exist

envs

Alias: env
Description: list all components maintained by the workspace and their corresponding envs

bit envs

envs list

Usage: envs list

Description: list all envs available in the workspace

envs get

Usage: envs get <component-name>

Description: show information about a component's env

OptionOption aliasDescription
--services <string>show information about the specific services only. for multiple services, separate by a comma and wrap with quotes

envs set

Usage: envs set <component-pattern> <env>

Description: Sets one or more components with a development environment (env)

envs unset

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.

envs replace

Usage: envs replace <current-env> <new-env>

Description: replace an existing env with another env for all components using the old env

envs update

Usage: envs update [env-id] [pattern]

Description: update a version of an env for all components using that env


export

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...]

OptionOption aliasDescription
--eject-ereplace the exported components with their corresponding packages (to use these components without further maintaining them)
--all-aexport all components, including non-staged (useful when components in the remote scope are corrupted or missing)
--all-versionsexport not only staged versions but all of them (useful when versions in the remote scope are corrupted or missing)
--origin-directlyEXPERIMENTAL. 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-artifactsEXPERIMENTAL. don't throw an error when artifact files are missing. not recommended, unless you're sure the artifacts are in the remote
--json-jshow output in json format

fork

Description: EXPERIMENTAL. create a new component out of an existing one (copies source files and config)

bit fork <source-component-id> [target-component-name]

OptionOption aliasDescription
--scope <string>-sdefault scope for the new component
--path <string>-prelative path in the workspace for the new component. by default the path is <scope>/<namespace>/<name>
--refactor-rupdate the import/require statements in all dependent components (in the same workspace)
--skip-dependency-installation-xdo not install packages of the imported components
--skip-configdo not copy the config (aspects-config) to the new component. helpful when it fails during aspect loading
--renamerename files and variables/classes according to the new component name

format

Description: format components in the development workspace

bit format [component...]

OptionOption aliasDescription
--changed-cformat only new and modified components
--checkwill output a human-friendly message and a list of unformatted files, if any
--json-jreturn the format results in json format

globals

Description: list all globals

bit globals

OptionOption aliasDescription
--json-jjson format

graph

Description: EXPERIMENTAL. generate an image file with the dependencies graph

bit graph [id]

OptionOption aliasDescription
--image <image>-iimage path. use one of the following extensions: [gif, png, svg, pdf]
--remote [remoteName]-rremote name (name is optional, leave empty when id is specified)
--all-versionsenter 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-jjson format

help

Alias: $0
Description: shows help

bit help

OptionOption aliasDescription
--internalshow internal commands

import

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...]

OptionOption aliasDescription
--path <path>-pimport components into a specific directory (a relative path in the workspace)
--objects-oimport 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-ddisplay the imported dependencies
--override-Ooverride local changes
--verbose-vshow verbose output for inspection
--json-jreturn the output as JSON
--skip-npm-installDEPRECATED. use "--skip-dependency-installation" instead
--skip-dependency-installation-xdo not install packages of the imported components
--merge [strategy]-mmerge local changes with the imported version. strategy should be "theirs", "ours" or "manual"
--dependenciesEXPERIMENTAL. import all dependencies and write them to the workspace
--dependentsEXPERIMENTAL. import components found while traversing from the given ids upwards to the workspace components
--save-in-laneEXPERIMENTAL. 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-historyrelevant for fetching all components objects. avoid optimizations, fetch all history versions, always
--fetch-depsfetch dependencies objects
--track-onlydo not write any file, just create .bitmap entries of the imported components

init

Description: create or reinitialize an empty workspace
https://bit.dev/docs/workspace/creating-workspaces#initialize-a-workspace-on-an-existing-project

bit init [path]

OptionOption aliasDescription
--bare [name]-binitialize an empty bit bare scope
--shared <groupname>-sadd group write permissions to a scope properly
--standalone-Tdo not nest component store within .git directory and do not write config data inside package.json
--reset-rwrite missing or damaged Bit files
--reset-newreset .bitmap file as if the components were newly added and remove all model data (objects)
--reset-harddelete all Bit files and directories, including Bit configuration, tracking and model data. Useful for re-start using Bit from scratch
--reset-scoperemoves local scope (.bit or .git/bit). snaps that were not exported will be lost. workspace left intact
--default-directory <default-directory>-dset 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>-pset up package manager (npm or yarn)
--force-fforce workspace initialization without clearing local objects
--harmonyDEPRECATED. no need for this flag. Harmony is the default now
--interactive-IEXPERIMENTAL. start an interactive process

install

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...]

OptionOption aliasDescription
--variants <variants>-vadd packages to specific variants
--type [lifecycleType]-t"runtime" (default) or "peer" (dev is not a valid option)
--update-uupdate 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...]

OptionOption aliasDescription
--json-jreturn the output as JSON
--verboseverbose output
--rewire-rReplace 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-objectsskip fetch missing objects from remotes before linking

lint

Description: lint components in the development workspace

bit lint [component...]

OptionOption aliasDescription
--changed-clint only new and modified components
--fix-fautomatically fix problems
--fix-type <fixType>specify the types of fixes to apply (problem, suggestion, layout)
--json-jreturn the lint results in json format

list

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]

OptionOption aliasDescription
--ids-ishow only component ids unformatted
--scope-sshow only components stored in the local scope, including indirect dependencies
--outdated-oshow latest versions from remotes
--json-jshow the output in JSON format
--namespace <string>-nshow only specified namespace by using wildcards

log

Description: show components(s) version history
https://bit.dev/docs/reference/cli-reference#log

bit log <id>

OptionOption aliasDescription
--remote-rshow log of a remote component
--parentsEXPERIMENTAL. show parents and lanes data
--one-line-oshow each log entry in one line
--json-jjson format

log-file

Description: EXPERIMENTAL. show file history

bit log-file <filepath>

OptionOption aliasDescription
--one-line-oshow each log entry in one line

login

Description: log in to Bit cloud

bit login

OptionOption aliasDescription
--port <port>-pport number to open for localhost server (default 8085)
--suppress-browser-launchdo not open a browser for authentication
--npmrc-path <path>path to npmrc file to configure bit.cloud registry
--skip-registry-configdon'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)

logout

Description: log the CLI out of Bit

bit logout


merge

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...]

OptionOption aliasDescription
--oursin case of a conflict, override the used version with the current modification
--theirsin case of a conflict, override the current modification with the specified version
--manualin case of a conflict, leave the files with a conflict state to resolve them manually later
--abortEXPERIMENTAL. in case of an unresolved merge, revert to the state before the merge began
--resolveEXPERIMENTAL. mark an unresolved merge as resolved and create a new snap with the changes
--no-snapEXPERIMENTAL. do not auto snap in case the merge completed without conflicts
--buildin case of snap during the merge, run the build-pipeline (similar to bit snap --build)
--verboseshow details of components that were not merged legitimately
--skip-dependency-installation-xdo not install packages of the imported components
--message <message>-mEXPERIMENTAL. override the default message for the auto snap

move

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>


new

Description: create a new workspace from a template

bit new <template-name> <workspace-name>

OptionOption aliasDescription
--aspect <aspect-id>-aaspect-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>-dset defaultScope in the new workspace.jsonc
--standaloneDEPRECATED. use --skip-git instead
--skip-git-sskip generation of Git repository
--empty-eempty 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

pattern

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>

OptionOption aliasDescription
--json-jreturn the output as JSON

refactor

Description: EXPERIMENTAL. source code refactoring / codemod

bit refactor <sub-command>

refactor dependency-name

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.


remote

Description: manage set of tracked bit scope(s)
https://bit.dev/docs/scope/remote-scopes

bit remote

remote add

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"

OptionOption aliasDescription
--global-gconfigure a remote bit scope

remote del

Usage: remote del <name>

Description: remove a tracked bit remote

OptionOption aliasDescription
--global-gremove a global configured remote scope
OptionOption aliasDescription
--global-gsee globally configured remotes

remove

Alias: rm
Description: remove component(s) from the workspace, or a remote scope

bit remove <component-pattern>

OptionOption aliasDescription
--softEXPERIMENTAL. mark the component as deleted. after tag/snap and export the remote will be updated
--remote-rremove a component completely from a remote scope (Careful! this is a permanent change. prefer --soft and tag+export)
--from-lanerevert to main if exists on currently checked out lane, otherwise, remove it
--track-tkeep tracking component in .bitmap (default = false), helps transform a tagged-component to new
--delete-files-dDEPRECATED (this is now the default). delete local component files
--keep-fileskeep component files (just untrack the component)
--force-fremoves the component from the scope, even if used as a dependency. WARNING: components that depend on this component will corrupt
--silent-sskip confirmation

rename

Description: EXPERIMENTAL. rename component. if tagged/exported, create a new component and deprecate the original component

bit rename <current-name> <new-name>

OptionOption aliasDescription
--scope <scope-name>-sdefault scope for the newly created component
--path <relative-path>-prelative path in the workspace. by default the path is <scope>/<namespace>/<name>
--refactor-rupdate the import/require statements in all dependent components (in the same workspace)

reset

Description: revert tagged or snapped versions for component(s)
https://bit.dev/docs/components/tags#undoing-a-tag

bit reset [component-pattern]

OptionOption aliasDescription
--all-arevert tag/snap for all tagged/snapped components
--headrevert the head tag/snap only (by default, all local tags/snaps are reverted)
--softrevert only soft-tags (components tagged with --soft flag)
--force-frevert the tag even if used as a dependency. WARNING: components that depend on this tag will corrupt

run

Alias: c
Description: run an app (independent of bit's dev server)

bit run <app-name>

OptionOption aliasDescription
--dev-dstart the application in dev mode.
--verbose-vshowing verbose output for inspection and prints stack trace
--skip-watchavoid running the watch process that compiles components in the background
--ssrrun app in server side rendering mode.

schema

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>

OptionOption aliasDescription
--json-jreturn the component data in json format

scope

Description: EXPERIMENTAL. manage the scope-name for components

bit scope <sub-command>

scope set

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.

scope rename

Usage: scope rename <current-scope-name> <new-scope-name>

Description: Renames the scope name for all components with the specified 'current scope name'

OptionOption aliasDescription
--refactor-rupdate the import statements in all dependent components to the new package name (that contains the new scope name)

scope rename-owner

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'

OptionOption aliasDescription
--refactor-rupdate the import statements in all dependent components to the new package name (that contains the new owner name)

scope fork

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


scope-config

Description: scope config management

bit scope-config

scope-config set

Usage: scope-config set <key> <val>

Description: set a scope configuration

scope-config del

Usage: scope-config del <key>

Description: delete given key from global configuration

scope-config get

Usage: scope-config get <key>

Description: get a scope configuration

scope-config list

Usage: scope-config list

Description: list all scope configuration(s)


server

Description: EXPERIMENTAL. communicate with bit cli program via http requests

bit server

OptionOption aliasDescription
--port [port]-pport to run the server on

show

Description: display the component's essential information

bit show <component-name>

OptionOption aliasDescription
--json-jreturn the component data in a json format
--legacy-luse the legacy bit show.
--remote-rshow a remote component
--compare-ccompare current file system component to the latest tagged component [default=latest]. only works in legacy.

snap

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]

OptionOption aliasDescription
--message <message>-mlog message describing the latest changes
--unmodifiedinclude unmodified components (by default, only new and modified components are snapped)
--unmergedEXPERIMENTAL. complete a merge process by snapping the unmerged components
--build-bEXPERIMENTAL. 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-testsskip running component tests during snap process
--skip-auto-snapskip auto snapping dependents
--disable-snap-pipelineskip the snap pipeline
--force-deployrun the deploy pipeline although the build failed
--ignore-issues [issues]-iignore 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-aDEPRECATED (not needed anymore, it is the default now). snap all new and modified components
--force-fDEPRECATED (use "--skip-tests" or "--unmodified" instead). force-snap even if tests are failing and even when component has not changed

start

Alias: c
Description: run the ui/development server

bit start [type] [pattern]

OptionOption aliasDescription
--dev-dstart UI server in dev mode.
--port [port-number]-pport of the UI server.
--rebuild-rrebuild the UI
--skip-ui-buildskip building UI
--verbose-vshow verbose output for inspection and prints stack trace
--no-browserdo not automatically open browser when ready
--skip-compilationskip the auto-compilation before starting the web-server

status

Alias: s
Description: present the current status of components in the workspace, and notifies when issues are detected

bit status

OptionOption aliasDescription
--json-jreturn a json version of the component
--verboseshow extra data: full snap hashes for staged and divergence point for lanes
--lanes-lwhen on a lane, show updates from main and updates from forked lanes
--strictin case issues found, exit with code 1

tag

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...]

OptionOption aliasDescription
--message <message>-ma log message describing latest changes
--unmodified-uinclude 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>-vtag with the given version
--increment <level>-loptions 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-psyntactic sugar for "--increment patch"
--minorsyntactic sugar for "--increment minor"
--majorsyntactic sugar for "--increment major"
--pre-release [identifier]syntactic sugar for "--increment prerelease" and --prerelease-id <identifier>
--snappedEXPERIMENTAL. tag components that their head is a snap (not a tag)
--unmergedEXPERIMENTAL. complete a merge process by tagging the unmerged components
--skip-testsskip running component tests during tag process
--skip-auto-tagskip auto tagging dependents
--softdo not persist. only keep note of the changes to be made
--persistpersist the changes generated by --soft tag
--disable-tag-pipelineskip the tag pipeline to avoid publishing the components
--force-deployrun 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]-iignore 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-Iignore existing of newer versions (default = false)
--build-bEXPERIMENTAL. not needed for now. run the pipeline build and complete the tag
--all [version]-aDEPRECATED (not needed anymore, it is the default now). tag all new and modified components
--scope [version]-sDEPRECATED (use "--unmodified" instead). tag all components of the current scope
--force-fDEPRECATED (use "--skip-tests" or "--unmodified" instead). force-tag even if tests are failing and even when component has not changed
--disable-deploy-pipelineDEPRECATED. use --disable-tag-pipeline instead

templates

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

OptionOption aliasDescription
--show-all-sshow hidden templates
--aspect <aspect-id>-ashow templates provided by the aspect-id

test

Alias: at
Description: test components in the workspace

bit test [component-pattern]

OptionOption aliasDescription
--watch-wstart the tester in watch mode.
--debug-dstart the tester in debug mode.
--all-atest all components, not only new and modified
--junit <filepath>write tests results as JUnit XML format into the specified file path
--coverageshow code coverage data
--env <id>-etest only the given env
--scope <scope-name>-sDEPRECATED. (use the pattern instead, e.g. "scopeName/**"). name of the scope to test

undeprecate

Description: undeprecate a deprecated component (local/remote)

bit undeprecate <id>


uninstall

Alias: un
Description: uninstall dependencies

bit uninstall [packages...]


update

Alias: up
Description: update dependencies

bit update

OptionOption aliasDescription
--yes-yautomatically update all outdated packages

use

Description: set aspects in the workspace/scope config to make them loadable by the workspace/scope

bit use <component-id>


watch

Description: automatically recompile modified components (on save)

bit watch

OptionOption aliasDescription
--verbose-vshow npm verbose output for inspection and print the stack trace
--skip-pre-compilationskip the compilation step before starting to watch
--check-types [string]-tEXPERIMENTAL. show errors/warnings for types. options are [file, project] to investigate only changed file or entire project. defaults to project

write-tsconfig

Description: EXPERIMENTAL. write tsconfig.json files in the component directories

bit write-tsconfig

OptionOption aliasDescription
--clean-cdelete tsconfig files from the workspace. highly recommended to run it with "--dry-run" first
--silent-sdo not prompt for confirmation
--no-dedupewrite tsconfig.json inside each one of the component's dir, avoid deduping
--dry-runshow the paths that tsconfig will be written per env
--dry-run-with-tsconfiguse with --json flag. show the tsconfig.json content and the paths it will be written per env
--json-jjson format