Skip to main content

Install Flaggr SDK and configure your development environment

Installation

TypeScript / JavaScript

Install the Flaggr client SDK:

npm install @flaggr/client

The SDK includes:

  • Core client — Flag evaluation with multiple transport modes
  • React hooksuseBooleanFlag, useStringFlag, useNumberFlag, useObjectFlag
  • Analytics — Automatic evaluation event batching
  • OpenFeature provider — Standard OpenFeature SDK integration

OpenFeature SDK

Flaggr is fully compatible with the OpenFeature standard. You can use the official OpenFeature SDKs:

Web (Browser)

npm install @openfeature/web-sdk

Server (Node.js)

npm install @openfeature/server-sdk

Configuration

Environment Variables

VariableDescriptionRequired
FLAGGR_API_URLFlaggr API endpointYes
FLAGGR_SERVICE_IDYour service identifierYes
FLAGGR_API_KEYAPI token for authenticationYes (for private flags)
FLAGGR_ENVIRONMENTTarget environment (development, staging, production)No (defaults to development)

Evaluation Modes

The SDK supports 7 evaluation modes:

ModeDescriptionBest For
remoteEvaluate flags via API callsServer-side, low flag count
ofrepOpenFeature Remote Evaluation ProtocolStandard compliance
in-processLocal evaluation with cached rulesHigh-throughput, low latency
fileFile-based flag configurationTesting, CI/CD
hybridLocal evaluation + remote syncBest of both worlds
connectConnect-RPC protocolType-safe RPC
grpc-webgRPC-Web binary streamingBrowser gRPC support