Overview
Install extension
Section titled “Install extension”Install from VS Code Marketplace
- Open VS Code Extensions.
- Search for
Cloudticon CT. - Install and reload window.
Prerequisite:
ct versionThe extension expects a working ct binary in PATH.
How CT VS Code works
Section titled “How CT VS Code works”The extension keeps editor types in sync with your project by running:
ct types <project-dir>On .ct or values file changes it refreshes generated typings and asks TypeScript to re-index symbols.
IntelliSense model
Section titled “IntelliSense model”You get completions and type checks for:
Valuesloaded fromvalues.yamlorvalues.json- globals from
ctruntime - operator globals when using
ct types --operator - resources and helper APIs imported from URL modules
URL imports
Section titled “URL imports”CT VS Code resolves URL imports used in .ct files and makes them visible to TypeScript tooling.
Example:
import { deployment } from "https://github.com/cloudticon/k8s@master";Tips:
- Pin imports to tags for reproducible builds.
- Use the same refs in local CI and editor sessions.
Recommended project workflow
Section titled “Recommended project workflow”ct types . --output ./.ct/typesct template --values values.yamlAdd .ct/types to your workspace settings if you want explicit include paths.
Troubleshooting
Section titled “Troubleshooting”No autocomplete for Values
Section titled “No autocomplete for Values”- Ensure values file exists and parses correctly.
- Run
ct types .manually to inspect errors. - Restart TypeScript server in VS Code.
Extension cannot find ct
Section titled “Extension cannot find ct”- Check
ct versionin integrated terminal. - Add CT install path to
PATH. - Restart VS Code after shell profile changes.
URL import diagnostics are stale
Section titled “URL import diagnostics are stale”- Re-run
ct types. - Clear project TypeScript cache.
- Reload VS Code window.
Operator globals missing
Section titled “Operator globals missing”Run with --operator:
ct types . --operatorDev mode typings
Section titled “Dev mode typings”When the extension detects a dev.ct file it runs ct types --dev to generate dev.d.ts with:
CtResource— union type of all workload names frommain.ct(autocomplete fordev()first argument).CtEnvKey— union type of all keys from.envfile (autocomplete forenv()).- Full type definitions for
config(),dev(),prompt(),env().
See the CT Dev documentation for details on the dev runtime API.