CLI Overview
Install
Section titled “Install”One-line install (Linux/macOS):
curl -fsSL https://cloudticon.com/install.sh | sudo shVia go install:
go install github.com/cloudticon/ct/cmd/ct@latestOr build from source:
git clone https://github.com/cloudticon/ct.gitcd ctgo build -o ct ./cmd/ctCommand index
Section titled “Command index”ct [global flags] <command> [args]
Commands: init Create a new CT project scaffold template Render manifests from .ct entrypoint + release name apply Render and apply manifests for a release delete Delete a release from cluster using inventory dev Run live development workflows on cluster workloads types Generate IDE types (.d.ts) for Values and runtime globals version Print CLI version information help Show help for any command| Command | Description | Page |
|---|---|---|
ct init | Create a new CT project scaffold | → |
ct template | Render manifests from .ct entrypoint + release name | → |
ct apply | Render and apply manifests to a Kubernetes cluster | → |
ct delete | Delete release resources tracked by inventory | → |
ct dev | Run live development workflows on cluster workloads | → |
ct types | Generate IDE types (.d.ts) for Values and runtime globals | → |
Global flags
Section titled “Global flags”--help, -h Show help--verbose Enable verbose logs--no-color Disable ANSI colors in CLI outputct version
Section titled “ct version”Print installed version details.
ct versionct help
Section titled “ct help”Get command docs quickly:
ct helpct help templatect template --helpEnd-to-end scenarios
Section titled “End-to-end scenarios”Scenario A: Bootstrap and render
Section titled “Scenario A: Bootstrap and render”ct initct template my-app . --namespace productionScenario B: Multi-environment rendering
Section titled “Scenario B: Multi-environment rendering”ct template my-app . --values values-dev.yaml --namespace devct template my-app . --values values-staging.yaml --namespace stagingct template my-app . --values values-prod.yaml --namespace prodScenario C: GitOps (ArgoCD style)
Section titled “Scenario C: GitOps (ArgoCD style)”ct template my-app . --values values-prod.yaml --namespace prod > apps/my-app/manifests.yamlgit add apps/my-app/manifests.yamlgit commit -m "update prod manifests"Scenario D: Apply directly to cluster
Section titled “Scenario D: Apply directly to cluster”ct apply my-app . --namespace development --context devct apply my-app . --namespace production --context prod --values values-prod.yamlScenario E: Deploy from GitHub source
Section titled “Scenario E: Deploy from GitHub source”ct template my-app github.com/cloudticon/my-app@v1.0 --namespace stagingct apply my-app github.com/cloudticon/my-app@v1.0 --namespace stagingct apply my-app github.com/cloudticon/my-app@main --namespace staging --no-cacheScenario F: Deploy and teardown
Section titled “Scenario F: Deploy and teardown”ct apply my-app . --namespace production --context prodct delete my-app --namespace production --context prodScenario G: IDE-first workflow
Section titled “Scenario G: IDE-first workflow”ct types .ct types . --devct template my-app . --namespace productionRegenerate types whenever .ct files or values change.
Scenario H: Dev loop with cleanup
Section titled “Scenario H: Dev loop with cleanup”ct dev --context staging --env-file .env.staging --name dev-alicect dev --delete --context staging --name dev-aliceTroubleshooting
Section titled “Troubleshooting”ct: command not found
Section titled “ct: command not found”- Re-run installer.
- Confirm PATH includes CT install location.
- Restart shell session.
URL imports fail during template/types
Section titled “URL imports fail during template/types”- Check repository URL and branch/tag in import string.
- Verify network and git access.
- Clear CT cache (
~/.ct/cache/) if stale packages are present. - Use
--no-cacheonct template/ct applyto force re-download.
Values file is not applied
Section titled “Values file is not applied”- Ensure valid YAML/JSON syntax.
- Check key names used by templates.
- Use
--setto test overrides quickly. - Remember auto-detect order:
values.json→values.yaml→values.yml.
Async/await errors
Section titled “Async/await errors”CT runtime is synchronous (Goja engine). An esbuild plugin rejects async/await at bundle time. Replace async flows with synchronous alternatives.
Inconsistent manifests across environments
Section titled “Inconsistent manifests across environments”- Keep one baseline values file plus thin env overlays.
- Version-control all rendered outputs used by GitOps.
- Avoid hidden defaults; prefer explicit values.
- Use stable release names so inventory and pruning stay predictable.
Best practices
Section titled “Best practices”- Keep
main.ctsmall and split by domain modules. - Use factory helpers in shared packages for consistency.
- Pin URL imports to tags for reproducibility.
- Run
ct typesin CI for editor parity in teams. - Use
ct applyfor quick iteration,ct template+kubectl applyfor controlled pipelines.