Lightweight .NET client SDK for the Feature Flags Service.
License
—
Deps
2
Install Size
—
Vulns
✓ 0
Published
Feb 20, 2026
$ dotnet add package FeatureFlags.ClientMinimal .NET client SDK for the Feature Flags Service. There is also a thin FeatureFlagsClientFactory layer to avoid creating a new HttpClient and client instance every time you want to evaluate a flag, which is the recommended way to use the client without the DependencyInjection companion package.
using FeatureFlags.Client;
var http = new HttpClient();
var client = new FeatureFlagsClient(http, new FeatureFlagsClientOptions
{
BaseAddress = new Uri("https://localhost:5001/api/"),
ApiKey = "ffsk_..."
});
var result = await client.EvaluateAsync("my-flag", new EvaluationContext { UserId = "123" });
Console.WriteLine(result.Allowed);
using FeatureFlags.Client;
var client = new FeatureFlagsClientFactory.Create(new FeatureFlagsClientOptions
{
BaseAddress = new Uri("https://localhost:5001/api/"),
ApiKey = "ffsk_..."
});
var result = await client.EvaluateAsync("my-flag", new EvaluationContext { UserId = "123" });
Console.WriteLine(result.Allowed);
Install/use the companion package FeatureFlags.Client.DependencyInjection and register:
services.AddFeatureFlagsClient(options =>
{
options.BaseAddress = new Uri("https://localhost:5001/api/");
options.ApiKey = "ffsk_...";
options.ApiVersion = new Version(1, 0); // optional
});
This is the recommended way to use the client. You can then inject IFeatureFlagsClient wherever you need it.