Kanject.Cli
2.8.0
Prefix Reserved
dotnet tool install --global Kanject.Cli --version 2.8.0
dotnet new tool-manifest
dotnet tool install --local Kanject.Cli --version 2.8.0
#tool dotnet:?package=Kanject.Cli&version=2.8.0
nuke :add-package Kanject.Cli --version 2.8.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.8.0 | 50 | 12/2/2026 |
| 2.7.0 | 81 | 11/29/2026 |
| 2.6.1 | 128 | 11/25/2026 |
| 2.6.0 | 152 | 11/24/2026 |
| 2.5.0 | 185 | 11/16/2026 |
| 2.4.0 | 111 | 11/16/2026 |
| 2.3.0 | 144 | 11/15/2026 |
| 2.2.0 | 160 | 11/14/2026 |
| 2.1.0 | 117 | 11/13/2026 |
| 2.0.2 | 116 | 11/13/2026 |
| 2.0.1 | 109 | 11/13/2026 |
| 2.0.0 | 116 | 11/12/2026 |
| 1.5.1 | 139 | 11/11/2026 |
| 1.5.0 | 137 | 11/10/2026 |
| 1.4.0 | 121 | 11/4/2026 |
| 1.3.0 | 134 | 11/2/2026 |
| 1.2.0 | 168 | 11/1/2026 |
| 1.1.0 | 126 | 11/1/2026 |
| 1.0.79 | 136 | 10/30/2026 |
| 1.0.78 | 128 | 10/30/2026 |
- Declarative SNS to SQS subscriptions (`aws.subscriptions`).
- Services can declare SNS topic subscriptions (exact names or glob patterns) routed to a stage's SQS queue in `kanject-cli/manifest.json`; deploy discovers matching topics in the target account and region and renders the `AWS::SNS::Subscription` resources and queue policy statements into the stage template, with `--dry-run` parity and `kanject doctor` validation (`KANCLI1055`–`1061`).
- Deploy diagnostics, pre-build stage preflight, `--plan`, and `--json` for `kanject aws deploy`.
- Failed Lambda builds (`KANCLI113`, `KANCLI114`) now extract compiler and publish error lines, preserve the tail of stdout/stderr instead of truncating before the error, and write the full transcript under `.kanject/logs/`.
- CloudFormation deploy failures (`KANCLI200`) surface the earliest root-cause `*_FAILED` stack event and its `ResourceStatusReason` rather than only the logical resource ID.
- `--non-interactive` and non-TTY invocations emit quiet single-line phase progress instead of re-rendering Spectre live progress tables.
- Pre-build AWS stage preflight checks target-stage credentials (`KANCLI1040`), artifact bucket availability and region (`KANCLI1041`), and referenced external SNS topics (`KANCLI1042`, `KANCLI1043`) before Docker or Native AOT builds start, and runs under `kanject doctor --env`.
- Managed dependency sibling check (`KANCLI1044`) warns when a local sibling checkout is dirty or diverges from `manifest.lock.json` / `.kanject/cache/` under `--no-sync`.
- Native AOT container builds isolate their intermediate `obj/` directory from host builds (`KANCLI1045` when a project hardcodes `BaseIntermediateOutputPath`).
- `kanject aws deploy --plan` previews CloudFormation infrastructure changes via a temporary ChangeSet and deletes it without executing; `kanject aws deploy --json` emits a single secret-free `schemaVersion: 1` JSON document on stdout (implying `--non-interactive`).
- Manifest-driven `kanject run` defaults, `kanject init --scripts`, multi-repo workspaces, and TestTool preflight.
- `kanject run` synthesizes default `build`, `test`, `dev`, and per-entry `dev:<entry>` scripts directly from `kanject-cli/manifest.json` when `kanject-cli/scripts.json` does not define them (`KANCLI1050`, `KANCLI1051`), and `kanject init --scripts` materializes them into `kanject-cli/scripts.json`.
- Multi-repo `kanject-workspace.json` workspaces let `kanject run` target named services or run workspace-level scripts across repositories with alias and port conflict validation (`KANCLI1052`, `KANCLI1053`).
- `kanject test` checks for `Amazon.Lambda.TestTool` for the project's target framework and can auto-install the matching tool when missing (`KANCLI1054`).