Kanject.Cli
2.3.0
Prefix Reserved
See the version list below for details.
dotnet tool install --global Kanject.Cli --version 2.3.0
dotnet new tool-manifest
dotnet tool install --local Kanject.Cli --version 2.3.0
#tool dotnet:?package=Kanject.Cli&version=2.3.0
nuke :add-package Kanject.Cli --version 2.3.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.5.0 | 103 | 11/16/2026 |
| 2.4.0 | 93 | 11/16/2026 |
| 2.3.0 | 113 | 11/15/2026 |
| 2.2.0 | 128 | 11/14/2026 |
| 2.1.0 | 96 | 11/13/2026 |
| 2.0.2 | 102 | 11/13/2026 |
| 2.0.1 | 94 | 11/13/2026 |
| 2.0.0 | 100 | 11/12/2026 |
| 1.5.1 | 123 | 11/11/2026 |
| 1.5.0 | 121 | 11/10/2026 |
| 1.4.0 | 106 | 11/4/2026 |
| 1.3.0 | 119 | 11/2/2026 |
| 1.2.0 | 157 | 11/1/2026 |
| 1.1.0 | 115 | 11/1/2026 |
| 1.0.79 | 111 | 10/30/2026 |
| 1.0.78 | 101 | 10/30/2026 |
| 1.0.77 | 108 | 10/29/2026 |
| 1.0.76 | 102 | 10/29/2026 |
| 1.0.75 | 100 | 10/29/2026 |
| 1.0.74 | 101 | 10/28/2026 |
- `kanject run` lists and runs the scripts a repository declares (proposal 0060 P1).
A repository's developer scripts (a guarded smoke run, a VM test run, a rule check) were found by reading a folder or a house-rules file, and what each one needs showed only when it ran. A repository now names them in `kanject-cli/scripts.json`, and one command answers "what can I run here, and how?" in every Kanject repository, including library repositories with no manifest.
- `kanject run` lists the scripts with their descriptions and, where one takes arguments, the full invocation (`kanject run smoke -- <apphost> <scratch-dir> <seconds>`). A script that cannot run on this operating system is still listed, marked with the one it needs.
- `kanject run <NAME> [-- <ARGS>]` starts one with the terminal's own input and output and exits with the script's exit code. Arguments after `--` reach the script as separate arguments, unchanged: `run` is an argument list, not a shell string.
- `--explain` shows the resolved program, the argument list and what each requirement resolved to, without running anything. `--cwd <DIR>` starts the search elsewhere; the nearest scripts file up to the git root wins.
- Coded refusals before anything starts, `KANCLI1000`–`KANCLI1005`, the first codes of a new band from 1000: an invalid file, an unknown name (with the nearest one suggested), the wrong operating system, a tool that is not on `PATH`, an unsafe argument to a batch file on Windows, and a program that cannot be started. All six exit 125, so a caller can tell "the script never started" from a script's own exit code. This is the one command where a coded failure does not exit 1.
- Cancelling lets the script clean up. Ctrl+C reaches the script from the terminal and the CLI waits for it; a termination sent to the CLI alone is passed on. Only after 30 seconds, or on a second Ctrl+C, does the CLI end the process tree, and it says so (exit 130 or 143).
- A bare program name is looked up on `PATH` only, never in the current folder, and the CLI starts the absolute path it resolved.
- Nothing else reads the file. No other command and no generated git hook starts a script, and an older CLI never sees `scripts.json`. `kanject doctor` does not validate it yet, and there is no editor schema or name completion.
- The batch-file rule on Windows (`KANCLI1004`) is built from documented Windows behaviour and has not been run on a Windows machine yet.