babyctl¶
If Terraform and kubectl had a baby, it would feel a lot like babyctl.
Active development
babyctl is rapidly evolving. Expect dragons, gremlins, and fast-moving feature work while the core experience stabilises.
babyctl lets you interact with any infrastructure that Terraform can describe while keeping the ergonomics of kubectl. The goal is
to provide kubectl-style workflows—get, apply, edit, diff, and more—without depending on a running Kubernetes cluster.
Why babyctl?¶
- Zero-import applies – point
babyctl applyat pre-existing infrastructure to bring it under control without painful Terraform imports. - Unified discovery –
babyctl api-resourcesmerges Kubernetes and Terraformer API discovery into one familiar list. - Multi-format fluency – switch between YAML, HCL, and JSON with a single flag when you need the view that makes sense.
- Crisis-friendly editing –
babyctl editopens live infrastructure in your editor so you can perform surgical changes just like you would with kubectl (starting with the bundledWidgetsample). - Kubernetes ecosystem compatible – pipe the output of tools such as Kustomize straight into
babyctlto reuse all of your favourite config machinery.
Key use cases¶
- Bring click-ops infrastructure under control
- Inspect resources with
babyctl get. - Run
babyctl apply -f existing.yamlto adopt them without juggling Terraform state imports. - Leverage Kubernetes tooling for Terraform resources
kustomize build overlays/prod | babyctl apply -f -works against anything Terraformer can reach.- Emergency edits
- When production is on fire, open the resource directly via
babyctl editand keep the lights on. The first implementation targets the bundledbabyctl.dev/v1alpha1Widgetresource when using the local API definitions; more resources will follow. - Format conversion
- Convert back and forth with
babyctl convert -f terraform.tf -oyamlor-ohcl.
Quick start¶
# Install babyctl
make install
# Discover available resources from kubectl and Terraformer
babyctl api-resources
# Apply configuration from stdin
kustomize build overlays/dev | babyctl apply -f-
# Convert Terraform to YAML
babyctl convert -f terraform.tf -oyaml
See the Getting Started guide for detailed setup steps.
Supported commands¶
| Command | Description |
|---|---|
api-resources |
List API resources available via kubectl and Terraformer |
api-server |
Run a Kubernetes-compatible discovery server backed by babyctl definitions |
api-versions |
Show supported API versions |
apply |
Apply a declarative configuration to a live resource |
convert |
Translate files between HCL, YAML, and JSON |
delete |
Delete live resources |
diff |
Compare live resources against would-be applies |
edit |
Open a resource in $EDITOR and persist edits live |
explain |
Display documentation about a resource |
get |
Retrieve one or many resources |
version |
Print client and server versions |
For full flag details see the CLI reference.
Release automation¶
babyctl uses GitHub Actions and release-please to cut releases automatically. Follow Conventional Commits so release-please can determine semantic versions and changelog entries. See the contributing guide for details.