build-cmd - Uses the compiler defined in bit.json to return the compiled version of the component.
Bit build [component ID] [-inline | -i]
This command get all the boilerplate dependencies for building a component according to its bit.json configuration. When boilerplate is set, uses it to compile the code to distributable. For example - if a component is written in Babel, it will download Babel, and use it to compile the code to ES.
-i, --inline # Create a compiled file on an inline component (dist/dist.js).
Build a specific component.
bit build [component ID]
Build a component in the inline_components folder.
bit build [component ID] -i
commit-cmd - Commit a bit to the local scope and adds a log message.
bit commit [component ID] "[message]"
Moves a component from your development environment to the project's local scope (staging area), to prepare for export.
config-cmd - Global configuration management.
bit config ...
Bit-create - Creates a new component in the current scope.
bit create [component ID] [--specs | -s] [--json | -j]
This commands creates a new component in the current scope's development environment. To find the right scope, it will go up the directory tree to find the nearest scope, and use it.
-s, --specs
# Create a file to contain the specifications for the component.
-j, --json
# Create a file to configure additional metadata on the component. See bit.json for additional information.
Create a component
bit create [component ID]
Create a component with a specs file
bit create [component ID] -s
Create a component with a bit.json file
bit create [component ID] -j
Create a component with specs and bit.json files
bit create [component ID] -s -j
export-cmd - Export a component to a remote scope.
bit export [component ID] [remote scope] [--indentity-file | -i]="path to identity file"
Pushes a component from the local '.bit' folder to a remote scope, to update a version, or submit a new functionatlity to a scope. Making it available for others to use.
-i, --indentity-file
something?....
Export a component
bit export [component ID] [remote scope]
import-cmd - Imports a component to scope.
bit import [component ID] [--save | -s] [--tester | -t] [--compiler | -c]
Imports a component from a remote scope to the local scope you currently work on, so that you can use the component in your code. This commands adds the component as a dependency to your code via an entry in bit.json file.
A component can be defined as a 'tester' or a 'compiler', to be used as an environment.
You can also choose to simply download component to the current folder, and not to the scope, to be viewed/tested without adding to your bit.json file.
There's no need to set compiler or tester components as dependencies for your scope. Bit imports components that are runnable, so no need to test or build them in order to use them.
-s, --save
Imports component to current folder, no need for scope.
-t, --tester
Imports the component as a 'testing environment', so Bit will be able to use it to run the tests for components.
-c, --compiler
Imports component as a 'building environment', so Bit will be able to use it to compile the component to a runable code.
Import a component, and set it as a dependency for the current scope.
bit import <component ID>
Import a component, without saving it as a dependency.
bit import <component ID> -s
Import a component as a build environment, and not set it as a dependency for the project.
bit import <component ID> -c
bit-init - Initialate an empty scope.
bit init [path] [--bare[=<name>] | -b] [--shared[=<groupname>] | -s]
This command creates an empty Bit scope - basically a bit.json file, and a .bit directory with subdirectories for objects, environment and temporary files.
Running ‘bit init’ in an existing scope is safe. It will not overwrite components that are already there but only reinitialize corrupted system files if possible.
-b, --bare # initialize an empty bit bare scope
--shared # add group write permissions to a repository properly
Creates an empty Bit scope in current working directory.
bit init
Creates an empty Bit scope in /tmp folder.
bit init /tmp
Creates a bare scope named ‘my-scope’.
bit init --bare my-scope
Specify that the Bit scope is to be shared by several users in the same group by setting file group permissions properly. This allows users belonging to the same group to export components into that scope.
bit init --bare --shared
list-cmd - List all components in a scope.
bit list "[scope name]" | [--inline | -i]
Lists all components in a remote scope, local scope or the inline_components folder. This allows for easy browsing of data, to understand the contents of a scope.
List all components in local scope.
bit list @this
List all components in inline_components folder
bit list -i
List all components in a remote scope.
bit list bit.env
log-cmd - Show a log of a specific component.
bit log <component ID>
Show a log of a spcefic component, including all commit messages. Can run on local or remote components.
Show log of a local component
bit log @this/<component ID>
Show log of a remote component
bit log <remote component>
Bit-modify - Sets a component from local scope for modification.
bit modify [component ID]
This command allows modifications to an already published component. Once you have the component in your local scope (@this), you can use this command to prepare it for modification.
When the component is being 'modified', it's in the inline_components folder, which means you can now do any modification to it. To save modifications, issue the 'commit' command.
Modify a component that is in your local scope.
bit modify @this/<component ID>
Mofidy a remote component.
bit modify <component ID>
remote-cmd - Manages your list of remote scopes.
`bit remote [add="remote scope"] [rm="remote name"] [--global | -g]
Bit allows you to connect to remote scopes to allow importing and exporting components. This allows collaboration on code components, share them across teams, and reuse across projects.
The 'remote' command manages the list of remote scopes connected to current remote.
When working with many remotes, and some dependencies are shared between remote scopes, you must connect these scoepes between themselves. This will allow components to have dependencies from other scopes.
-g, --global
Manage globally configured remotes
Add a remote scope to local scope.
bit remote add <scope url>
List all remote scopes configured to locaol scope.
bit remote
Remove a remote scope
bit remote rm <scope name>
search-cmd - Search a component in a scope.
bit search scope_name search_query
Search in either local or remote scope for a component. The search covers the name, description and docs of each component.
Each scope has its own index of components.
If you search in the current scope, use bit search @this search_query.
To search in another scope, use bit search @scope_name search_query
Search for a component in a current scope.
bit search @this concat array
Search for a component in a remote scope.
bit search @my_remote_scope concat array
show-cmd - Show metadata of a given component.
bit show [--inline | -i] [component ID]
Shows name, description, environment, docs, version, date.... of a component.
-i, --inline
Shows data of component in inline_components folder
Print data of local component.
bit show @this/<component ID>
Print data of a remote component.
bit show <component ID>
print data of a component in inline_components.
bit show -i <component ID>
Bit-status - Show status of components in modification.
bit status
Displays list of all components in current workspace. Shows the state for each component.
Do this to figure out which component needed to be exported to a remote scope, in case of modifications made to it.
Similar to git status.
test-cmd - Runs a component test suite.
bit test [--inline | -i] [component ID]
Runs a component test suite using the testing environment defined for the component. This is to validate a component can still work in an isolated environment.
-i, --inline
Run tests on a component in inline_components
Run a test suite.
bit test @this/<component ID>.