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.
GoaTechProvideruseFlag,useExperiment,useTrackFeature,ExperimentPageViewTracker
@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-jsAPI 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 withNEXT_PUBLIC_. Use these with@sheepit-ai/reactand@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.
Explore the Docs
Quick Start
Get up and running in minutes.
Connect Claude / Cursor
Point your IDE at Sheepit via MCP.
React SDK
Provider, hooks, and components.
Server SDK
Node.js and Next.js RSC usage.
Events
Track custom events and page views.
Experiments
A/B test features and flows.
Identity
Identify users and set traits.
Configuration
All SDK config options.
Testing
Test your integration.
Troubleshooting
Diagnose common issues.