Import components from their remote scopes to the local workspace
$bit import [component-patterns...]
Copiedcopy

Arguments

ArgumentDescriptionRequired
component-patterns...component IDs or component patterns (separated by space). Use patterns to import groups of components using a common scope or namespace. E.g., "utils/*" (wrap with double quotes)

Options

OptionOption AliasDescriptionValue Type
--path-pimport components into a specific directory (a relative path in the workspace)string
--objects-oimport components objects to the local scope without checkout (without writing them to the file system). This is the default behavior for import with no id argumentboolean
--override-Ooverride local changesboolean
--verbose-vshow verbose output for inspectionboolean
--json-jreturn the output as JSONboolean
--skip-dependency-installation-xdo not auto-install dependencies of the imported componentsboolean
--skip-write-config-files-do not write config files (such as eslint, tsconfig, prettier, etc...)boolean
--merge-mmerge local changes with the imported version. strategy should be "theirs", "ours" or "manual"string
--dependencies-import all dependencies (bit components only) of imported components and write them to the workspaceboolean
--dependencies-head-same as --dependencies, except it imports the dependencies with their head versionboolean
--dependents-import components found while traversing from the imported components upwards to the workspace componentsboolean
--dependents-via-same as --dependents except the traversal must go through the specified component. to specify multiple components, wrap with quotes and separate by a commastring
--dependents-all-same as --dependents except not prompting for selecting paths but rather selecting all paths and showing final confirmation before importingboolean
--dependents-dry-run-DEPRECATED. (this is the default now). same as --dependents, except it prints the found dependents and wait for confirmation before importing themboolean
--silent-no prompt for --dependents/--dependents-via flagsboolean
--filter-envs-only import components that have the specified environment (e.g., "teambit.react/react-env")string
--save-in-lane-when checked out to a lane and the component is not on the remote-lane, save it in the lane (defaults to save on main)boolean
--all-history-relevant for fetching all components objects. avoid optimizations, fetch all history versions, alwaysboolean
--fetch-deps-fetch dependencies (bit components) objects to the local scope, but dont add to the workspace. Useful to resolve errors about missing dependency databoolean
--track-only-do not write any component files, just create .bitmap entries of the imported components. Useful when the files already exist and just want to re-add the component to the bitmapboolean
--include-deprecated-when importing with patterns, include deprecated components (default to exclude them)boolean