Chirograph 0.1.1

<Sdk Name="Chirograph" Version="0.1.1" />
                    
For projects that support Sdk, copy this XML node into the project file to reference the package.
#:sdk Chirograph@0.1.1
                    
#:sdk 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.

Chirograph

Typed HTTP clients generated from OpenAPI documents at build time: one MSBuild item, a Kiota or Refitter client, registered with IHttpClientFactory.

A chirograph was a medieval contract written twice on one sheet and cut apart, so each half proved the other. Here the OpenAPI document and the generated client are the two halves.

Chirograph is the MSBuild layer for the two generators .NET teams already choose, Kiota and Refit through Refitter. It generates no code of its own, so it keeps each generator's fidelity and follows their releases by changing a version.

github-release-badge github-license-badge github-build-badge nuget-Chirograph-badge

Documentation: https://rocketsurgeonsguild.github.io/Chirograph/

Quick start

Chirograph is an MSBuild SDK, which a project adds next to its own SDK. Pin its version once in global.json; the current version is the one on the NuGet badge above:

{
  "msbuild-sdks": {
    "Chirograph": "0.0.10-beta.1"
  }
}

Then add the SDK to the project and declare a client:

<Project Sdk="Microsoft.NET.Sdk">
  <Sdk Name="Chirograph" />

  <ItemGroup>
    <OpenApiClient Include="openapi/rockets.json" Generator="Kiota" ClientName="RocketsClient" />
  </ItemGroup>
</Project>

Register it and give it a base address:

services.AddRocketsClient();
{ "Clients": { "RocketsClient": { "BaseAddress": "https://rockets.example.com/" } } }

The getting started guide walks through a first client, and sample/ChirographSample has a server project, a Kiota client generated from it and a Refitter client generated from a document file.

Sources

The kind of source is inferred from the item's Include, never declared:

  • A file: an OpenAPI document in the project, as JSON or YAML.
  • A server project: a project in the same build whose document Microsoft.Extensions.ApiDescription.Server writes when it builds.
  • A URL: downloaded into a document cache, which can be committed so builds work offline.

Generators

  • Kiota: a request-builder client on Microsoft.Kiota.Bundle.
  • Refitter: a Refit interface on Refit.HttpClientFactory.

The generators run as processes during the build, fetched with PackageDownload. Output goes to obj, builds are incremental, and generator telemetry and update checks are off.

Registration

Each client gets an Add<ClientName>() extension on IServiceCollection that registers it with IHttpClientFactory, configures it from Clients:<ClientName> (BaseAddress, Timeout, DefaultRequestHeaders, Resilience), and returns the IHttpClientBuilder for handlers and resilience. With Dovetail, each client also gets a joint. Chirograph never references Dovetail.

Packages

Package NuGet What it does
Chirograph nuget-Chirograph-badge The MSBuild SDK: the OpenApiClient item, the generator runs and the registration templates

Status

Extracted from LaunchPad's MSBuild SDK. See the plan for the design, the decisions and the milestones, and GLOSSARY.md for the vocabulary.

Contributing

mise install installs the toolchain, mise run build builds, tests and packs, and hk check lints. AGENTS.md has the repository's conventions.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETStandard 2.0

    • No dependencies.

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.1.1 42 11/17/2026
0.1.0 91 11/16/2026
0.0.10-beta.1 53 11/16/2026