Install
Install methods
Section titled “Install methods”Official installer (recommended)
Section titled “Official installer (recommended)”curl -fsSL https://cloudticon.com/install.sh | sudo shThe script detects your OS and architecture, downloads the matching binary, and places it in /usr/local/bin/ct.
Via go install
Section titled “Via go install”If you already have a Go toolchain (1.22+):
go install github.com/cloudticon/ct/cmd/ct@latestThe binary lands in $GOPATH/bin (usually ~/go/bin). Make sure it is in your PATH.
Build from source
Section titled “Build from source”git clone https://github.com/cloudticon/ct.gitcd ctgo build -o ct ./cmd/ctsudo mv ct /usr/local/bin/Update
Section titled “Update”Re-run the same install command you used originally — the installer overwrites the existing binary:
curl -fsSL https://cloudticon.com/install.sh | sudo shFor go install, simply run the command again — Go fetches the latest tag:
go install github.com/cloudticon/ct/cmd/ct@latestUninstall
Section titled “Uninstall”Remove the binary and the local cache:
sudo rm "$(which ct)"rm -rf ~/.ctFrom zero to dev in 60 seconds
Section titled “From zero to dev in 60 seconds”1. Scaffold a project
Section titled “1. Scaffold a project”ct init my-appcd my-appThis creates a minimal project:
my-app/ main.ct # resource definitions (TypeScript syntax) values.json # configurable values2. Define your workload
Section titled “2. Define your workload”Edit main.ct — a few lines of TypeScript replace hundreds of YAML:
import { deployment, service, ingress } from "github.com/cloudticon/k8s@master";
const app = "api";
const labels = { "app.kubernetes.io/name": app, "app.kubernetes.io/part-of": "my-app", "app.kubernetes.io/managed-by": "ct",};
deployment({ name: app, labels, image: "ghcr.io/acme/api:1.4.2", replicas: 3, resources: { requests: { cpu: "100m", memory: "128Mi" }, limits: { cpu: "500m", memory: "512Mi" }, },});
service({ name: app, labels, selector: labels, ports: [ { name: "http", port: 80, targetPort: 3000 }, { name: "metrics", port: 9090, targetPort: 9090 }, ],});
ingress({ name: app, labels, rules: [ { host: "api.example.com", http: { paths: [ { path: "/", pathType: "Prefix", backend: { service: app, port: 80 }, }, ], }, }, ],});3. Preview rendered manifests
Section titled “3. Preview rendered manifests”ct template . --namespace defaultCT bundles main.ct, evaluates it against values.json, and prints Kubernetes YAML to stdout — ~40 lines of CT become ~120 lines of YAML. Review the output before touching the cluster.
Show generated YAML
apiVersion: apps/v1kind: Deploymentmetadata: name: api namespace: default labels: app.kubernetes.io/name: api app.kubernetes.io/part-of: my-app app.kubernetes.io/managed-by: ctspec: replicas: 3 selector: matchLabels: app.kubernetes.io/name: api app.kubernetes.io/part-of: my-app app.kubernetes.io/managed-by: ct template: metadata: labels: app.kubernetes.io/name: api app.kubernetes.io/part-of: my-app app.kubernetes.io/managed-by: ct spec: containers: - name: api image: ghcr.io/acme/api:1.4.2 resources: requests: cpu: "100m" memory: "128Mi" limits: cpu: "500m" memory: "512Mi"---apiVersion: v1kind: Servicemetadata: name: api namespace: default labels: app.kubernetes.io/name: api app.kubernetes.io/part-of: my-app app.kubernetes.io/managed-by: ctspec: selector: app.kubernetes.io/name: api app.kubernetes.io/part-of: my-app app.kubernetes.io/managed-by: ct ports: - name: http port: 80 targetPort: 3000 - name: metrics port: 9090 targetPort: 9090---apiVersion: networking.k8s.io/v1kind: Ingressmetadata: name: api namespace: default labels: app.kubernetes.io/name: api app.kubernetes.io/part-of: my-app app.kubernetes.io/managed-by: ctspec: rules: - host: api.example.com http: paths: - path: / pathType: Prefix backend: service: name: api port: number: 804. Start developing on-cluster
Section titled “4. Start developing on-cluster”Create a dev.ct file to configure your dev loop:
config({ namespace: "my-app-dev",});
dev("api", { command: ["npm", "run", "dev"], sync: [{ from: "./src", to: "/app/src" }], ports: [[3000, 3000]], terminal: "bash",});Then run:
ct devCT applies your resources, patches the workload for development (removes probes, overrides command), and starts:
- File sync — local changes stream into the container instantly.
- Port forwarding —
localhost:3000hits your running app. - Log streaming — colored output from all dev targets.
- Terminal — drops you into the container shell.
Edit code locally, see it live on the cluster — no image rebuilds, no redeploys. See CT Dev for the full config reference.
5. Apply to a cluster (optional)
Section titled “5. Apply to a cluster (optional)”When ready for a clean deploy without dev mode:
ct apply . --namespace defaultUses server-side apply — no kubectl pipe needed.
Shell completion
Section titled “Shell completion”CT does not ship built-in completions yet. You can create a simple alias helper in your shell profile:
# ~/.bashrc or ~/.zshrcalias ctt='ct template . --namespace'alias cta='ct apply . --namespace'Troubleshooting
Section titled “Troubleshooting”ct: command not found
Section titled “ct: command not found”- Restart your shell session or run
source ~/.bashrc/source ~/.zshrc. - Check whether the binary exists:
ls -l /usr/local/bin/ct- If you used
go install, make sure$GOPATH/binis inPATH:
export PATH="$PATH:$(go env GOPATH)/bin"Permission denied during install
Section titled “Permission denied during install”Run the installer with sudo:
curl -fsSL https://cloudticon.com/install.sh | sudo shIf your system policy blocks sudo, install via go install or build from source into a directory you own.
Installer hangs or times out
Section titled “Installer hangs or times out”- Verify network access:
curl -I https://raw.githubusercontent.com. - Check corporate proxy / VPN settings.
- Try downloading the binary manually from the GitHub releases page.
URL imports fail after install
Section titled “URL imports fail after install”CT resolves github.com/… imports at bundle time. If they fail:
- Check git and HTTPS access to the repository.
- Clear the import cache:
rm -rf ~/.ct/cache/- Re-run
ct template ..
Next steps
Section titled “Next steps”- CLI Reference — full command and flag guide.
- CT VS Code — editor integration and IntelliSense.
- K8s Factories — reusable resource helpers.
- CT Dev — live development mode on a cluster.