
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
@sucoza/feature-flag-manager-devtools-plugin
Advanced tools
DevTools plugin for feature flag management and A/B testing with multiple provider support
A comprehensive TanStack DevTools plugin for managing and testing feature flags at runtime during development. This plugin provides a powerful interface for controlling feature flags, testing A/B experiments, simulating user segments, and monitoring flag evaluations in real-time.
npm install @sucoza/feature-flag-manager-devtools-plugin
import React from 'react';
import {
FeatureFlagManagerPanel,
createFeatureFlagDevToolsClient
} from '@sucoza/feature-flag-manager-devtools-plugin';
// Create a client instance
const client = createFeatureFlagDevToolsClient();
function App() {
return (
<div>
{/* Your application content */}
<main>
{/* Feature flag controlled components */}
</main>
{/* DevTools Panel */}
<FeatureFlagManagerPanel
client={client}
defaultTab="dashboard"
height={600}
/>
</div>
);
}
import React from 'react';
import { useFeatureFlagManager } from '@sucoza/feature-flag-manager-devtools-plugin';
function MyComponent() {
const {
evaluateFlag,
toggleFlag,
setContext,
state,
isReady
} = useFeatureFlagManager({
initialContext: {
userId: 'user-123',
userSegment: 'beta-users',
attributes: {
plan: 'premium',
region: 'us-east-1'
}
}
});
const [showNewFeature, setShowNewFeature] = React.useState(false);
React.useEffect(() => {
if (!isReady) return;
evaluateFlag('new-feature-flag').then(value => {
setShowNewFeature(!!value);
});
}, [isReady, evaluateFlag, state]);
const handleToggleFeature = () => {
toggleFlag('new-feature-flag');
};
if (!isReady) return <div>Loading...</div>;
return (
<div>
{showNewFeature && <NewFeatureComponent />}
<button onClick={handleToggleFeature}>
Toggle New Feature
</button>
</div>
);
}
import { createFeatureFlagDevToolsClient } from '@sucoza/feature-flag-manager-devtools-plugin';
const client = createFeatureFlagDevToolsClient();
// Add LaunchDarkly provider
await client.addProvider({
name: 'launchdarkly-prod',
type: 'launchdarkly',
enabled: true,
config: {
apiKey: 'your-sdk-key',
environmentId: 'production',
clientId: 'your-client-id'
}
});
// Add custom API provider
await client.addProvider({
name: 'my-feature-service',
type: 'custom',
enabled: true,
config: {
baseUrl: 'https://api.mycompany.com',
apiKey: 'Bearer your-api-token'
}
});
// Multivariate flag with variants
const paymentMethodVariant = await client.evaluateFlag('payment-methods');
// The flag might return different values based on user segment:
// - 'control': Credit card only
// - 'apple-pay': Credit card + Apple Pay
// - 'all-methods': All payment methods
switch (paymentMethodVariant.value) {
case 'apple-pay':
return <ApplePayCheckout />;
case 'all-methods':
return <AllMethodsCheckout />;
default:
return <CreditCardCheckout />;
}
// Update user context for targeting
await client.setEvaluationContext({
userId: 'user-456',
userSegment: 'premium-users',
attributes: {
plan: 'enterprise',
region: 'eu-west-1',
betaOptIn: true,
accountAge: 365
},
environment: 'production'
});
// Flags will be re-evaluated with new context
const premiumFeatures = await client.evaluateFlag('premium-dashboard');
<FeatureFlagManagerPanel
client={client}
theme="auto" // 'light' | 'dark' | 'auto'
defaultTab="dashboard" // Default tab to show
height={600} // Panel height in pixels
/>
const client = createFeatureFlagDevToolsClient();
// Configure settings
const settings = {
autoRefresh: true,
refreshInterval: 5000, // 5 seconds
maxHistorySize: 100,
persistOverrides: true,
showNotifications: true,
theme: 'auto'
};
const { ... } = useFeatureFlagManager({
autoCreate: true, // Automatically create client
initialContext: { ... }, // Initial evaluation context
onReady: (client) => { ... }, // Callback when ready
onStateChange: (state) => { ... } // Callback on state changes
});
The plugin supports light, dark, and auto themes that integrate seamlessly with your application:
/* Custom theme variables */
.feature-flag-manager-panel {
--primary-color: #3b82f6;
--success-color: #10b981;
--warning-color: #f59e0b;
--error-color: #ef4444;
--background-color: #ffffff;
--text-color: #111827;
}
.feature-flag-manager-panel.dark {
--background-color: #1f2937;
--text-color: #f9fafb;
}
# Clone the repository
git clone https://github.com/tanstack/feature-flag-manager-devtools
# Install dependencies
cd feature-flag-manager-plugin
npm install
# Start the demo application
npm run example:basic
# Build the plugin
npm run build
# Watch for changes during development
npm run dev
# Run tests
npm test
# Type checking
npm run typecheck
interface FeatureFlagDevToolsClient {
// Flag operations
getFlags(): Promise<FeatureFlag[]>;
getFlag(id: string): Promise<FeatureFlag | null>;
evaluateFlag(id: string, context?: EvaluationContext): Promise<FlagEvaluation>;
// Override management
setOverride(override: FlagOverride): Promise<void>;
removeOverride(flagId: string): Promise<void>;
clearAllOverrides(): Promise<void>;
// Context management
setEvaluationContext(context: EvaluationContext): Promise<void>;
// History and events
getEvaluationHistory(): Promise<FlagEvaluation[]>;
getEvents(limit?: number): Promise<FlagEvent[]>;
// Subscriptions
subscribe(callback: (state: FeatureFlagDevToolsState) => void): () => void;
// Provider integration
addProvider(provider: ProviderSettings): Promise<void>;
removeProvider(name: string): Promise<void>;
}
interface UseFeatureFlagManagerReturn {
client: FeatureFlagDevToolsClient | null;
state: FeatureFlagDevToolsState | null;
isReady: boolean;
isLoading: boolean;
error: Error | null;
// Convenience methods
evaluateFlag: (flagId: string, context?: EvaluationContext) => Promise<any>;
toggleFlag: (flagId: string) => Promise<void>;
setOverride: (flagId: string, value: any, reason?: string) => Promise<void>;
removeOverride: (flagId: string) => Promise<void>;
setContext: (context: EvaluationContext) => Promise<void>;
refreshFlags: () => Promise<void>;
}
We welcome contributions! Please see our Contributing Guide for details.
# Fork and clone the repository
git clone https://github.com/your-username/feature-flag-manager-devtools
# Install dependencies
npm install
# Start development server
npm run dev
# Run tests
npm test
MIT
Part of the @sucoza TanStack DevTools ecosystem.
Part of the @sucoza TanStack DevTools ecosystem
FAQs
DevTools plugin for feature flag management and A/B testing with multiple provider support
The npm package @sucoza/feature-flag-manager-devtools-plugin receives a total of 1 weekly downloads. As such, @sucoza/feature-flag-manager-devtools-plugin popularity was classified as not popular.
We found that @sucoza/feature-flag-manager-devtools-plugin demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.