BrighterTools.CodeGenerator
2.0.4
dotnet tool install --global BrighterTools.CodeGenerator --version 2.0.4
dotnet new tool-manifest
dotnet tool install --local BrighterTools.CodeGenerator --version 2.0.4
#tool dotnet:?package=BrighterTools.CodeGenerator&version=2.0.4
nuke :add-package BrighterTools.CodeGenerator --version 2.0.4
BrighterTools.CodeGenerator
BrighterTools.CodeGenerator is a shared .NET tool for BrighterTools-style application repos. It scaffolds and runs a repo-owned CodeGeneration workflow so generated code stays controlled by the consuming app, while the generator logic stays shared and versioned independently.
NuGet package:
What It Does
- Scaffolds a starter
CodeGenerationfolder with config and wrapper scripts. - Runs generation from a repo-owned
codegen.jsonfile. - Supports Windows, macOS, and Linux through PowerShell entrypoints, with Windows batch shims for convenience.
- Helps consuming repos verify generated output through cleanup, regeneration, and build steps.
- Uses deterministic generated file headers without per-run timestamps.
- Writes successful config-based generation runs to
CodeGeneration/generation-history.jsonl. - Aligns generated BrighterTools-style data layer patterns with the foundational
BrighterTools.Data.AbstractionsandBrighterTools.Data.EFCorepackages.
Install From NuGet
From the consuming repo root:
dotnet new tool-manifest
dotnet tool install BrighterTools.CodeGenerator
dotnet tool run brightertools-codegenerator -- init
pwsh ./CodeGeneration/GenerateCode.ps1
Commands
dotnet tool run brightertools-codegenerator -- initdotnet tool run brightertools-codegenerator -- generate --config CodeGeneration/codegen.jsondotnet tool run brightertools-codegenerator -- --config CodeGeneration/codegen.json
Cross-Platform Workflow
- Relative
--configpaths resolve from the current working directory. - Relative paths inside
codegen.jsonresolve from the folder containing that config file. - Consuming repos own their
CodeGenerationfolder, cleanup rules, verification rules, and wrapper scripts. - Windows
.batwrappers preferpwshand fall back to Windows PowerShell whenpwshis not installed. - Successful non-dry-run config-based generation writes a run-history entry beside
codegen.json.
Data Foundations
Generated repositories and services are intended to pair with the BrighterTools.Data.Abstractions and BrighterTools.Data.EFCore packages in consuming apps. The generator remains a build-time tool; the app still owns package references, DbContext design, tenancy, audit behavior, and persistence policy.
More Documentation
- usage.md for consuming-repo setup, config, and workflow details
- publishing.md for packaging and NuGet publishing
- RELEASE_NOTES.md for release history
| 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.
v2.0.4 - Data foundations documentation
Included:
- Documented how generated BrighterTools-style data layers pair with BrighterTools.Data.Abstractions and BrighterTools.Data.EFCore.
- Kept package, scaffold, and publishing metadata aligned for the next patch release.
Breaking changes:
- None.