Skip to content

ct init

Initialize a new project with a default structure.

Terminal window
ct init
ct init [flags]
FlagShortTypeDefaultDescription
--dir-dstring"."Project directory
myproject/
main.ct # manifest definitions (TypeScript syntax)
values.json # configurable values

main.ct is the entrypoint for your Kubernetes manifests, written in TypeScript-like syntax executed by the CT runtime.

values.json holds configurable values that can be overridden per environment via ct template --values or ct apply --set.

Initialize in the current directory:

Terminal window
ct init

Initialize in a specific directory:

Terminal window
ct init --dir ./my-app

After initializing, you typically:

  1. Edit main.ct to define your Kubernetes resources.
  2. Adjust values.json for your environment.
  3. Render manifests with ct template.
  4. Generate IDE types with ct types.