Commands
Help#
Get information about available CLI commands#
bit --helpGet information about a specific CLI command#
bit <command> --helpWorkspace#
Initialize a new workspace#
Initialize a Bit Harmony workspace and then manually configure the environment and install any peer dependencies needed.
bit init --harmonyOnce installed you should get the following message:
successfully initialized a bit workspace.Start Bit development server / Run the Workspace UI#
bit startGet workspace status#
bit statusReset the workspace - hard#
Deletes all Bit files and directories, including Bit configuration, tracking and locally stored component release versions.
bit init --reset-hardReset the workspace - soft#
Removes all locally stored component release versions.
Reset the workspace .bitmap file and register components as if they were newly added.
bit init --reset-newComponent workflow#
Create a Component#
bit create react-component <my-component> --namespace <namespace>See Available Templates#
bit templatesTrack a component#
To add pre-existing components not created with the bit create command.
bit add <path/to/component>Track a component and set it with a namespace#
bit add <path/to/component> --namespace <namespace>Alias: -n
Untrack a component#
bit untrack <component-id>Get component configuration details#
That includes its dependencies, package name, environment, etc.
bit show <component-id>Version (tag) a component#
bit tag <component-id> <new-version-number>- Optional:
--message "a note about recent changes"
Untag a component#
bit untag <component-id>Untag all components#
bit untag --allExport components#
bit exportDependencies#
Install a package#
bit install <package-name>Install all dependencies after cloning a workspace#
This process will install all packages, import all components and link the imported components.
bit installImport a component#
Import a component from a remote scope.
bit import <component-id>Import all components#
Import all components listed in the workspace .bitmap file.
bit importList all dependencies of a component and the reason for each dependency version#
EXPERIMENTAL
bit dependencies <component-id>Component development#
Compile a component#
bit compile <component-id>Compile all components#
bit compileCompile all components that were modified since their last compilation#
bit compile --changedBuild a component#
bit build <component-id>Build all components#
bit buildTest components#
bit testMove or remove components#
Move component to a different directory#
bit mv <component> <target-dir>Relink components to the workspace#
'link' generates symlinks for components in the workspace node_modules directory.
The linking process happens automatically when a component is tracked.
There could be cases where the path to a component has been modified and that process needs to be re-run with to address recent changes.
bit linkRemove a component from the workspace#
bit remove <component-id>Deprecating a component in a workspace#
bit deprecate <component-id>Remove a component from a remote scope#
bit remove <component-id> --remoteDeprecate a component in a remote scope#
bit deprecate <component-id> --remoteOther#
Eject component configurations#
Create a component.json file in the component's directory, to directly configure it. Learn more here.
bit eject-conf <component>