CLI Reference
The listed commands have been organized into categories, with certain commands fitting into multiple categories.
- initCreate or reinitialize an empty workspace
- configGlobal config managementset·del·get·list
- remoteManage set of tracked bit scope(s)add·del
- dependentsShow dependents of the given component
- scope-configScope config managementset·del·get·list
- doctorDiagnose a bit workspace
- completionEnable bash/zsh-completion shortcuts for commands and options
- cliEXPERIMENTAL. enters bit cli program and generates commands listgenerate
- helpShows help
- versionShows bit version
- globalsList all globals
- systemSystem operationslog
- showDisplay the component's essential information
- envsList all components maintained by the workspace and their corresponding envslist·get·set·unset·replace·update
- startRun the ui/development server
- graphGenerate an image file with the workspace components' dependencies graph
- scopeManage the scope-name for componentsset·rename·rename-owner·fork
- eject-confEject components configuration (create a `component.json` file)
- capsuleManage capsuleslist·create·delete
- useSet aspects in the workspace/scope config to make them loadable by the workspace/scope
- patternList the component ids matching the given pattern
- gitPerform git operationsset-merge-driver·merge-bitmaps
- depsManage dependenciesget·remove·unset·debug·set·reset·eject·blame·usage
- whyEXPERIMENTAL. find components that use the specified dependency
- ws-configManage workspace config fileswrite·clean·list
- addAdd any subset of files to be tracked as a component(s).
- createCreate a new component (source files and config) using a template.
- templatesList available templates for "bit create" and "bit new"
- newCreate a new workspace from a template
- watchAutomatically recompile modified components (on save)
- buildRun set of tasks for build.
- artifactsList and download component artifacts
- runLocally run an app component (independent of bit's dev server)
- appManages appslist·run
- compileCompile components in the workspace
- installInstalls workspace dependencies
- uninstallUninstall dependencies
- updateUpdate dependencies. By default, dependencies are updated to the highest semver compatible versions.
- linkCreate links in the node_modules directory, to core aspects and to components in the workspace
- moveMove a component to a different filesystem path (note: this does NOT affect the component's name or scope, just its location in the workspace)
- importImport components from their remote scopes to the local workspace
- ejectRemove component from the workspace and install it instead as a regular npm package.
- removeRemove component(s) from the local workspace
- deleteMark components as deleted on the remote
- recoverEXPERIMENTAL. recover component(s) soft-deleted from the workspace, or a remote scope
- exportExport components from the workspace to remote scopes
- tagCreate an immutable and exportable component snapshot, tagged with a release version.
- snapCreate an immutable and exportable component snapshot (non-release version)
- resetRevert tagged or snapped versions for component(s)
- checkoutSwitch between component versions or remove local changes
- revertReplace the current component files by the specified version, leave the version intact
- testTest components in the workspace. by default only runs tests for new and modified components
- diffShow the diff between the components' current source files and config, and their latest snapshot or tag
- logShow components(s) version history
- log-fileEXPERIMENTAL. show file history
- mergeMerge changes of the remote head into local - auto-snaps all merged components
- laneManage lanes - if no sub-command is used, runs "bit lane list"list·switch·show·create·remove·change-scope·alias·rename·diff·add-readme·remove-readme·import·remove-comp·merge·merge-abort
- serverEXPERIMENTAL. communicate with bit cli program via http requests
- listList components on a workspace or a remote scope (with flag).
- refactorSource code refactoring / codemoddependency-name
- loginLog in to Bit cloud
- logoutLog the CLI out of Bit
- whoamiDisplay the currently logged in user
- statusPresent the current status of components in the workspace, including indication of detected issues
- mini-statusEXPERIMENTAL. basic status for fast execution
- clear-cacheClears Bit's cache from current working machine
- deprecateDeprecate a component
- undeprecateUndeprecate a deprecated component (local/remote)
- renameRename component. if tagged/exported, create a new component and deprecate the original component. otherwise just renames current component
- forkCreate a new component forked from an existing one (copies source files and configs)
- schemaShows the API schema of the specified component/s.
- check-typesCheck typescript types
- aspectManage aspectslist·get·set·unset·update
- formatFormat components in the development workspace
- lintLint components in the development workspace