Pdk.Cli
0.1.0.6
dotnet tool install --global Pdk.Cli --version 0.1.0.6
dotnet new tool-manifest
dotnet tool install --local Pdk.Cli --version 0.1.0.6
#tool dotnet:?package=Pdk.Cli&version=0.1.0.6
nuke :add-package Pdk.Cli --version 0.1.0.6
Prime Development Kit (PDK)
Build enterprise applications from metadata, not boilerplate.
PDK is an early preview targeting .NET 10. Platform definitions and platform scaffolding are available, while service/API generation and frontend support are still under development.
Prime Development Kit is an opinionated .NET development platform for describing enterprise applications with strongly typed metadata and generating repeatable infrastructure from those definitions.
PDK separates application structure from application behavior:
- Definitions own structure. C# definitions describe platforms, services, entities, infrastructure choices, capabilities, permissions, and security.
- Code owns behavior. Developers write domain rules and application logic in developer-owned files.
- Generated code is disposable. Generated files are not edited manually and can be recreated from definitions.
The architectural direction combines microservice boundaries, vertical slices, metadata-driven generation, and eventually metadata-driven Angular UI support. See the architecture reference for accepted principles and decisions.
What Works Today
The current preview provides:
- A strongly typed platform, service, and entity definition model
- Platform metadata for database, messaging, caching, and observability choices
- Reusable entity profiles and capability interfaces
- Permission and security metadata abstractions
- Structured diagnostics for invalid definitions
- A .NET tool that scaffolds a platform solution with
pdk new platform - Runtime abstractions built around Entity Framework Core
The generated platform scaffold contains Core, Platform, Shared, and Contracts projects. Selected built-in and business services are currently generated as service definitions, not complete deployable microservices.
Quick Start
Install the CLI from NuGet:
dotnet tool install --global Pdk.Cli
Create a platform:
pdk new platform Sales PdkSample.Sales
The command asks you to select a database provider, optional built-in service definitions, and business-service names. It then creates and builds the platform solution.
Sales/
|-- Readme.md
`-- src/
|-- Sales.sln
`-- Platform/
|-- PdkSample.Sales.Contracts/
|-- PdkSample.Sales.Core/
|-- PdkSample.Sales.Platform/
`-- PdkSample.Sales.Shared/
Continue with Getting Started or see the complete PDK CLI Guide.
Definition Model
PlatformDefinition is the composition root. It configures platform information,
infrastructure defaults, and registered services.
public sealed class SalesPlatform : PlatformDefinition
{
public override void Configure()
{
Platform(platform => platform
.Name("Sales")
.RootNamespace("PdkSample.Sales")
.DisplayName("Sales Platform"));
Infrastructure(infrastructure => infrastructure
.DefaultDatabase(DatabaseProvider.PostgreSql)
.MessageBroker(MessageBroker.RabbitMq)
.Cache(CacheProvider.Redis)
.OpenTelemetry());
Services(services =>
{
services.Add<CustomerService>();
});
}
}
A service defines its entities, dependencies, and security metadata:
public sealed class CustomerService : ServiceDefinition
{
protected override void Configure()
{
Entities(entities =>
{
entities.DefaultProfile(EntityProfiles.ConcurrentHistory);
entities.Entity("Customer")
.Table("Customers");
});
}
}
The intended metadata flow is:
PlatformDefinition
`-- Platform metadata and infrastructure
`-- ServiceDefinition
|-- Entities and profiles
|-- Dependencies
`-- Security and permissions
`-- Validated metadata
`-- Generators and runtime integration
The definition APIs are active but still evolving. Definition compatibility is the primary stability goal as described in ADR-001.
Architecture
PDK follows these core principles:
- Strongly typed definitions are the structural source of truth.
- Business behavior remains handwritten.
- Generated artifacts are deterministic and disposable.
- Partial and companion files protect developer-owned code.
- Strong conventions provide consistent microservice and vertical-slice structure.
- CLI and build generation use the same metadata pipeline.
- Invalid definitions should produce actionable diagnostics before generation.
Read the full architecture principles and architecture decision records.
Projects
| Project | Purpose | Status |
|---|---|---|
Pdk.Core |
Runtime abstractions, entity capabilities, request context, and security primitives | Preview |
Pdk.Definitions |
Strongly typed platform, service, entity, and diagnostic metadata APIs | Preview |
Pdk.Cli |
CLI commands, project scaffolding, templates, and discovery infrastructure | Platform scaffolding available |
Pdk.Data |
Shared persistence integration | Placeholder |
Pdk.Data.SqlServer |
SQL Server persistence provider | Placeholder |
Pdk.Data.PostgreSQL |
PostgreSQL persistence provider | Placeholder |
Pdk.Data.Oracle |
Oracle persistence provider | Placeholder |
Libraries
Used by Current Source
| Library | Usage |
|---|---|
| .NET 10 | Target runtime and SDK |
| Entity Framework Core | Runtime data abstractions and metadata discovery |
| Ardalis.SmartEnum | Strongly typed provider definitions |
| System.CommandLine | CLI parsing and invocation |
| Spectre.Console | Interactive CLI prompts and output |
| Scriban | Source and project templates |
| YamlDotNet | YAML configuration serialization |
| Microsoft.Build | Solution and project integration |
| Microsoft.Extensions | Hosting, dependency injection, configuration, and logging |
Tests use xUnit, FluentAssertions, and coverlet.
Planned Application Stack
The architectural roadmap includes FastEndpoints, FluentValidation, Riok.Mapperly, QueryKit, MassTransit, OpenTelemetry, Angular, and PrimeNG. These libraries are not all integrated into active generators yet and may change as the related architecture decisions are completed.
Preview Status
| Capability | Status |
|---|---|
Platform scaffolding with pdk new platform |
Available |
| Platform/service/entity definition APIs | Preview |
| Definition diagnostics | Preview |
| Service project and API generation | In development |
| Metadata export | Experimental |
| Provider-specific persistence generation | Planned |
| Angular and PrimeNG UI generation | Planned |
| Deployment generation | Planned |
Commands other than pdk new platform may be incomplete during the preview.
Review the Getting Started limitations
before adopting PDK in a production workflow.
Documentation
- Getting Started
- Architecture
- PDK CLI Guide
- Entity Feature and Capability Guide
- Security Capability Guide
- PDK and AI Code Generation
Build and Test
dotnet build PDK.sln
dotnet test tests/Pdk.Core.UnitTests/Pdk.Core.UnitTests.csproj
dotnet test tests/Pdk.Definitions.UnitTests/Pdk.Definitions.UnitTests.csproj
Contributing
PDK is under active development. Contributions are welcome for bug fixes, tests, documentation, definition APIs, generators, and architecture proposals.
For significant changes, review the architecture reference and add or update an ADR when the change introduces a durable architectural decision.
Repository: github.com/pdklib/Pdk
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
This package has no dependencies.