Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

ko

$ ko Official Med Risk
ko-build · Cloud & Infra · Apache-2.0 · macos / linux / windows

ko compiles Go packages directly into distroless OCI images without a Docker daemon or Dockerfile, replacing ko:// import paths in Kubernetes YAML manifests via ko resolve and ko apply. It supports --local, --push=false, and automatic SPDX SBOM synthesis.

FCRS-1.0 Score
84 /100
Good
Medium Confidence
Zero-Friction Install
brew install ko
CLI vs MCP Decision CLI Only

ko compiles local Go binaries directly into OCI tarballs or registries using the host Go toolchain; MCP is unnecessary.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
✓ Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 20 / 25

Clean non-interactive Go CLI with --push=false and --local dry/local flags and ko resolve stdout YAML, though ko build prints an image ref string rather than JSON.

  • --push=false and --local prevent unintended remote pushes
  • ko resolve renders manifests to stdout without cluster writes
Trust & Safety 20 / 25

Automatically generates SPDX SBOMs and avoids Dockerfiles/root daemons, though ko build defaults to pushing unless --local or --push=false is passed.

  • Built-in SPDX SBOM generation enabled by default
  • Default ko build pushes to KO_DOCKER_REPO unless --local or --push=false is set
Setup & Portability 14 / 15

Single static Go binary across macOS, Linux, and Windows via Homebrew, go install, and GitHub Releases (requires Go toolchain).

  • Cross-platform binary via brew install ko
Utility & Efficiency 13 / 15

Builds multi-arch Go container images in seconds without Dockerfiles and integrates natively with Kubernetes manifests.

  • Fast cross-compilation of Go cmd/ targets straight to OCI
Maintenance & Lineage 9 / 10

Official ko-build/ko project (originated at Google) licensed under Apache-2.0.

  • Official ko-build/ko repository
Docs & Verifiability 8 / 10

Clear configuration docs at ko.build and clean Cobra --help.

  • Official docs at ko.build

Security, Auth & Guardrails

Auth Modes
No Auth Config File Env API Key
Credential Storage

Reads OCI registry credentials from ~/.docker/config.json and KO_DOCKER_REPO environment variables.

Side Effects
Read-Only Local Write Remote Write
Cost & Quotas

100% free and open-source (Apache-2.0).

Copyable Guardrail for CLAUDE.md / AGENTS.md
# ko Agent Rules
- Default to `ko build --local` or `--push=false --tarball=out.tar` for local verification; never push unless `KO_DOCKER_REPO` and push intent are confirmed.
- Use `ko resolve --push=false -f <manifest>` to preview Kubernetes YAML output before running `ko apply`.

Agent-Ready Command Recipes

Safe Read-Only Queries

Render Kubernetes YAML with --push=false
ko resolve --push=false -f k8s/deployment.yaml

Validates Go builds and resolves ko:// references in YAML manifests to stdout without pushing images or applying to a cluster.

Controlled Writes & Previews

Build a Go image locally into the Docker daemon
ko build --local ./cmd/server

Builds a distroless OCI image under ko.local/ into the local Docker daemon without pushing remotely.

Strengths for Agents

  • + Builds fast, reproducible, distroless Go OCI images with zero Dockerfile or daemon.
  • + Generates SPDX SBOMs automatically by default (--sbom=spdx).
  • + ko resolve --push=false previews resolved Kubernetes manifests safely.

Caveats & Pitfalls

  • ! Only targets Go applications; not a general-purpose image builder.
  • ! ko build pushes to KO_DOCKER_REPO by default unless --local or --push=false is passed.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI