---
title: Install
slug: wip/38Td-install
createdAt: 2023-07-26T06:17:30.418Z
---

# Install

Cosmos is distributed as an npm package that can be added to any web project using a dependency manager of your choice.

:::hint{type="warning"}
Cosmos uses Red Bull's custom fonts to display text content inside components for different languages.

Please follow the guide for [Font Faces](https://cosmos.redbull.design/wip/font-faces) to learn more about the different ways to provide them.
:::

Because the Cosmos package is distributed through Red Bull's in-house npm registry, an`.npmrc` in the root of a project with authentication instructions required.

Add the following lines to your `.npmrc` file in the project's root.

:::CodeblockTabs
.npmrc

```text
@cosmos:registry=https://artifactory.redbullmediahouse.com/artifactory/api/npm/rbds-npm-local/

//artifactory.redbullmediahouse.com/artifactory/api/npm/rbds-npm-local/:_auth=cy1yYm1oLXJlYWRvbmx5LXJiZHM6QVA4bTJXZVNhN2Q5bTZYVUpIcVZmdGtTOGpR

//artifactory.redbullmediahouse.com/artifactory/api/npm/rbds-npm-local/:always-auth=true
```
:::

For Yarn 4+ users:

:::CodeblockTabs
.yarnrc

```yaml
npmRegistries:
  //artifactory.redbullmediahouse.com/artifactory/api/npm/rbds-npm-local/:
    npmAlwaysAuth: true
    npmAuthIdent: cy1yYm1oLXJlYWRvbmx5LXJiZHM6QVA4bTJXZVNhN2Q5bTZYVUpIcVZmdGtTOGpR
```
:::



With an `.npmrc` file in the project's root, the Cosmos library can be installed as usual:

```shell
# npm

npm install @cosmos/web --save

# yarn

yarn add @cosmos/web --dev
```

:::hint{type="warning"}
**⚠️ Caution**

When building an application that will co-exist with other applications that are built with Cosmos on the same webpage, we recommend using Scoped Web Components via `@cosmos/web-scoped` instead of `@cosmos/web`to avoid version conflicts.

Read more about [Scoped Web Components](https://cosmos.redbull.design/wip/scoped-web-components) and how to use them.
:::

```shell
# npm

npm install @cosmos/web-scoped --save

# yarn

yarn add @cosmos/web-scoped
```

