Kanject.Cli
2.6.0
Prefix Reserved
dotnet tool install --global Kanject.Cli --version 2.6.0
dotnet new tool-manifest
dotnet tool install --local Kanject.Cli --version 2.6.0
#tool dotnet:?package=Kanject.Cli&version=2.6.0
nuke :add-package Kanject.Cli --version 2.6.0
Kanject.Cli
A single .NET global tool that drives C# AWS services from dotnet new to
kanject aws deploy --env prod — wrapping the existing dotnet/AWS toolchain so
your inner loop stays vanilla and the Lambda, ECS Fargate, static-site, and
coupled full-stack deploy plumbing disappears behind one committed manifest.
Install
dotnet tool install --global Kanject.Cli
Requires the .NET 10 SDK or later (the .NET 11 SDK installs its .NET 11 build). The aws, msbuild, and github providers ship
in the box — no extra installs.
Choose a workflow
- Deploy applications: Lambda, ECS Fargate, or a coupled SPA/backend. Choose independent service roots, a shared multi-Lambda stack, or a coordinated frontend/backend pair.
- Publish libraries:
kanject packages init, thenkanject packages planandkanject packages verifyfrom the package repository root. - Distribute desktop apps: initialize the product manifest, register with
kanject add distributable, and configure delivery destinations.
Start at Getting started for workflow selection. Service commands run from the directory containing that service's manifest, which can differ from the repository or solution root. The current static-site shape requires a coupled backend.
Discover commands with kanject --help and kanject aws --help.
What it does
- Bootstrap —
kanject newscaffolds a project from a bundled template and initializes it;kanject initadds the manifest, stage files and lock file to an existing project. - Deploy —
kanject aws deploy --env <stage>resolves cross-repo dependencies and env, builds the provider artifacts, and ships the manifest's target (Lambda, ECS Fargate, static site, or a coupled backend + site), recording every release in an S3 deployment ledger. - Rollback —
kanject aws rollback --env prodshows the last 10 deployments with dates, statuses, targets, and commit summaries; pick one and Kanject does the target-native promotion with the prior artifact still immutable in S3/ECR. - And more — cross-repo dependency sync, a local test runner, env/param/secret
management, static-site previews and ephemeral backend previews
(
kanject aws deploy --preview <NAME>), DynamoDB change feeds, a managed streaming Function URL and CloudFront edge, VPC & custom-domain wiring, multi-function services, AWS-native pipeline scaffolding, NuGet package publishing, desktop distribution, and sign-in for paid Kanject packages (kanject login,kanject add package).
It invokes — never replaces — dotnet new, dotnet build, and dotnet lambda, and drives AWS services through their SDK APIs (including
CloudFormation change sets). The dotnet-native experience stays; kanject only
owns the AWS plumbing that doesn't have a great answer in the box.
Learn more
- Getting started: kanject.com/docs/getting-started
- Website: kanject.com/cli
- In-tool help:
kanject --help,kanject aws --help
License
Commercial — governed by the Kanject Code Libraries License Agreement (KCLLA);
see the bundled LICENSE.md. © Kanject Business Solutions.
| 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. net11.0 is compatible. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.6.0 | 0 | 11/24/2026 |
| 2.5.0 | 139 | 11/16/2026 |
| 2.4.0 | 100 | 11/16/2026 |
| 2.3.0 | 125 | 11/15/2026 |
| 2.2.0 | 144 | 11/14/2026 |
| 2.1.0 | 106 | 11/13/2026 |
| 2.0.2 | 111 | 11/13/2026 |
| 2.0.1 | 103 | 11/13/2026 |
| 2.0.0 | 108 | 11/12/2026 |
| 1.5.1 | 129 | 11/11/2026 |
| 1.5.0 | 128 | 11/10/2026 |
| 1.4.0 | 111 | 11/4/2026 |
| 1.3.0 | 125 | 11/2/2026 |
| 1.2.0 | 161 | 11/1/2026 |
| 1.1.0 | 119 | 11/1/2026 |
| 1.0.79 | 115 | 10/30/2026 |
| 1.0.78 | 106 | 10/30/2026 |
| 1.0.77 | 112 | 10/29/2026 |
| 1.0.76 | 106 | 10/29/2026 |
| 1.0.75 | 104 | 10/29/2026 |
- Native AOT deploys build in the registry's current SAM build image.
lambda-tools starts the build container with a plain `docker run`, so `kanject aws deploy` built a Native AOT entry in whatever `public.ecr.aws/sam/build-dotnet<N>:latest-<arch>` Docker had cached, however old. That image's SDK chooses the .NET runtime the binary links, and NuGet audit never sees it. An image cached before 2026-10-30 kept shipping .NET 10.0.13's vulnerable Brotli decoder (GHSA-p3jp-9v83-76w9), with no warning (proposal 0038 §6.1).
- When the image is cached, the deploy now compares its digest with the registry's before anything builds. It reads metadata only (`docker buildx imagetools inspect`) and runs `docker pull` only when the digests differ. A machine that is up to date downloads nothing, and a fresh machine or CodeBuild host makes no extra call.
- The deploy's closing notes name the image's .NET version and build date, and say when it was pulled.
- When the registry can't be read (offline, or no `docker buildx`) or the pull fails, the deploy builds in the cached image and warns `KANCLI586`, naming both versions and the `docker pull` to run.
- `kanject doctor --env` shows the cached image's .NET version on each Native AOT row, and warns `KANCLI586` when the next deploy would pull. It never pulls.
- A `.deb` built by the desktop release kit gives the app's window its own icon in the dock.
The kit's Linux phase wrote `/usr/share/applications/<product id>.desktop` with no `StartupWMClass`. A desktop shell matches a running window to a launcher entry by that value or by the file's base name, and a .NET desktop app's window class is its entry assembly's name, not the product id. Nothing matched, so the launcher had the product's icon and the running window showed GNOME's generic one.
- The entry now carries `StartupWMClass=<KANJECT_LINUX_ENTRYPOINT>`, the published executable's file name. No new `release.env` key. An app that sets its own window class edits the line in the kit's `LinuxPackager.cs`.
- A kit scaffolded before this release keeps the old entry. `kanject configure distribution scaffold` never overwrites a kit, so add the line to the existing `LinuxPackager.cs` or regenerate the kit.
- The tool package no longer carries debug symbols.
`Kanject.Cli` shipped a `.pdb` beside each of its own assemblies and each bundled provider's assembly, 22 files across the `net10.0` and `net11.0` builds. They are left out now: the download drops from 22.8 MB to about 20 MB and the installed tool is about 4.6 MB smaller.
- A stack trace from an installed tool still names every method, without file and line numbers.
- Signed provider manifests list only the files that ship, so they no longer list a `.pdb`.
- The Lambda templates leave .NET 8, which left support on 2026-11-10.
`net10.0` is now every Lambda template's default and the only framework they offer on a managed Lambda runtime.
- `webapi`, `tasks`, `instant-messaging` and `file-server` defaulted to `net8.0`; they now default to `net10.0` on the `dotnet10` runtime, like `minimal-api`. `--framework net8.0` is refused by `kanject new` and `kanject add function`. `webapi`, `tasks` and `instant-messaging` still offer `net11.0` as a container image, so they still ask for a version; `minimal-api` and `file-server` offer `net10.0` alone, and `kanject new` no longer asks for one there.
- An image scaffold on `net10.0` builds from `public.ecr.aws/lambda/dotnet:10-arm64`. The `source-generator` attributes project targets `netstandard2.0;net10.0` (was `netstandard2.0;net8.0;net9.0`).
- `packages smoke feed`, `packages smoke restore` and `packages release stage` build their throwaway consumers at `net10.0` unless `--tfm` says otherwise. The `net8.0` default could not restore a package that ships no `net8.0` assets, as the Kanject Core 4.0 libraries do.
- `kanject distribution scaffold` writes a release-kit router targeting `net10.0`, and `kanject add distributable --scaffold-archive` writes an archive helper targeting `net10.0` with `RollForward=LatestMajor`. Kits already in a repository are yours and stay as they are; retarget their projects by hand.
- Native AOT build-input verification is tested against images from the .NET 11 ILCompiler, which use the .NET 10 encoding; the error for an undecodable image names .NET 8 to 11.
- Unchanged: a project you deploy or test that targets `net8.0` still maps to the `dotnet8` Lambda runtime and its test tool, so existing functions can be redeployed. Retarget them to `net10.0` before AWS stops accepting `dotnet8`.
- A release run no longer dies on a stray 304, a lapsed read token, or an uncoded planner crash.
Kanject Core's waves of 2026-11-20 and 2026-11-21 needed six reruns for these three reasons (proposal 0064 P1 and P2).
- A version listing or service-index read that gets HTTP 304 Not Modified is retried like a 503. The plan sends no validators, so the 304 came from the feed or a proxy in front of it. If the retries run out, the message says that.
- CodeArtifact read routes renew their 15-minute token when fewer than two minutes remain, and once more if the feed answers 401. This covers the bump plan's feed reads and the publish preflight. A re-mint that finds the AWS session expired fails `KANCLI566`. A 401 or 403 that survives a fresh token fails `KANCLI544` with a credentials remedy instead of the feed-configuration one.
- The plan's restores keep a valid token too. NuGet holds a config's token for the whole restore, so the config is rewritten before each attempt with a token that has at least 12 minutes left, longer than any restore attempt may run. A restore NuGet reports as refused gets a fresh token and runs once more.
- A fixed-point probe that throws an unexpected exception, such as the `NullReferenceException` seen in concurrent probing, now fails `KANCLI544`. The message names the package and the probe slot, and points to a crash report under `~/.kanject/package-bump-cache/crashes/` with the full exception. `KANJECT_BUMP_PLAN_SLOTS=1` is still the workaround while the cause is found.