# TypeScript Installation

> Install the polyglot SDK in Node, Bun, or the browser.

The TypeScript SDK runs in **three environments** from the same package:

- **Browsers** — uses native [WebTransport](https://developer.mozilla.org/en-US/docs/Web/API/WebTransport)
- **Node 20+** — uses a WebTransport polyfill
- **Bun** — native (Bun ships WebTransport)

All three environments load the same Emscripten WASM build of the C++ core
for serialization and audio framing.

## Install

**npm:**
```bash
npm install clutchcall_connect
```

**pnpm:**
```bash
pnpm add clutchcall_connect
```

**bun:**
```bash
bun add @clutchcall/agents
```

## Subpath imports

Each of the five modalities is its own subpath import:

```ts
import { Voice }      from "clutchcall_connect/voice";
import { Streams }    from "clutchcall_connect/streams";
import { Robotics }   from "clutchcall_connect/robotics";
import { Games }      from "clutchcall_connect/games";
import { Data }       from "clutchcall_connect/data";
import { MoqtClient } from "clutchcall_connect/moqt";
```

The root import (`import … from "@clutchcall/agents"`) is the legacy
`ClutchCallClient` voice-RPC surface. It stays available for backwards
compatibility.

## Verify

```ts
import { MoqtClient } from "clutchcall_connect/moqt";

const moqt = await MoqtClient.connect("https://relay.firstbyte.fast/moq");
console.log("connected, rtt:", moqt.connectionRttUs(), "µs");
moqt.close();
```

## Next

  - **[Quickstart](/sdks/typescript/quickstart)** — Walk through the streams modality end to end.
  - **[Reference](/sdks/typescript/reference)** — See every modality and every method.
  - **[Examples](/sdks/typescript/examples)** — See runnable examples for each modality.
  - **[Modalities](/modalities/overview)** — Learn the 5-modality model and when to select each modality.
