BrighterTools.CodeGenerator 2.0.4

dotnet tool install --global BrighterTools.CodeGenerator --version 2.0.4
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local BrighterTools.CodeGenerator --version 2.0.4
                    
This package contains a .NET tool you can call from the shell/command line.
#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 CodeGeneration folder with config and wrapper scripts.
  • Runs generation from a repo-owned codegen.json file.
  • 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.Abstractions and BrighterTools.Data.EFCore packages.

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 -- init
  • dotnet tool run brightertools-codegenerator -- generate --config CodeGeneration/codegen.json
  • dotnet tool run brightertools-codegenerator -- --config CodeGeneration/codegen.json

Cross-Platform Workflow

  • Relative --config paths resolve from the current working directory.
  • Relative paths inside codegen.json resolve from the folder containing that config file.
  • Consuming repos own their CodeGeneration folder, cleanup rules, verification rules, and wrapper scripts.
  • Windows .bat wrappers prefer pwsh and fall back to Windows PowerShell when pwsh is 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

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
2.0.4 110 7/15/2026
2.0.3 103 7/13/2026
2.0.0 105 7/13/2026
1.0.0 109 7/7/2026

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.