# TypeScript Installation

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

The TypeScript SDK runs in **three environments** off 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 load the same Emscripten WASM build of the C++ core for serialization
and audio framing.

## Install

**npm:**
```bash
npm install @clutchcall/sdk
```

**pnpm:**
```bash
pnpm add @clutchcall/sdk
```

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

## Subpath imports

Each of the five modalities is its own subpath import:

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

The root import (`import … from "@clutchcall/sdk"`) is the legacy
`ClutchCallClient` voice-RPC surface — kept for backwards compat.

## Verify

```ts
import { MoqtClient } from "@clutchcall/sdk/moqt";

const moqt = await MoqtClient.connect("https://relay.clutchcall.dev/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)** — Every modality, every method.
  - **[Examples](/sdks/typescript/examples)** — Runnable per-modality examples.
  - **[Modalities](/modalities/overview)** — The 5-modality model and when to pick each.
