Skip to main content

Requirements

  • Node.js 18 or later
  • The Sinker Rust sidecar running on localhost:7777 (see the repo README)
  • An API key for your chosen model provider (OPENAI_API_KEY, ANTHROPIC_API_KEY, GROQ_API_KEY, or XAI_API_KEY)

Install


ESM

The SDK is published as native ESM ("type": "module"). If you’re using CommonJS, import it with a dynamic import():

TypeScript

Full .d.ts declarations are included. No @types/ package needed. Requires "moduleResolution": "NodeNext" (or "Bundler") in your tsconfig.json:

Verify the connection

If the sidecar isn’t running you’ll get a SinkerError: Request failed: fetch failed — start the sidecar first with sinker start from the sinker/ directory.