@krishna-kukreja/flipit-sdk
v1.0.7
Published
Premium feature flag SDK for FlipIt with real-time updates.
Maintainers
Readme
FlipIt SDK
Premium real-time feature flag SDK for modern applications.
FlipIt is a lightweight, high-fidelity feature flag management system. This SDK allows you to integrate FlipIt into your applications with instant, real-time updates and an automated CLI setup.
🚀 Features
- Automated Setup: Initialize your project in seconds with
flipit init. - Real-Time Engine: Changes in the FlipIt dashboard reflect in your app instantly via SSE.
- Lightweight: Zero-friction integration with minimal dependencies.
- Robust: Built-in exponential backoff reconnection for reliable real-time updates.
📦 Installation
npm install @krishna-kukreja/flipit-sdk🛠️ Quick Start
1. Initialize Project
Run the CLI tool to configure your API key.
npx @krishna-kukreja/flipit-sdk init2. Integration
import { FlipItClient } from '@krishna-kukreja/flipit-sdk';
// Automatically loads API key from .flipitrc
const flipit = new FlipItClient();
await flipit.init();
// Simple boolean flag check
if (flipit.isEnabled('new-dashboard-ui')) {
renderNewDashboard();
}
// Or use the Flag object syntax
const promo = flipit.flag('holiday-sale');
if (promo.isEnabled()) {
showPromoBanner();
}⚙️ Configuration
While flipit init is recommended, you can also pass configuration details directly:
const flipit = new FlipItClient({
apiKey: "your_api_key",
baseUrl: "https://your-api.flipit.com/v1"
});📄 License
MIT © [Krishna Kukreja]
