Initialize a workspace

A workspace is a group of files and directories that provide the necessary context for components to be composed and versioned.

A workspace can be used as a temporary, disposable tool for component maintenance, or as a long-term project that is collaborated on with the help of traditional VCS like git. Either way, components are independent and decoupled from a workspace once they are versioned and exported to their scopes.

Scopes and workspaces

A scope is a collaboration server for components. It is where components are exported to and imported from. A single workspace handles components of different scopes.

Create a scope for free on bit.cloud or host your own scope.


Start a new workspace using a workspace starter. For example, the following creates a workspace using a starter, provided by the base react-env. It sets my-org.tasks-workspace as the default scope for components in that workspace (remote scopes hosted on bit.cloud are prefixed with the scope owner: <owner>.<scope-name>):

$bit
Copiedcopy
See command synopsis

The output is similar to the following:

Let's get started! cd tasks-workspace bit start

To preview your workspace components and inspect your workspace status using the UI, run the following:

$cd tasks-workspace
Copiedcopy
$bit
Copiedcopy

The output displays the port for the UI server:

You can now view 'tasks-workspace' components in the browser. Bit server is running on http://localhost:3000

Head to http://localhost:3000 in your browser. Right now your workspace is empty as no component is being tracked.

an empty workspace

At any point during your component development, run the following to get a detailed status of your workspace:

$bit
Copiedcopy

Run the following to get a list of all your workspace components:

$bit
Copiedcopy

Workspace files and directories

Explore the workspace directory structure below to learn how workspaces maintain components:

TASKS-WORKSPACE
.bit
node_modules
public
tasks-scope
.bitmap
pnpm-lock
workspace.jsonc

Workspace config files for the IDE

A workspace may also include configuration files for the various services used by the IDE. For example, a tsconfig.json file may be generated at the root of your workspace. This file does not determine the compilation config for components. It is only used by your IDE, for a better dev experience.