klim generate
Auto-generate CI and container configuration files from your .klim.yaml tool requirements. The generated files use package IDs from the klim marketplace to produce install commands for each tool.
klim generate <github-action|dockerfile|devcontainer> [flags]Generators
Section titled “Generators”| Format | Description | Output |
|---|---|---|
github-action | GitHub Actions workflow | Reusable workflow with install + verify steps |
dockerfile | Dockerfile | Multi-stage with apt/brew/npm installs |
devcontainer | devcontainer.json | VS Code / GitHub Codespaces config with features |
| Flag | Short | Description |
|---|---|---|
--file | -f | Path to .klim.yaml (default: auto-detect) |
--output | -o | Write to file instead of stdout |
--base | Base image for Dockerfile (default: ubuntu:24.04) |
Examples
Section titled “Examples”# Generate GitHub Actions workflowklim generate github-action
# Generate and save to fileklim generate github-action -o .github/workflows/setup-tools.yml
# Generate Dockerfile with custom base imageklim generate dockerfile --base ubuntu:22.04 -o Dockerfile.tools
# Generate devcontainer.jsonklim generate devcontainer -o .devcontainer/devcontainer.jsonDev Container Features
Section titled “Dev Container Features”The devcontainer generator automatically maps known tools to official Dev Container Features:
| Tool | Feature |
|---|---|
| kubectl | ghcr.io/devcontainers/features/kubectl-helm-minikube |
| terraform | ghcr.io/devcontainers/features/terraform |
| node | ghcr.io/devcontainers/features/node |
| python | ghcr.io/devcontainers/features/python |
| go | ghcr.io/devcontainers/features/go |
| gh | ghcr.io/devcontainers/features/github-cli |
| az | ghcr.io/devcontainers/features/azure-cli |
| docker | ghcr.io/devcontainers/features/docker-in-docker |
Tools without a known feature are installed via postCreateCommand.
See Also
Section titled “See Also”- klim init — Generate .klim.yaml from project files
- klim check — Validate tool requirements
- Team Manifests guide