> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-docs-v6-beta2-flutter-uikit.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> Add the CometChat JavaScript SDK to your project using npm or CDN.

## Package Manager

Install the SDK using npm:

```bash theme={null}
npm install @cometchat/chat-sdk-javascript
```

Then import the `CometChat` object wherever you need it:

```javascript theme={null}
import { CometChat } from "@cometchat/chat-sdk-javascript";
```

## CDN

Include the CometChat JavaScript library directly in your HTML:

```html theme={null}
<script
  type="text/javascript"
  src="https://unpkg.com/@cometchat/chat-sdk-javascript/CometChat.js"
></script>
```

When using the CDN, `CometChat` is available as a global variable.

## Get Your Credentials

Before initializing the SDK, get your credentials from the [CometChat Dashboard](https://app.cometchat.com):

1. Sign up or log in
2. Create a new app (or use an existing one)
3. Go to **API & Auth Keys** and note your:
   * App ID
   * Region
   * Auth Key

<Warning>
  **Auth Key** is for development/testing only. In production, generate **Auth Tokens** on your server using the REST API. Never expose Auth Keys in production client code.
</Warning>

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Initialization" icon="play" href="/sdk/javascript/initialization">
    Configure and initialize the SDK
  </Card>

  <Card title="SSR Compatibility" icon="server" href="/sdk/javascript/ssr-compatibility">
    Setup for Next.js, Nuxt, and Ionic
  </Card>
</CardGroup>
