> ## Documentation Index
> Fetch the complete documentation index at: https://docs.viamoss.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# NPM Installation

> Step-by-step guide to installing the Moss SDK via NPM for React applications.

# NPM Installation Guide

This guide covers NPM installation for React applications. For non-React applications or simple script tag integration, see the [CDN Installation Guide](/en/cdn-installation).

## Installation Methods

The Moss SDK offers two installation methods:

| Method                                       | Best For                            | Setup Complexity |
| -------------------------------------------- | ----------------------------------- | ---------------- |
| **[CDN Installation](/en/cdn-installation)** | Non-React apps, simple integration  | ⭐ Simple         |
| **NPM Installation** (this guide)            | React apps, full TypeScript support | ⭐⭐ Moderate      |

## Prerequisites

* A React application (v17 or higher)
* An active Node.js environment (v18 or higher recommended)

## 1. Installing the SDK

The Moss SDK is published on the public NPM registry. No authentication or `.npmrc` configuration is required.

```bash theme={null}
npm install @viamoss/moss-sdk
```

or

```bash theme={null}
pnpm add @viamoss/moss-sdk
```

or

```bash theme={null}
yarn add @viamoss/moss-sdk
```

## 2. Integration

After installation, you can integrate the SDK into your application as described in the [**Quickstart Guide**](/en/quickstart).

## Alternative: CDN Installation

If you prefer a simpler setup or don't use React, consider the [**CDN Installation**](/en/cdn-installation) method:

```html theme={null}
<!-- One-line installation -->
<script src="https://cdn.moss.ai/moss-sdk@latest?applicationId=YOUR_APP_ID"></script>
```

This method requires no build tools, package managers, or React dependencies.
