Skip to main content

The Configo CLI tool. Run 'configo schema generate' to generate an appsettings JSON schema for your application.

Total Downloads
1.8K
1,836
Published
Sep 25, 2026
24d ago

Get Started

dotnet add package Configo.Tool --version 1.1.5

No framework information available.

README

Configo.Tool

The Configo CLI tool, distributed as a .NET tool.

It generates an appsettings.schema.json file for your application by introspecting its dependency injection container, giving you IntelliSense and validation for your configuration in editors that support JSON schema.

Installation

Install globally:

dotnet tool install --global Configo.Tool

Or as a local tool (recommended for repeatable builds):

dotnet new tool-manifest   # if you don't have one yet
dotnet tool install Configo.Tool

Usage

Run from your application's directory:

configo schema generate
configo schema generate --project src/MyApp
configo schema generate --project src/MyApp/MyApp.csproj --output ./appsettings.schema.json
Option Description
--project <path> Path to the .csproj file or the directory that contains it. Defaults to the current working directory.
--output <file> Output path for the generated schema file. Overrides the default location. Can be absolute or relative to the current directory.
--help, -h Show the help message.

How it works

The tool launches your application out-of-process with schema generation enabled. Your app must reference the Configo.Design package and call AddConfigoDesign() so the tool can discover which CLR types are bound to which configuration sections. Your app writes a small bindings manifest and exits.

The tool then generates a small throwaway project in a temporary directory that:

  • targets your application's runtime,
  • references your application's compiled output,
  • declares a FrameworkReference to Microsoft.AspNetCore.App, and
  • references the Configo.Design.Generation package.

It runs that throwaway project to produce the schema, then deletes it. Because generation runs on your application's own runtime — compiled against your app and the ASP.NET Core shared framework — the .NET host resolves your application's full dependency closure, including shared-framework types such as System.Threading.RateLimiting, exactly as it does when your app runs. The tool itself never loads your application's assemblies, which avoids the DLL-resolution failures that come from loading another app's assemblies into a different runtime.

NJsonSchema therefore lives only in Configo.Design.Generation (used by the throwaway project) and never ships in your application.

Descriptions come from XML documentation. Enable <GenerateDocumentationFile>true</GenerateDocumentationFile> in your application project so your <summary> comments become schema descriptions.

Supported runtimes. Schema generation currently supports net10.0 applications. If your app targets a different runtime, the tool fails fast with a clear message; support for more runtimes is planned.

The generated schema is written as UTF-8 without a byte-order mark, so editors such as VS Code consume it correctly.

The bindings manifest — not the application's process exit code — is the real success signal. If your host exits non-zero while shutting down mid-startup (for example, Kestrel rethrowing a cancellation from BindAsync) but a fresh manifest was written, the tool proceeds and prints a warning. See the Configo.Design documentation for how to make the design-time shutdown non-fatal.

Downloads by Version

Depended On By

Find packages that declare this package as a dependency. NuGet does not provide a reverse-dependency endpoint, so candidates are checked on demand.

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

No target framework metadata is available. Confirm compatibility in a representative project before standardising on this package.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.