Adding Nx Cloud to an Nx Workspace

Adding Nx Cloud When Creating a Workspace

You can enable Nx Cloud when creating a new workspace with npx create-nx-workspace. Just reply with Yes to the prompt that asks about adding Nx Cloud to your workspace.

? Enable distributed caching to make your CI faster (Use arrow keys) ❯ Yes I want faster builds No

This will connect your workspace to Nx Cloud, so you can start testing it out right away.

Adding Nx Cloud to an Existing Workspace

If you are on the latest version of Nx, you can connect your existing Nx workspace to Nx Cloud by running:

npx nx connect-to-nx-cloud

If you are using an older version of Nx, you can connect your workspace by adding the @nrwl/nx-cloud package to your workspace and running nx g @nrwl/nx-cloud:init.

Connecting Your Workspace to Your Nx Cloud Account

After you have enabled Nx Cloud in your workspace, you will see the following:

> NX NOTE Nx Cloud has been enabled Your workspace is currently public. Anybody with code access can view the workspace on nx.app. You can connect the workspace to your Nx Cloud account at https://nx.app/orgs/workspace-setup?accessToken=N2Y3NzcyO... (You can do this later.)

Click on this link to associate the workspace with your Nx Cloud account. If you don't have an Nx Cloud account, you can create one on the spot.

After you claim your workspace, you will be able to manage permissions, create access tokens, set up billing, and so forth.

You will also see an interactive tutorial helping you explore distributed caching and the Nx Cloud user interface.

If you lose this link, you can still connect your workspace to Nx Cloud. Go to nx.app, create an account, and connect your workspace using the access token from nx.json.

Skipping Cloud

Similar to how --skip-nx-cache will instruct Nx not to use the cache, passing --no-cloud will tell Nx not to use Nx Cloud.