Documentation

Lightweight, composable configuration loader for .NET.

Lightweight, composable configuration loader for .NET. Load settings from JSON files (including appsettings), environment variables, .env files, and merge them with clear precedence. Built on Microsoft.Extensions.Configuration with a simple, focused API.

  • Targets: .NET 10.0 (net10.0)
  • NuGet: ArturRios.Configuration
  • Minimal dependencies: ArturRios.Extensions, DotNetEnv, Microsoft.Extensions.*.

Features

  • Unified loader: ConfigurationLoader to compose multiple sources.
  • Providers:
    • EnvironmentProvider reads OS environment variables as bool, int, string or a JSON-deserialized object.
    • SettingsProvider reads the same typed values from any IConfiguration.
  • Shared enums: ConfigurationSourceType, DataFormatType, DataSource, EnvironmentType, OutputType.
  • Built on Microsoft.Extensions.Configuration, supports JSON, environment variables, .env files.
  • Simple precedence model: later-added sources override earlier ones.
  • Extensible: implement your own provider or source.

Acknowledgements

  • Built on Microsoft.Extensions.Configuration
  • Uses DotNetEnv for .env support
  • Thanks to the .NET OSS community

This project is licensed under the Artur Rios Attribution License. It is free and open source: you may view, use, fork, modify, and extend it, provided you credit the author, Artur Rios, with a link to artur-rios.tech or github.com/artur-rios.


Installation

Add ArturRios.Configuration to your project via NuGet or as a Git submodule.

Quickstart

Load .env files and appsettings for an environment, then read typed values.

Advanced usage

Folder conventions, source precedence and binding configuration to POCOs.

API overview

The loader, the providers and the enums that make up the public API.

Extensibility

Add your own configuration sources and providers.

Changelog

Notable changes in each release.

Contributing

Building from source, running the tests, branching and releasing.