ForgeJo

Installation

PreviousNext

How to install COSM UI Kit and configure your project.

Prerequisites

Before installing @cosm/ui, make sure you have:

  • Node.js >= 18
  • pnpm (recommended) or npm
  • Tailwind CSS v4 configured in your project
  • Access credentials for the COSM Nexus registry

Configure Nexus Registry

@cosm/ui is published to a private Nexus registry.

Option A — manual .npmrc

Create or update your .npmrc file in the project root:

@cosm:registry=https://nexus.cloud.cosm-lab.science/repository/cosm-npm/
//nexus.cloud.cosm-lab.science/repository/cosm-npm/:_auth=<base64-auth-token>

Option B — npm config

Run the following command to point the @cosm scope at the registry (this writes the same @cosm:registry=… line into .npmrc for you):

npm config set @cosm:registry https://nexus.cloud.cosm-lab.science/repository/cosm-npm/

Get an auth token

The _auth value in .npmrc is a Base64 token derived from your Nexus credentials. Pick one of the options below.

Option A — sign in via npm (recommended)

npm login --registry=https://nexus.cloud.cosm-lab.science/repository/cosm-npm/

Enter your Nexus username, password, and email when prompted. npm writes the _auth token into your .npmrc automatically.

Option B — generate the token manually

echo -n "USERNAME:PASSWORD" | base64

Paste the resulting string as the _auth value in .npmrc.

Contact your team lead if you don't have Nexus credentials.

Pick Your Framework