Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.vibefollow.com/llms.txt

Use this file to discover all available pages before exploring further.

@vibefollow/sdk is the official TypeScript SDK for Vibefollow. One install, one constructor, three resources.

vf.users

Identify users and emit lifecycle events.

vf.events

Track custom events and batch high-volume writes.

vf.webhooks

Verify signed webhook deliveries.
The package is fully typed (TypeScript-first, .d.ts shipped) and works in every JavaScript runtime that has fetch, AbortController, and crypto.randomUUID — that’s Node 20+, Cloudflare Workers (with nodejs_compat), Vercel Edge, and Deno.

What the SDK handles for you

Authentication

The API key flows into the Authorization header on every request.

Idempotency

Every POST gets a v4 UUID Idempotency-Key; the backend dedupes within a 24-hour window.

Retries

Transient failures (network, 5xx, 429) retry with exponential backoff plus jitter, up to maxRetries (default 2).

Timeouts

Per-request AbortController timeout (default 10 seconds).

Error mapping

HTTP status codes become typed errors you can catch.

Webhook verification

HMAC-SHA256 with constant-time comparison and timestamp tolerance.

What you handle

  • Storing your API key (in a secrets manager, exposed to your process as VIBEFOLLOW_API_KEY).
  • Storing your webhook secret separately.
  • Choosing which events to emit.
  • Verifying webhook signatures on inbound deliveries.

Supported runtimes

RuntimeStatusNotes
Node 20+SupportedPrimary target
Node 18Not supportedfetch is unflagged, but the SDK targets ES2022 features available only in 20+
Cloudflare WorkersSupportedRequires nodejs_compat compatibility flag for webhook verification
Vercel EdgeSupportedWebhook verification requires node:crypto — not available on pure-edge runtimes
DenoSupported--allow-net, --allow-env
BrowserNot supportedYour API key must stay server-side

Next

Installation

Install the SDK across npm, pnpm, yarn, and per-runtime notes.

The VibeFollow class

Constructor signature and configuration options.

users resource

identify plus the 9 lifecycle helpers.

events resource

track and the batching API.

Errors

The typed error hierarchy and recovery patterns.

Types

Public TypeScript types exported from the package.