LicenseKit 1.0.0

dotnet add package LicenseKit --version 1.0.0
                    
NuGet\Install-Package LicenseKit -Version 1.0.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="LicenseKit" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LicenseKit" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="LicenseKit" />
                    
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 LicenseKit --version 1.0.0
                    
#r "nuget: LicenseKit, 1.0.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 LicenseKit@1.0.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=LicenseKit&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=LicenseKit&version=1.0.0
                    
Install as a Cake Tool

LicenseKit

First-party .NET SDK for licensekit.dev.

It provides Management, Runtime, and System clients for the LicenseKit licensing API, including reporting and frozen export operations, plus least-privilege scope metadata and Ed25519 runtime-signature verification helpers for activation, validation, metering, and offline-aware license flows.

Links:

  • website: https://licensekit.dev
  • agent quickstart: https://licensekit.dev/docs/agent-quickstart
  • API contract notes: https://licensekit.dev/docs/api-contract
  • OpenAPI spec: https://licensekit.dev/openapi.yaml
  • LLM reference: https://licensekit.dev/llms.txt

Install

dotnet add package LicenseKit

Quick Start

using LicenseKit;

var baseUrl = "https://api.licensekit.dev";

var system = new SystemClient(new SystemClientOptions
{
    BaseUrl = baseUrl
});

var health = await system.HealthAsync();
Console.WriteLine(health.Data?["status"]?.GetValue<string>());

var management = new ManagementClient(new ManagementClientOptions
{
    BaseUrl = baseUrl,
    Token = Environment.GetEnvironmentVariable("LICENSEKIT_MANAGEMENT_TOKEN")!
});

var product = await management.CreateProductAsync(new OperationRequest
{
    Body = new
    {
        name = "Example App",
        code = "example-app"
    }
});

var runtime = new RuntimeClient(new RuntimeClientOptions
{
    BaseUrl = baseUrl,
    LicenseKey = Environment.GetEnvironmentVariable("LICENSEKIT_LICENSE_KEY")!
});

var result = await runtime.ValidateLicenseAsync(new OperationRequest
{
    Body = new
    {
        fingerprint = "host-123"
    }
});

var publicKeys = await system.ListPublicKeysAsync();
var verified = Verification.VerifyRuntimeResult(
    result,
    PublicKeyStore.FromManagementResult(publicKeys)
);

Console.WriteLine(product.Data?["id"]?.GetValue<string>());
Console.WriteLine(verified.Ok);

Client Surfaces

  • ManagementClient Uses Authorization: Bearer <token> for /api/v1/... management operations, including /api/v1/activities and /api/v1/reports/....
  • RuntimeClient Uses Authorization: License <license-key> for /api/v1/license/... runtime operations.
  • SystemClient Unauthenticated access to /health, /healthz, /readyz, /metrics, and /api/v1/system/public-keys.

Hosted deployments should prefer /health for liveness checks behind api.licensekit.dev. /healthz remains available for local and self-hosted compatibility.

Scope Metadata

var scopes = Scopes.GetRequiredScopes(OperationIds.CreateProduct);
var allowed = Scopes.HasRequiredScopes(
    OperationIds.CreateProduct,
    new[] { ManagementScopeNames.ProductWrite }
);

Raw Response Access

Each client exposes a Raw companion for callers that need status codes and headers.

var system = new SystemClient(new SystemClientOptions
{
    BaseUrl = "https://api.licensekit.dev"
});

var ready = await system.Raw.ReadyzAsync();
Console.WriteLine(ready.StatusCode);
Console.WriteLine(ready.Data.Data?["status"]?.GetValue<string>());

This is useful for readiness checks, because GET /readyz may legitimately return 503 with a structured JSON body instead of an error envelope.

management.DownloadReportExportAsync(...) returns raw bytes so JSON, CSV, and PDF report snapshots can all be handled without assuming a single response schema. Use management.Raw.DownloadReportExportAsync(...) when you also need the response headers to branch on Content-Type.

Development

Regenerate the client metadata from the checked-in OpenAPI snapshot:

ruby scripts/generate_from_openapi.rb

Build, test, and pack:

dotnet test
dotnet pack src/LicenseKit/LicenseKit.csproj -c Release

Generation uses the checked-in OpenAPI snapshot at openapi/openapi.yaml.

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
1.0.0 92 4/18/2026
0.1.0-alpha.1 51 4/8/2026