Import components from their remote scopes to the local workspace
$bit import [component-patterns...]
Arguments
Argument | Description | Required |
---|---|---|
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
Option | Option Alias | Description | Value Type |
---|---|---|---|
--path | -p | import components into a specific directory (a relative path in the workspace) | string |
--objects | -o | import 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 argument | boolean |
--override | -O | override local changes | boolean |
--verbose | -v | show verbose output for inspection | boolean |
--json | -j | return the output as JSON | boolean |
--skip-dependency-installation | -x | do not auto-install dependencies of the imported components | boolean |
--skip-write-config-files | - | do not write config files (such as eslint, tsconfig, prettier, etc...) | boolean |
--merge | -m | merge 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 workspace | boolean |
--dependencies-head | - | same as --dependencies, except it imports the dependencies with their head version | boolean |
--dependents | - | import components found while traversing from the imported components upwards to the workspace components | boolean |
--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 comma | string |
--dependents-all | - | same as --dependents except not prompting for selecting paths but rather selecting all paths and showing final confirmation before importing | boolean |
--dependents-dry-run | - | DEPRECATED. (this is the default now). same as --dependents, except it prints the found dependents and wait for confirmation before importing them | boolean |
--silent | - | no prompt for --dependents/--dependents-via flags | boolean |
--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, always | boolean |
--fetch-deps | - | fetch dependencies (bit components) objects to the local scope, but dont add to the workspace. Useful to resolve errors about missing dependency data | boolean |
--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 bitmap | boolean |
--include-deprecated | - | when importing with patterns, include deprecated components (default to exclude them) | boolean |