Kanject.Cli.Templates 1.0.75

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

Kanject Project Templates

The dotnet new templates for Kanject services, all free. This pack ships inside the Kanject.Cli dotnet-tool package — kanject new installs it automatically from the local bundle, so no NuGet feed access is required. It is also published to nuget.org as Kanject.Cli.Templates.

Templates

kanject new alias dotnet-new short name What you get
webapi kbs-lambda-netcore-api-free REST API with ASP.NET Core on AWS Lambda
minimal-api kbs-lambda-netcore-minimalapi-free Minimal ASP.NET Core API on AWS Lambda
tasks kbs-lambda-tasks-free Background tasks using Lambda Annotations
instant-messaging kbs-lambda-instant-messaging-free Chat API on AWS Lambda, optional WebSocket Connect¹
file-server kbs-lambda-netcore-fs-free File-server API on Kanject storage providers¹
source-generator kbs-source-gen-free Roslyn source generator + annotations

¹ Builds on paid Kanject libraries (Kanject.InstantMessaging, Kanject.Identity, Kanject.ServerlessEventHub; Kanject.FileServer) that only the Kanject subscription feeds serve. The template is free; building the generated project needs a subscription. Every other template uses only the public Kanject.Core.* libraries on nuget.org.

Until 1.0.53 the last three were paid, in the subscriber pack Kanject.Project.Templates.Aws (kanject-core-dotnet-sdk). That pack is retired; kanject new no longer uses it.

Maintaining this pack

  • Content lives under Templates/content/<TemplateName>/; each template's metadata is in .template.config/template.json. Identities and short names carry a .Free / -free suffix so this pack can coexist with the retired subscriber pack, which reuses the bare names, on machines that still have it installed.

  • Every template here must be in the AWS plugin's catalogue (AwsKanjectPlugin.Templates, its FreeShortName) and vice versa, and its catalogue entry's SubscriptionLibraries must list exactly the paid (non-Kanject.Core.*) library families it references; BundledTemplateOutputTests checks both.

  • Pin Kanject.Core.* to versions published on nuget.org, so the free-library templates restore with nuget.org as the only source.

  • Open Kanject.Cli.Templates.slnx at the repo root to edit template content with full IDE support. Building the solution requires access to the Kanject package feeds (template content references Kanject.Core.*).

  • The pack is built automatically by the LayOutBundledTemplates target in src/Kanject.Cli/Kanject.Cli.csproj, which stamps the CLI's own version on the nupkg and lays it under tools/<tfm>/any/templates/ of the tool package.

  • This pack is the source of truth for every template. The kanject-core-dotnet-sdk repo's Templates/content/ holds the retired subscriber pack's older copies; don't pull changes from them.

  • Every template generates a root <sourceName>.slnx listing all of its projects; wrap the test project in ``.

  • sources.exclude replaces dotnet new's default excludes, so it must list **/.template.config/**, or the engine's config is copied into every generated service.

  • Keep each Lambda entry's base SAM template as serverless.template and map it to template.json with sources.rename: dotnet new treats any nested template.json in a pack as a template manifest and prints "Failed to load template" for it. aws-lambda-tools-defaults.json names template.json, and its s3-bucket, region, profile, stack-name, function-name and environment-variables stay empty (kanject init imports non-empty ones as the dev stage's settings, into every generated service).

  • BundledTemplateOutputTests scaffolds every template here with the real dotnet new and checks those rules. It also builds what minimal-api generates, from nuget.org, and what instant-messaging generates (Api, Connect Lambda and tests, with no warning from the template's own files). It then starts the instant-messaging Api, with its container validated and every controller resolvable, against a local stand-in for AWS, since the Api's registrations call DynamoDB. Those tests restore the paid packages from the subscription feed, which the release Build cannot read, so they run only when KANJECT_SUBSCRIPTION_NUGET_CONFIG names a NuGet config that reaches that feed and nuget.org. Run them whenever the template's pins or wiring change:

    KANJECT_SUBSCRIPTION_NUGET_CONFIG="$HOME/.nuget/NuGet/NuGet.Config" dotnet test Tests/Kanject.Cli.Tests --filter Instant_messaging
    
  • instant-messaging pins Kanject.InstantMessaging 4.0 with the Identity and ServerlessEventHub packages published beside it (the Api and the Connect Lambda both on Kanject.InstantMessaging.Provider.AwsV2, the provider the API Gateway chat hub is built for), and Kanject.Core.Queue.Provider.AwsSqs 4.0.2, which InstantMessaging 4.0 needs (a lower pin fails restore with NU1605). Take new versions from the BaaS repo's Directory.Packages.props at the wave that published them, and move them together.

  • net8.0

    • 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
1.0.75 0 10/29/2026
1.0.74 0 10/28/2026
1.0.73 0 10/28/2026
1.0.72 0 10/28/2026
1.0.71 39 10/28/2026
1.0.70 43 10/27/2026
1.0.69 42 10/27/2026
1.0.68 55 10/26/2026
1.0.67 91 10/25/2026
1.0.66 87 10/24/2026
1.0.65 81 10/24/2026
1.0.64 88 10/24/2026
1.0.63 98 10/24/2026
1.0.62 93 10/24/2026
1.0.61 90 10/23/2026
1.0.60 96 10/22/2026
1.0.59 90 10/21/2026
1.0.58 90 10/21/2026
1.0.57 92 10/21/2026
1.0.56 86 10/21/2026
Loading failed