himl 0.6.0

dotnet add package himl --version 0.6.0
                    
NuGet\Install-Package himl -Version 0.6.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="himl" Version="0.6.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="himl" Version="0.6.0" />
                    
Directory.Packages.props
<PackageReference Include="himl" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add himl --version 0.6.0
                    
#r "nuget: himl, 0.6.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package himl@0.6.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=himl&version=0.6.0
                    
Install as a Cake Addin
#tool nuget:?package=himl&version=0.6.0
                    
Install as a Cake Tool

himl

Core library for himl.net (Hierarchical YAML configuration for .NET).

Installation

Install the library package:

dotnet add package himl

Or via Package Manager Console:

Install-Package himl

Basic Usage

Merge simple/default.yaml with simple/production/env.yaml:

using himl;
using himl.core;

var processor = new ConfigurationProcessor(/* dependencies via DI */);
var options = new HimlOptions
{
    OutputFormat = OutputFormat.Yaml,
    ListMergeStrategy = ListMergeStrategy.AppendUnique
};

var result = await processor.ProcessAsync("examples/simple/production", options);
Console.WriteLine(result.Output);

Using with Microsoft.Extensions.Configuration

himl.net integrates seamlessly with the .NET configuration system:

using himl.Extensions;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;

var builder = Host.CreateApplicationBuilder(args);

// Add HIML configuration source using the complex example
builder.Configuration.AddHiml("examples/complex/env=dev/region=us-east-1/cluster=cluster1", options =>
{
    options.ListMergeStrategy = ListMergeStrategy.AppendUnique;
    options.DictMergeStrategy = DictMergeStrategy.Merge;
});

var host = builder.Build();

// Access configuration values from the complex example
var config = host.Services.GetRequiredService<IConfiguration>();
var environment = config["env"];              // "dev"
var region = config["region"];               // "us-east-1"
var cluster = config["cluster"];             // "cluster1"
var clusterName = config["cluster_info:name"];           // "default"
var nodeType = config["cluster_info:node_type"];         // "c3.2xlarge"
var cpuMetric = config["cluster_metrics:0:metric"];      // "cpu"
var cpuValue = config["cluster_metrics:0:value"];        // "90"

Secret Resolution

The library supports multiple secret managers for resolving secrets in your configuration:

// Example configuration with secrets
builder.Configuration.AddHiml("config/production", options =>
{
    options.SkipSecrets = false;  // Enable secret resolution (default)
});

// Configuration file can reference secrets:
// database:
//   password: "${gcp-sm://my-project/db-password/latest}"
//   apiKey: "${ssm:/app/api-key}"
//   certificate: "${vault:/secret/data/ssl:cert}"
//   backup: "${s3:backup-bucket:credentials.json}"

Supported secret managers:

  • Google Secret Manager: ${gcp-sm://project-id/secret-name/version}
  • AWS Systems Manager: ${ssm:/parameter/path}
  • AWS S3: ${s3:bucket-name:object-key}
  • HashiCorp Vault: ${vault:/secret/path:key}

Authentication is handled through the respective cloud provider SDKs using default credential chains.

You can also chain multiple HIML sources with different merge strategies:

builder.Configuration
    .AddHiml("examples/complex")  // Base configuration
    .AddHiml("examples/complex/env=dev/region=us-east-1/cluster=cluster1", options =>
    {
        options.SkipInterpolations = false;
    })
    .AddHiml("examples/complex/overrides", optional: true);  // Optional overrides

For full documentation and examples, see the repository README: https://github.com/aniongithub/himl.net

Using the CLI

The himl.cli CLI tool provides exact parity with the original Adobe HIML himl-config-merger tool. It generates configuration files from hierarchical YAML.

Install the CLI tool:

dotnet tool install -g himl.cli

Basic usage:

himl.cli <path> --output-dir <output-dir> --levels <levels...> --leaf-directories <leaf-directories...>

Example:

himl.cli examples/complex --output-dir /tmp/output --levels env region cluster --leaf-directories cluster

For full documentation and examples, see the repository README: https://github.com/aniongithub/himl.net

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.6.0 195 8/24/2025
0.5.0 163 8/24/2025
0.4.0 173 8/24/2025
0.3.0 198 8/18/2025
0.2.0 174 8/16/2025
0.1.0 180 8/16/2025