Skip to main content

Ko

@dataverket/kov2026.10.29.1· AGPL-3.0-only· 2d agoBEHAVIORSWORKFLOWSSKILLSACCEPTED WARNINGS
01README

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.

02Behaviors1
@dataverket/ko/modulev2026.10.29.1module.ts

Global Arguments

ArgumentTypeDescription
dir?stringThe Go module's directory, absolute or relative to the repository root
repo?stringWhere 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?enumHow 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?arrayPlatforms to build for, os/arch[/variant], or all for every platform of the base image; empty is ko's default, linux/amd64
sbom?enumThe SBOM generated and pushed beside each image
baseImage?stringBase image for every command, overriding .ko.yaml; pin it by digest for reproducible builds
configPath?stringA .ko.yaml to use instead of the module's own, relative to the repository root
cache?stringDirectory 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?booleanAllow a registry served over plain HTTP
koBinary?string
goBinary?string
fn describe()
Record what ko would work with: module path, Go and ko versions, the config file and base image in effect, and every main package
fn build()
Build every main package importPaths name into an image, push or keep it as asked, and record each image with its digest, plus the build record, also as a JSON file
fn resolve()
Build and publish the ko:// references in files, record the rendered manifests, every image pinned by digest in them, built here or not, and whether any image in them is not pinned

Resources

module(infinite)— The module as ko sees it: path, Go and ko versions, config, base image, commands
image(infinite)— One image build built: its reference and digest
build(infinite)— One build: every image it produced
resolution(infinite)— One resolve: every image pinned by digest in the rendered manifests, built here or not, and whether every image in them is pinned

Files

buildRecord(application/json)— The build record as JSON, the same fields as the build resource, for an attestation to carry as its predicate
manifests(application/yaml)— The manifests resolve rendered, every ko:// reference replaced by an image pinned by digest
03Workflows3
@dataverket/ko-images2e4b9047-f0e9-4641-8a1a-9b730bc7f4a3

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

describe
1.module— What ko works with, as evidence beside the images. Read-only.
build
1.images— One ko build per command, each recorded as an image record with its digest, and one build record.
verify
1.every-image-has-a-digest— This run recorded at least one image, as many as the build record counts, every one with a sha256 digest.
@dataverket/ko-manifests39d3cf77-6a01-46b8-9ef3-c7f5d8fa95bd

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

resolve
1.manifests— ko resolve over the files; the rendered manifests become the manifests file, every pinned image in them the resolution record.
verify
1.images-built— At least one ko:// reference was built, and this run wrote the resolution record.
2.every-image-pinned— Every image in the rendered manifests is pinned by digest, unless requirePinned is false.
@dataverket/ko-verifya134f13a-a1a2-485f-8b4b-f68f305848da

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

describe
1.module— What ko works with. Read-only.
build
1.images— One ko build per command, pushed nowhere, each recorded with its digest.
verify
1.every-command-built— This run recorded as many images as the build counts, at least one, every one with a sha256 digest.
04Skills1
ko1 file
05Stats
A
100 / 100
Downloads
0
Archive size
36.7 KB
  • 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

07Platforms
08Labels