| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Zero ceremony configuration that updates itself. Define a class, add a rule, inject it — no IOptions<T> wrappers, no Configure<T>() calls.
dotnet add package Cocoar.Configuration # Core library (console apps)
dotnet add package Cocoar.Configuration.DI # + Microsoft.Extensions.DI
dotnet add package Cocoar.Configuration.AspNetCore # + health endpoints, feature flagsYou only need one — each includes everything above it. Requires .NET 9+.
Optional provider packages add only the integration you need:
dotnet add package Cocoar.Configuration.ConfigHub # ConfigHub delivery and live invalidation
dotnet add package Cocoar.Configuration.Http # Generic remote configuration via HTTPvar builder = WebApplication.CreateBuilder(args);
builder.AddCocoarConfiguration(c => c
.UseConfiguration(rule => [
rule.For<AppSettings>().FromFile("appsettings.json"),
rule.For<AppSettings>().FromEnvironment("APP_"),
]));
var app = builder.Build();
// Inject directly — no wrapper
app.MapGet("/settings", (AppSettings settings) => new
{
settings.AppName,
settings.MaxRetries
});
app.Run();| Provider | Fluent API | Package |
|---|---|---|
| File (JSON) | .FromFile("path") | Core |
| Environment Variables | .FromEnvironment("PREFIX_") | Core |
| Command Line | .FromCommandLine("--prefix") | Core |
| Static / Observable | .FromStaticJson() / .FromObservable() | Core |
| WritableStore (writable overlay) | .FromStore() | Core |
| ConfigHub | .FromConfigHub(url, token) | ConfigHub |
| HTTP | .FromHttp(url) | Http |
| Microsoft IConfiguration | .FromIConfiguration(config) | MicrosoftAdapter |
Explore real-world scenarios in the examples directory.
Contributions welcome! See CONTRIBUTING.md for guidelines.
Apache-2.0 — see NOTICE for details.
| Back | FazBrowse Home | New Git URL |