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

# TypeScript and JavaScript SDK for InsForge

> Install and initialize the official InsForge TypeScript SDK in Node, browsers, and edge runtimes to use auth, database, storage, and realtime.

The InsForge TypeScript SDK provides a type-safe client for interacting with InsForge services from JavaScript and TypeScript applications.

## Installation

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

```bash yarn theme={null}
yarn add @insforge/sdk@latest
```

```bash pnpm theme={null}
pnpm add @insforge/sdk@latest
```

```javascript theme={null}
import { createClient } from '@insforge/sdk';

const insforge = createClient({
  baseUrl: 'https://your-app.insforge.app',
  anonKey: 'your-anon-key'  // Optional: for public/unauthenticated requests
});
```

Find the anon key with `npx @insforge/cli secrets get ANON_KEY`, or in the dashboard: click **Install** and open **API Keys**.

## Quick start

```typescript theme={null}
import { createClient } from '@insforge/sdk';

const insforge = createClient({
  baseUrl: 'https://your-app.insforge.app',
  anonKey: 'your-anon-key'  // Optional: for public/unauthenticated requests
});
```

## Features

* **Database** - Type-safe CRUD operations with PostgREST
* **Authentication** - Email/password and OAuth authentication
* **Storage** - File upload, download, and management
* **Functions** - Invoke serverless edge functions
* **AI** - Chat completions and image generation
* **Realtime** - WebSocket-based pub/sub messaging
* **Payments** - Provider-scoped Stripe and Razorpay payment helpers

## SDK reference

> [card] [Database](https://docs.insforge.dev/sdks/typescript/database.md)
>
> CRUD operations, filters, and queries

> [card] [Authentication](https://docs.insforge.dev/sdks/typescript/auth.md)
>
> Sign up, sign in, OAuth, and user management

> [card] [Storage](https://docs.insforge.dev/sdks/typescript/storage.md)
>
> File upload, download, and management

> [card] [Functions](https://docs.insforge.dev/sdks/typescript/functions.md)
>
> Invoke serverless edge functions

> [card] [AI](https://docs.insforge.dev/sdks/typescript/ai.md)
>
> Chat completions and image generation

> [card] [Realtime](https://docs.insforge.dev/sdks/typescript/realtime.md)
>
> WebSocket pub/sub messaging

> [card] [Payments](https://docs.insforge.dev/sdks/typescript/payments.md)
>
> Provider-scoped Stripe and Razorpay payment helpers
