Skip to main content
The ctrlc CLI is the primary tool for interacting with Ctrlplane from your terminal, CI/CD pipelines, and automation scripts. It supports syncing resources, managing deployments, and applying configuration.

Installation

curl -fsSL https://get.ctrlplane.dev | sh

Authentication

Set your API key and workspace as environment variables or pass them as flags:
# Environment variables (recommended)
export CTRLPLANE_API_KEY="your-api-key"
export CTRLPLANE_WORKSPACE="your-workspace-id"
export CTRLPLANE_URL="https://app.ctrlplane.dev"

# Or pass as flags
ctrlc --api-key "your-api-key" --workspace "your-workspace-id" <command>

Commands

ctrlc sync

Sync infrastructure resources into Ctrlplane’s inventory. Each subcommand targets a specific provider or input method.
SubcommandDescription
sync pipeRead resources from stdin (JSON)
sync kubernetesSync Kubernetes cluster resources
sync awsSync AWS resources
sync google-cloudSync Google Cloud resources
sync azureSync Azure resources
sync terraformSync Terraform state resources
sync helmSync Helm releases
sync githubSync GitHub repositories
sync vclusterSync virtual clusters

ctrlc api

Interact directly with the Ctrlplane API.
SubcommandDescription
api upsert versionCreate or update a deployment version
See CI/CD Integration for detailed usage.

ctrlc apply

Apply resource definitions from YAML files.
ctrlc apply -f resource.yaml

Global Flags

FlagEnvironment VariableDescription
--api-keyCTRLPLANE_API_KEYAPI key for authentication
--workspaceCTRLPLANE_WORKSPACEWorkspace name or ID
--urlCTRLPLANE_URLCtrlplane API URL (default: https://app.ctrlplane.dev)

Next Steps