Weave

Installation

Get started by installing the SDK.

Installation & Setup

Weave is published as a zero-dependency TypeScript package compatible with Node.js 18+, Deno, and Bun.


Package Installation

Install Weave alongside zod using your package manager of choice:

pnpm add Weave zod
npm install Weave zod
yarn add Weave zod
bun add Weave zod

Environment Credentials

Configure your API secret keys in your backend environment:

# OpenAI Provider Key
OPENAI_API_KEY="sk-proj-..."

# Anthropic Claude Provider Key
ANTHROPIC_API_KEY="sk-ant-..."

# Google Gemini Provider Key
GEMINI_API_KEY="AIzaSy..."

TypeScript Configuration

Ensure your tsconfig.json targets ES2022 or higher with strict type checks enabled:

{
  "compilerOptions": {
    "target": "ES2022",
    "module": "NodeNext",
    "moduleResolution": "NodeNext",
    "strict": true,
    "esModuleInterop": true,
    "skipLibCheck": true
  }
}