CLI Command Map

View .md

Run bare kanject for a short, project-aware landing screen; use kanject --help for the complete tree. Commands then fit into setup, local work, or provider operations. Root commands work on the project tree; provider-bound commands live under keys such as kanject aws and kanject github.

bash
kanject <root-command>          # provider-agnostic, works on the project treekanject aws <cloud-command>     # provider-bound cloud operations
01
Set up
Create or adopt a service and verify the local toolchain.
02
Daily
Manage entries, stages, env, cross-repo dependencies, tests, and migrations.
03
AWS
Deploy, roll back, inspect ledger history, manage preview stacks, bootstrap CI, distribute artifacts.

Set up

  • kanject new <template> — scaffold a deploy-ready service from a template (and run init for you). Guide: Project Templates.
  • kanject init — adopt an existing project: writes the kanject-cli/ tree, stage files, .gitignore entries, and git hooks.
  • kanject doctor — pre-flight checks, fully offline without --env; add --env <stage> for stage checks and --json for a CI-parseable report. Guide: Troubleshooting.
  • kanject update — update the CLI and template pack, then self-verify the new install (--check-only, --templates-only, --json).
  • kanject install provider [key] — install an optional provider plugin; omit the key on a terminal to choose from the curated providers.

Daily loop

  • kanject add function | stage | lib | env | param | secret | distributable — register a Lambda entry, a stage, a cross-repo dependency, or a plain / SSM / Secrets Manager config value in the manifest and stage files. Guides: Dependencies, Local Development.
  • kanject configure distribution — interactively add a distribution destination; list/ls inspects mappings and remove deletes one.
  • kanject env — inspect local stage values and masked param: / secret: bindings; --show-values reveals binding strings but never fetches AWS values. Guide: Local Development.
  • kanject sync — resolve cross-repo dependencies into the lockfile and generated MSBuild imports; --locked verifies in CI, --offline replays the lock. Guide: Dependencies.
  • kanject msbuild status | enable — inspect or stand up the generated dependency wiring and git hooks.
  • kanject test — run the service locally with the right runner per project type; --watch, --event, --http, --debug, and --pull-env for a stage's real config. Guide: Local Development.
  • kanject migrate — adopt legacy cross-repo <ProjectReference>s into the manifest (--dry-run first); --schema-v2 upgrades a v1 manifest in place.

AWS provider

  • kanject aws deploy — build and ship a stage: Lambda, ECS Fargate, or a static site, per entry. --dry-run renders the plan without AWS changes. Guides: Deploy targets, Deployment.
  • kanject aws rollback — flip the live alias to a prior revision: --to previous | previous-stable | <sha> | <version>. No rebuild.
  • kanject aws deployments list | show | mark | gc — read the S3 deployment ledger, annotate revisions stable / broken, and sweep artifacts outside the rollback window. Guide: Deployment.
  • kanject aws preview publish | ls | url | extend | rm — publish static-site previews and manage the live stack-backed/static-site preview inventory. These commands read provider state.
  • kanject aws pipeline up | init | bootstrap — provision the AWS-native CodePipeline CI surface; up is the idempotent one-command path. Guide: CI/CD Pipeline.
  • kanject aws configure vpc | domain — interactive wizards that validate and write a stage's network and custom-domain config.
  • kanject aws distribute — publish declared distributables to S3, CodeArtifact, or (via the github plugin) GitHub Releases. Guide: Distribute.
  • kanject aws template migrate — preview or apply migration from generated stage templates to a committed template.json base.
  • kanject github distribute — publish only distribution cells mapped to GitHub Releases.
Was this page helpful?