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

Installation

npm install @insforge/sdk@latest
import { createClient } from '@insforge/sdk';

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

Quick Start

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

SDK Reference

Database

CRUD operations, filters, and queries

Authentication

Sign up, sign in, OAuth, and user management

Storage

File upload, download, and management

Functions

Invoke serverless edge functions

AI

Chat completions and image generation

Realtime

WebSocket pub/sub messaging