Scopes on Bit.Cloud

Bit.cloud is a managed cloud platform for hosting scopes and components managed by the maintainer of Bit. It automates all the manual work of managing scopes in large scale. You can use it to get started when exploring Bit.

To get started with hosting your components on Bit.cloud run the login command:

bit login
CopiedCopy

This commands takes you to Bit.cloud's login page where you can either login to an existing account or create a new one.

Once logged in, you can create a remote scope for your Bit project. This is done on the bit.dev website. Start by choosing if it is a team project or personal project. Then give your remote scope a name and select if you want your scope to be public or private.

Looking to self-host a Bit Scope?

Instructions on how to self host your own Scope can be found here.

Scope ownership on Bit.cloud

Scopes on Bit.cloud are owned by an account. This means that by default a scope name is pre-fixed by the account name. This is done to allow unique scope names across multiple accounts.

Setting your scope

Once you created a remote scope you need to make sure the defaultScope is set to the name of your remote scope in the workspace.jsonc file.

{
  "teambit.workspace/workspace": {
    "defaultScope": "ACCOUNT.SCOPE"
  }
}
CopiedCopy

To set a component with a scope different than the workspace's default scope, run the following:

bit scope set SCOPE_NAME COMPONENT_ID_PATTERN
CopiedCopy

For example, the following sets the ui/button component with the my-org.my-scope scope.

bit scope set my-org.my-scope ui/button
CopiedCopy

A component can also have its scope defined when it is created, by using the --scope option. To learn more, see creating components.

Exporting to Bit.cloud

When working with Bit.cloud there's no need for any additional local configuration to export components. Bit resolves the scopes from Bit.cloud with a predefined resolve function. This means you only need to set your scope in workspace.jsonc.

Bit.cloud as a Package Registry

Components exported to Scopes hosted on Bit Cloud can be installed from Bit Cloud (no need for additional configuration).