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


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)


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
--dependents-import components found while traversing from the imported components upwards to the workspace componentsboolean
--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