Template sets
A template set is a NuGet package that tells Burgr what code to generate from a model. The set decides the architecture, the language and the harness for AI agents. Burgr itself has none.
Catalog
Burgr.Templates.Mini
The default set
One project: ASP.NET Core Minimal API, DTOs, EF Core DbContext, CRUD endpoints. No framework of its own. Public packages only.
Burgr.Templates.Onion
Domain, Application, Infrastructure, Api and Tests projects, a class diagram, rights, rules, factories, events, paged queries, plus a light framework generated as *.f.cs.
The list is read from the NuGet search API for the tag burgr-templates. Sets are listed by tag, not reviewed by SolidOps. A set is text templates and a manifest: Burgr takes nothing else from the package, and loads generator code only from the assemblies you configure yourself. But a set decides what is written into your repository: the code you will build and run, and, with /harness:, a hook script for your AI agent. Read a set before you use it.
Use one
Without any configuration, Burgr uses Mini. To pick another set, or to pin a version, name the package in burgr.json:
{
"ProjectName": "Library",
"NamespaceName": "Acme",
"BuildingDirectory": "../src/",
"TemplatePackage": { "Id": "Burgr.Templates.Onion", "Version": "1.10.3" }
}
Burgr downloads the package once, from nuget.org, and reads its templates/ folder. dotnet burgr specs/ /harness:. also installs the AI harness the set ships. A model that uses a feature the set does not support is refused, with the name of the feature.
Write your own
- A set is a folder of templates and a
burgr.yamlper folder that maps logical names to source files and destinations. Templates are plain code with loop markers and placeholders, in any language. - A
burgr-templates.jsonat its root describes it: description, the model features it supports, the packages the generated code needs, the folder of its harness, a project file. - Pack it as a NuGet package and give it the tag
burgr-templates: it then appears in the catalog above. - Pick a licence that lets users own the generated code. The published sets use MIT-0, which requires no attribution.
- Keep to the split between generated code and framework: the generated code carries what varies from one model to the next, the framework what is identical for every entity. More on the split and on the harness.
Reference: Writing templates and Template sources in the README. The sources of Mini and Onion are in the repository.