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

# TypeScript SDK

> Install @getmodus/sdk and call Modus, scopes, workflows, and context from Node.js.

Official TypeScript / JavaScript client for Modus — your organization's context layer for AI.

**Package release:** [`@getmodus/sdk`](https://www.npmjs.com/package/@getmodus/sdk) on npm.

## Installation

```bash theme={null}
npm install @getmodus/sdk
```

## Authentication

Create an API token in the Modus app (**Settings → API Tokens**). Prefer an environment variable:

```bash theme={null}
export MODUS_API_KEY=modus_xxx
```

See [Authentication](/authentication) for token format and best practices.

## Quick start

```ts theme={null}
import { Modus } from '@getmodus/sdk'

// Reads MODUS_API_KEY from the environment, or pass apiKey explicitly
const client = new Modus()

for await (const scope of (await client.scopes.list()).autoPagingIter()) {
  console.log(scope.name, scope.status)
}

const scope = await client.scopes.get('revenue-analysis')
console.log(scope.name, scope.description)

for await (const item of (await client.context.items.list()).autoPagingIter()) {
  console.log(item.uid, item.contextType, item.description ?? item.uid)
}
```

## Next steps

* Browse the full [TypeScript SDK reference](/sdk/typescript) (classes, methods, types)
* [API](/api-reference) — REST playground and schemas
* [Python SDK](/guides/sdk-python)
* [All SDKs](/guides/sdk)
