Skip to content
Install the CLI

Reference CLI

list

These docs describe Kix's main branch, which can include changes not yet released. Read the docs for the latest release.

kix list reads the flake and prints what it defines: its clusters, its packages, or the resources and container images one cluster renders. It does not contact a cluster. Use it to find the names other commands accept, to confirm what a cluster contains before reading the full manifests with kix build, and to collect the images an environment without registry access needs.

This page is hand-maintained. Check cli/kix-cli/src/cli.rs and cli/kix-cli/src/commands/list/ when in doubt.

kix list clusters [-o text|json|yaml] [--flake <FLAKE>] [--no-cache]
kix list packages [<CLUSTER>] [-o text|json|yaml]
[--flake <FLAKE>] [--no-cache]
kix list resources <CLUSTER> [-o text|json|yaml]
[--flake <FLAKE>] [--no-cache]
kix list images <CLUSTER> [--sources] [-o text|json|yaml]
[--flake <FLAKE>] [--no-cache]
Argument or flagDefaultMeaning
<CLUSTER>Cluster name to evaluate. Optional for list packages, where it adds a status column.
--sourcesOfflist images only. In text output, list under each image the resources that reference it.
-o, --outputtexttext prints a table or summary. json and yaml print the same data as one document.
--flake <FLAKE>.Flake to read.
--no-cacheOffRead from Nix instead of the eval cache.

Prints a NAME column with every cluster registered with kix.lib.mkFlake, read from legacyPackages.<system>.kixClusters.

When the project’s kix.toml has a [versions] table, text output adds KIX and INPUT columns:

NAME KIX INPUT
dev - not listed in [versions]
prod 0.12.3 kix-stable
staging 0.14.2 kix

KIX shows the release version pinned for the cluster’s input in flake.lock, development when the input points to a local folder or branch, or unknown when flake.lock has no version for that input. A cluster missing from [versions] shows - and not listed in [versions].

JSON and YAML output are unchanged: an array of cluster names. A flake with no clusters prints No clusters found in this flake. on stderr.

Without a cluster, lists every package the flake exposes in legacyPackages.<system>.kixPackages, with NAME and VERSION columns. Experimental packages are listed as experimental.<name>.

With a cluster, lists the cluster’s instances and the packages it could install, with a STATUS column:

StatusMeaning
installed [<namespace>]An instance declared in the cluster
installed (auto) [<namespace>]An instance added by auto-instantiation
import [<namespace>]An instance that stands for resources Kix does not manage
availableA package the cluster can use but has not instantiated

Rows are sorted by name, then by namespace. Each cluster instance gets its own row, so two instances with the same name in different namespaces appear separately. An OWNER column appears when any package declares an owner; the rest show -. JSON entries have name, version, owner, and package, plus status and isImport with a cluster. For built-in Kix packages, package is the package ID used in release notes, such as harbor or experimental/coredns. For custom packages and imports, package is null. An empty result prints No packages found. on stderr.

Evaluates the cluster and prints an inventory of its rendered resources. Text output has four parts:

  1. The cluster name and total resource count.
  2. Each namespace with its resource count. Cluster-scoped resources are listed as (cluster-scoped).
  3. A table of resource kinds, most frequent first.
  4. Every resource as Kind.group/name (or Kind/name for core v1 kinds), grouped by namespace and sorted by kind, group, and name.

JSON and YAML output is an object with cluster, totalResources, namespaces (each { name, resources: [{ kind, group, name }] }, omitting group for core v1 kinds), and kindCounts (counts keyed by Kind.group, or Kind for core v1 kinds). Cluster-scoped resources are under the namespace name _cluster.

kix list resources reports rendered resources only. To see dependency edges, use kix graph.

Evaluates the cluster and lists the container images it needs. Use the list to pull, mirror, or preload images before deploying to an environment without registry access.

Kix reads the image of every container, init container, and ephemeral container in Pods and in the pod templates of Deployments, StatefulSets, DaemonSets, ReplicaSets, Jobs, and CronJobs. It adds the images a package declares in out.extraImages, which cover pods an operator creates at run time.

Text output prints one image reference per line. Each reference appears once, sorted, exactly as written in the manifests: a tag, a digest, or both. With --sources, the resources that reference each image follow it, as Kind namespace/name (container: <name>). A cluster with no images prints No container images found.

JSON and YAML output is an array of { image, sources }, whatever --sources says. Each entry in sources has kind, namespace, name, and container. Cluster-scoped sources have the namespace _cluster.

❱ kix list clusters
❱ kix list packages demo
❱ kix list resources demo -o json
❱ kix list images demo --sources
❱ kix list images demo | xargs -n1 docker pull
❱ kix --flake ../infra list clusters -o json

0 on success, including an empty list. 1 when the flake cannot be evaluated or the cluster does not exist.