Bennewitz.Ninja.Templates 2026.4.1201

Prefix Reserved
dotnet new install Bennewitz.Ninja.Templates@2026.4.1201
                    
This package contains a .NET Template Package you can call from the shell/command line.

Bennewitz.Ninja.Templates

dotnet new templates for Bennewitz.Ninja repositories: a NuGet package published through Trusted Publishing (OIDC), with no long-lived API key anywhere, and four kinds of app. Every repository they generate builds with warnings as errors, passes its own tests, and meets the family's repository conventions from its first commit.

dotnet new install Bennewitz.Ninja.Templates
Template Generates Releases to
bbpkg A class library and its tests, packed and guarded; --analyzer makes it a Roslyn analyzer package instead, with a sample rule, the analyzer's guard tests, and --rule-prefix for its rules' IDs nuget.org, through trusted publishing
bbavalonia An Avalonia desktop app: MVVM, the Semi theme, named controls and headless UI tests, published trimmed and single-file against a warning baseline GitHub Releases, one binary per runtime
bbweb A Kestrel web site on MVC views, with /healthz and /version; --blazor adds interactive server components GitHub Releases, single-file per runtime; a container image built in CI
bbapi A Kestrel API on minimal APIs with OpenAPI, compiled with native AOT GitHub Releases, native per runtime; a chiseled container image built in CI
bbconsole A console app with an example command, tested by running the executable for its exit codes and streams, published trimmed and single-file with trim warnings as errors GitHub Releases, one binary per runtime
dotnet new bbpkg -n Widget --RepoOwner JanusMael
dotnet new bbpkg -n Linter --RepoOwner JanusMael --analyzer --rule-prefix BNLN
dotnet new bbavalonia -n Notebook --RepoOwner JanusMael
dotnet new bbweb -n Gallery --RepoOwner JanusMael --blazor
dotnet new bbapi -n Catalog --RepoOwner JanusMael
dotnet new bbconsole -n Tally --RepoOwner JanusMael

Every app starts through one entry point, Bennewitz.Ninja.AppServices.EntryPoint: an unhandled exception is reported on stderr and exits 1, --version prints the release version, and a console app exits 2 on a usage error and 130 on Ctrl+C. It is a package rather than template text, so a fix reaches every app already generated with a package update.

⚠ -n takes the unprefixed stem. -n Widget produces assembly Widget and package id Bennewitz.Ninja.Widget, which is the convention across these repos. Passing the full id instead doubles the prefix in the namespace. An app's repository is named after the app, so the app templates default --RepoName to -n; pass it when the repository is named otherwise.

⭐ The package id is plural because a template package is a container: every template ships inside this one package rather than claiming an id of its own.

What comes with every template

ci.yml build, test and the conventions check on every push; the apps add a trimmed publish or a container build
release.yml tag-triggered release; bbpkg's starts with a credential preflight that logs in to NuGet.org and stops
packages.push / packages.local what publishes, and what packs but must never reach nuget.org. Empty in an app, so a library added later is guarded from its first commit
AGENTS.md, PROGRESS.md, .github/repository.json the family's documents and settings, checked by scripts/repo-conventions.cs
docs/publishing.md or docs/releasing.md the runbook: for bbpkg the policy fields, the version rule and what to check after; for an app, the per-runtime release

A repository that reads an upstream library's source adds one thing no template ships: the reference/ kit, which fetches read-only checkouts of the upstreams at the commits their packages were built from. Every template's AGENTS.md says how to adopt it.

The two things that cost a real release

Both were learned the expensive way on Bennewitz.Ninja.XamlQuality 2026.3.920, and both are encoded here rather than left to memory.

One trusted-publishing policy, never one per package id. NuGet.org mints one API key per token exchange, scoped to one matching policy. Two policies matching the same repository and workflow means one is chosen and the other's package is rejected 403 — after the first has already published permanently. A single policy carries as many glob patterns as the pushable set needs.

Packed is not pushable. dotnet pack over a solution can produce packages that must stay private. The push names every id explicitly and a test asserts the packed set equals packages.push ∪ packages.local, so a new packable project fails the build until somebody classifies it — loudly and early, rather than permanently and late.

Licence

MIT. See LICENSE.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2026.4.1201 75 12/1/2026
2026.4.1126 116 11/26/2026
2026.4.1119 124 11/19/2026
2026.4.1116 118 11/16/2026
2026.4.1114 125 11/14/2026
2026.4.1113 116 11/13/2026
2026.4.1111 120 11/11/2026
2026.4.1109 136 11/9/2026
2026.4.1103 129 11/3/2026
2026.4.1031 153 10/31/2026
2026.4.1030 140 10/30/2026
2026.4.1029 144 10/29/2026
2026.4.1023 152 10/23/2026
2026.4.1022 151 10/22/2026
2026.3.1001 188 10/1/2026
2026.3.928 180 9/29/2026
2026.3.925 195 9/25/2026
2026.3.924 192 9/24/2026
2026.3.923 180 9/23/2026
2026.3.922 196 9/22/2026
Loading failed