Ko
Security Notice
This extension includes AI agent skills that can modify AI assistant behavior. Review the skill files before installing.
Go programs built into container images by ko, https://ko.build: no Dockerfile, no container daemon, one image per main package, pushed to a registry, loaded into the local daemon, or written to a tarball.
One model type, @dataverket/ko/module, a Go module. describe records what ko works with: module path, Go and ko versions, the config file and base image in effect, every main package. build builds the commands named (paths or patterns, each checked to be a main package with go list), one ko run per command, and records every image with its reference and digest, plus the build record, also as a JSON file for an attestation to carry. resolve builds and publishes the ko:// references in a set of manifests and records the rendered manifests as a file, every image pinned by digest in them with whether it was built here, and every image not pinned. Images are named / by default. A base image pinned by digest and a cache directory make a build need the network only once.
Three workflows, each bringing its own model and ending in an assertion: @dataverket/ko-verify proves every command builds, without a registry; @dataverket/ko-images builds and pushes, or loads into the daemon; and @dataverket/ko-manifests renders manifests with every image pinned by digest, for kubectl, flux or kustomize to take further. A skill, ko, says which to run for what. ko and go run as subprocesses in the module's directory with argv arrays, never through a shell; registry credentials come from the container config, never from an argument. Written against ko 0.19.1.
Global Arguments
| Argument | Type | Description |
|---|---|---|
| dir? | string | The Go module's directory, absolute or relative to the repository root |
| repo? | string | Where images go, as ko's KO_DOCKER_REPO: a registry path such as registry.example.org/team, or ko.local for the local container daemon. Needed to push; may be empty for a build that pushes nowhere |
| naming? | enum | How an image is named under repo: base-import-paths is <repo>/<command>, preserve-import-paths is <repo>/<full import path>, bare is <repo> itself (one command only), default is ko's own <repo>/<command>-<md5 of the import path> |
| platforms? | array | Platforms to build for, os/arch[/variant], or all for every platform of the base image; empty is ko's default, linux/amd64 |
| sbom? | enum | The SBOM generated and pushed beside each image |
| baseImage? | string | Base image for every command, overriding .ko.yaml; pin it by digest for reproducible builds |
| configPath? | string | A .ko.yaml to use instead of the module's own, relative to the repository root |
| cache? | string | Directory where ko caches base images (KOCACHE), relative to the repository root; with a base image pinned by digest, builds then need the network once |
| insecureRegistry? | boolean | Allow a registry served over plain HTTP |
| koBinary? | string | |
| goBinary? | string |
Resources
Files
Build every command of one Go module into container images with ko and push them, or load them into the local daemon when repo is ko.local, then fail unless every image this run built was recorded with a digest. First records what ko worked with (module path, Go and ko versions, the base image in effect), then builds. The module's directory, the registry path, the tags, the commands and the platforms are inputs; the base image can be pinned by digest and cached so a repeated build needs the netw
Render Kubernetes manifests with ko: every ko://<import path> image reference in files is built from the Go module in dir, pushed to repo, and replaced by its reference pinned by digest. The rendered manifests are recorded as the manifests file of the model ko-manifests, for whatever applies them next: kubectl, flux push artifact, kustomize; the resolution record lists every image pinned by digest in them, built here or not. The run fails unless at least one image was built and, when requirePinn
Prove that every command of one Go module builds into a container image, without a registry: ko builds each for the platforms given, pushes nowhere, records every image's digest, and optionally writes the images to a tarball for a local load. First records what ko worked with (module path, Go and ko versions, the base image in effect). Fails unless every command was built and recorded with a digest. Made for a check before merge, or as the first job of a release: with a base image pinned by dige
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Docs keep secrets in a vault1/1earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License2/2earned
- Verified public repository2/2earned
Spawns a subprocess with Deno.Command().
- models/module.ts:239 — no reason given