Imports a component to your project from a remote Scope.


bit import|i [-t|--tester] [-v|--verbose] [-c|--compiler] [-e|--environment] [--extension] [-p|--path <directory>] [-d|--display-dependencies] [-O|--override] [--dist] [--conf] [--ignore-package-json] [ids...]


Import a single component from a remote Scope

When importing a component, it will be imported to the default location listed in the bit.json file. Component is imported without its environments by default.

bit import

In order to import a component to a specific location, use the --path flag:

bit import --path src/foo

In order to import a component with its environments, use the --environment flag:

bit import --environment

In order to import a component’s specific version, use the @ sign:

bit import

Import project’s component objects from their remote Scope

The bit.json file contains a list of the project’s sourced components. In order to import all of their updated objects (similar to running git fetch) at once.

bit import

Import project’s environments

The bit.json file contains the project’s environments (compiler and tester). In order to import those, don’t specify a specific component, and use the --environment flag:

bit import --environment

Import a new environment

In order to import and set a new environment for your project’s components, use the --tester and --compiler flags:

$ bit import bit.envs/compilers/babel --compiler
$ bit import bit.envs/testers/mocha --tester

Import an extension

In order to import a new extension for your project, use the --extension flag:

bit import bit.extensions/commands/pack --extension

Pass an extra arguments to npm

In order to pass extra arguments to an npm client, place the arguments after --.

bit import -- --production --no-optional


-t, —tester

Import a tester environment component

bit import bit.envs/testers/mocha --tester

-v, —verbose

Show a more verbose output when possible.

bit import --verbose

-c, —compiler

Import a compiler environment component.

bit import bit.envs/compilers/babel --compiler

-e, —environment

Install development environment dependencies (compiler and tester), or import a component AND its environments.

bit import -e
bit import --environment

-p, —path

Import components into a specific directory.

bit import --path src/foo

-d, —display-dependencies

Display the imported dependencies

bit import --display-dependencies

-O, —override

Ignore local changes (import a component’s new version even though it was changed locally).

bit import --override


Write dist files (when exist) to the configured directory

bit import --dist


Write the configuration file (bit.json).

bit import --conf


Do not generate package.json for the imported component(s).

bit import --ignore-package-json


Import an extension components.

bit import bit.extensions/commands/pack --extension
  • cli export
  • cli install