Skip to main content
Create project
SDK Docs

Sheepit SDK Documentation

Everything you need to integrate Sheepit into your application. Track events, manage feature flags, run experiments, and identify users.

Packages

@sheepit-ai/sdk-js
Core JavaScript SDK
Works in browsers and Node.js. The foundation for all other packages.
  • Event tracking
  • Feature flags
  • Experiments
  • Identity management
@sheepit-ai/react
React Bindings
React-specific provider, hooks, and declarative components.
  • GoaTechProvider
  • useFlag, useExperiment, useTrack
  • Feature, Experiment
  • PageViewTracker
@sheepit-ai/server
Server-Side SDK
For Node.js backends and Next.js React Server Components.
  • Server-side flag evaluation
  • Event tracking from the backend
  • Next.js RSC compatible
  • Uses secret keys

Installation

Choose the package that matches your environment. In most cases you only need one.

Terminal
# React applications (includes sdk-js automatically)
pnpm add @sheepit-ai/react

# Server-side (Node.js / Next.js)
pnpm add @sheepit-ai/server

# Standalone (no framework)
pnpm add @sheepit-ai/sdk-js

API Keys

Sheepit uses two types of API key. Each key is scoped to a single project and environment.

  • Publishable keys — prefixed lp_pub_*. Safe to expose in client-side code and environment variables prefixed with NEXT_PUBLIC_. Use these with @sheepit-ai/react and @sheepit-ai/sdk-js.
  • Secret keys — prefixed lp_sec_*. Never expose these in client-side code. Use them only in server environments with @sheepit-ai/server.

Generate your keys in Settings → API Keys. You will need at least one publishable key to follow the Quick Start guide.