Skip to main content

Installation

Initialize Your Project

This creates:
  • flags.config.ts - Your flag definitions
  • .flagkit/ directory - Generated code and configuration

Define Your First Flag

Edit flags.config.ts:
flags.config.ts

Generate Client Code

This generates:
  • .flagkit/generated/types.ts - TypeScript types
  • .flagkit/generated/client.ts - Runtime client
  • .flagkit/generated/decision-tree.json - Evaluation rules

Use in Your Application

Basic Usage

With User Context

React Hook

Configure Targeting Rules

In the Dashboard

  1. Go to dashboard.flagkit.io
  2. Click on your flag
  3. Add targeting rules:

Pull and Deploy

Common Flag Types

flag.string() .description('API endpoint')

Next Steps

Percentage Rollouts

Learn how to gradually roll out features

Deployment Guide

Complete deployment workflow from dev to production

Testing Strategies

Test your feature flags effectively

CLI Reference

Explore all CLI commands