BrighterTools.CodeGenerator 2.0.5

dotnet tool install --global BrighterTools.CodeGenerator --version 2.0.5
                    
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.5
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=BrighterTools.CodeGenerator&version=2.0.5
                    
nuke :add-package BrighterTools.CodeGenerator --version 2.0.5
                    

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

Build/test this repository with stable .NET SDK 10.0.401 or a newer stable .NET 10 feature band (selected by global.json). CI audits direct and transitive dependencies and fails on vulnerability warnings. MSBuild stays at 18.9.6 because 18.10 targets .NET 11; this is intentional, not an overlooked security update.

After packing, validate the actual tool artifact with pwsh ./tests/Test-PackedTool.ps1 -PackageDirectory ./artifacts/nuget. It uses an isolated local feed/cache and temporary fixture, checks SQL Server defaults and repeatable generation, and never writes generated output into a consuming app.

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.5 103 9/17/2026
2.0.4 149 7/15/2026
2.0.3 121 7/13/2026
2.0.0 124 7/13/2026
1.0.0 126 7/7/2026

v2.0.5 - Update compatible stable dependencies and .NET 10 servicing. Retain MSBuild 18.9.6 for net10.0, runtime loading configuration and SQL Server templates. Audit transitive packages and smoke-test the installed packed tool.